public class MovePropertyFilter extends CopyPropertyFilter
Document
Property
values to another
property. The source property names do not appear in the Document's set
of property names.
If the overwrite
flag is true
, the moved
property values replace any existing values of the target property.
Otherwise, the moved property values supplement any existing values
of the target property.
Example documentFilters.xml
Configurations:
The following example moves HeadLine
and ByLine
property
values to the Title
and Author
properties, respectively.
The original HeadLine
and ByLine
properties will not be
indexed and will not be searchable. This latter behaviour differs from the
CopyPropertyFilter
from which this filter derives.
<!-- Make news articles appear in title and author searches. -->
<bean id="MoveNewsProps"
class="com.google.enterprise.connector.util.filter.CopyPropertyFilter">
<property name="propertyNameMap">
<map>
<entry key="HeadLine" value="Title"/>
<entry key="ByLine" value="Author"/>
</map>
</property>
<property name="overwrite" value="false"/>
</bean>
Constructor and Description |
---|
MovePropertyFilter() |
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
getPropertyNames(Document source)
Gets the set of names of all
Properties in the
Document , substituting original names of renamed Properties
with the new name. |
findProperty, setOverwrite, setPropertyNameMap, toString
getPropertyValues, newDocumentFilter
public java.util.Set<java.lang.String> getPropertyNames(Document source) throws RepositoryException
Properties
in the
Document
, substituting original names of renamed Properties
with the new name.getPropertyNames
in class CopyPropertyFilter
source
- the source Document
for this filterRepositoryException
- if a repository access error occursRepositoryDocumentException
- if a document has fatal
processing errors