public class SemanticAnnotationIndexingField extends Object implements CustomIndexingField
Modifier and Type | Field and Description |
---|---|
private static String |
__ANNOTATION_PREFIX |
protected SemanticAnnotation |
_annotation
The referenced semantic annotation.
|
protected ContentType |
_contentType
The declaring content type.
|
protected List<String> |
_metaPaths
The metadata paths.
|
Constructor and Description |
---|
SemanticAnnotationIndexingField(SemanticAnnotation annotation,
Collection<String> metaPaths,
ContentType contentType)
Build a SemanticAnnotationIndexingField.
|
Modifier and Type | Method and Description |
---|---|
private void |
addAnnotationValues(List<String> values,
CompositeMetadata metaHolder,
MetadataDefinitionHolder metaDefHolder,
String metaPath)
Add the annotation values from a given rich text to the global value list.
|
private void |
addAnnotationValues(List<String> allValues,
RichText richText)
Add the annotation values from a given rich text to the global value list.
|
I18nizableText |
getDescription()
Get the field description.
|
I18nizableText |
getLabel()
Get the field label.
|
String |
getName()
Get the field's name
|
MetadataType |
getType()
Get the type
|
Object[] |
getValues(Content content)
Get a content's values to index.
|
private static final String __ANNOTATION_PREFIX
protected SemanticAnnotation _annotation
protected List<String> _metaPaths
protected ContentType _contentType
public SemanticAnnotationIndexingField(SemanticAnnotation annotation, Collection<String> metaPaths, ContentType contentType)
annotation
- The semantic annotation.metaPaths
- The paths of the rich text metadatas declaring the annotation.contentType
- The declaring content type.public String getName()
IndexingField
getName
in interface IndexingField
public I18nizableText getLabel()
IndexingField
getLabel
in interface IndexingField
public I18nizableText getDescription()
IndexingField
getDescription
in interface IndexingField
public MetadataType getType()
IndexingField
getType
in interface IndexingField
public Object[] getValues(Content content)
CustomIndexingField
getValues
in interface CustomIndexingField
content
- The content being indexed.private void addAnnotationValues(List<String> values, CompositeMetadata metaHolder, MetadataDefinitionHolder metaDefHolder, String metaPath)
values
- The global value list to fill.metaHolder
- The current metadata holder.metaDefHolder
- The current metadata definition holder.metaPath
- The metadata path from the current metadata holder.private void addAnnotationValues(List<String> allValues, RichText richText)
allValues
- The global value list to fill.richText
- The rich text.