Property values are read from the product catalog through an implementation of the interface. For most properties, the default is to use the class, which just invokes the RepositoryItem.getPropertyValue() method. You can write your own implementations of PropertyAccessor that use custom logic for determining the values of properties that you specify. The simplest way to do this is to subclass PropertyAccessorImpl.

In an EndecaIndexingOutputConfig definition file, you can specify a custom property accessor for a property by using the property-accessor attribute. For example, suppose you have a Nucleus component named /mystuff/MyPropertyAccessor, of a custom class that implements the PropertyAccessor interface. You can specify it in the definition file like this:

<property name="myProperty"

The value of the property-accessor attribute is the absolute path of the Nucleus component. To simplify coding of the definition file, you can map PropertyAccessor Nucleus components to simple names, and use those names as the values of property-accessor attributes. For example, if you map the /mystuff/MyPropertyAccessor component to the name myAccessor, the above tag becomes:

<property name="myProperty" property-accessor="myAccessor"/>

You can perform this mapping by setting the propertyAccessorMap property of the IndexingOutputConfig component. This property is a Map in which the keys are the names and the values are PropertyAccessor Nucleus components that the names represent. For example:


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices