Skip to Content

PropertyFilter: how to derive a property from other properties?

Hi!

I need to derive a property from a couple of other properties of the resource in the READ property filter. The source properties are ordinary static properties. My filter combines information from them for another datatype presentation.

In the filter() code, I tried to get values of the source properties via the predecessorFilter and directly from the resource.

If I try to get the source properties from the predecessor filter:

IPropertyMap map = this.predecessorFilter.filter();
map.get(...)

the returned map doesn't always contain these static properties.

If I try to use the getProperty() method of the resource:

this.getResource().getProperty(...)

then I fall into a recursive cycle: the getProperty() somehow calls my property filter again, which calls getResource().getProperty(...) again, which in turn leads to another call for this filter and so ad infinitum.

Is it possible to get the static properties of the resource in the filter() method at all? Or is there any other way to write a READ filter for deriving properties from another properties?

BTW, the predecessorFilter.filter() map always contains the static properties for the WRITE filter. Actually, that's how the problem is solved for now (I derive the property in the WRITE filter and store the value in the resource properties), but I don't like this solution. This derived property is for technical reasons, doesn't contain additional information, and shouldn't be stored but should be produced in the read mode.

Best regards,

Ilja Deryabin.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    author's profile photo
    Former Member
    Oct 06, 2005 at 04:58 PM

    Hi!

    Probably you don't get these properties because you

    don't specify their names in your IPropertyFilter.getPropertyNameList() method.

    Another way might be to return PropertyFilterMode.ALL_PROPERTIES in your IPropertyFilter.getFilterMode() method.

    Hope that helps.

    Kind regards, Dirk

    Add comment
    10|10000 characters needed characters exceeded