Package org.ametys.cms.model.properties
Class SemanticAnnotationSystemProperty
java.lang.Object
org.ametys.runtime.model.AbstractModelItem
org.ametys.runtime.model.DefaultElementDefinition<String>
org.ametys.cms.model.properties.AbstractProperty<String,Content>
org.ametys.cms.model.properties.AbstractStaticProperty<String,Content>
org.ametys.cms.search.systemprop.AbstractSystemProperty<String,Content>
org.ametys.cms.model.properties.SemanticAnnotationSystemProperty
- All Implemented Interfaces:
Comparable<ModelItem>,Property<String,,Content> IndexationAwareElementDefinition<String,,Content> SystemProperty<String,,Content> IndexationAwareSystemProperty<String,,Content> ElementDefinition<String>,ModelItem,PluginAware,Labelable,ModifiableLabelable,Configurable,Contextualizable,Serviceable
public class SemanticAnnotationSystemProperty
extends AbstractSystemProperty<String,Content>
implements IndexationAwareSystemProperty<String,Content>
Property for semantic annotations.
Do not use the property in search model. There is no search field nor query, the criteria would not work
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JSONUtilsThe JSON utilsstatic final StringPrefix for annotationsFields inherited from class org.ametys.cms.model.properties.AbstractStaticProperty
_contextFields inherited from class org.ametys.runtime.model.DefaultElementDefinition
_loggerFields inherited from class org.ametys.runtime.model.AbstractModelItem
__context, __serviceManagerFields inherited from interface org.ametys.runtime.model.ElementDefinition
CONFIG_DEFAULT_VALUE_TYPEFields inherited from interface org.ametys.runtime.model.ModelItem
ITEM_PATH_SEPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the schema definitions brought by this element.Retrieves the name of the element's solr facet fieldRetrieves the name of the element's solr fieldRetrieves the name of the element's solr sort fieldprotected StringRetrieves the id of the property's typeGet the element's valuevoidindexValue(org.apache.solr.common.SolrInputDocument document, Content content, CMSDataContext context) Index the element in a solr document.booleanGet if the property can be displayed (i.e.booleanTest if the element is multiple.voidservice(ServiceManager manager) valueToJSON(Content content, DataContext context) Convert the property into a JSON objectvoidvalueToSAX(ContentHandler contentHandler, Content content, DataContext context) Generates SAX events for the propertyMethods inherited from class org.ametys.cms.search.systemprop.AbstractSystemProperty
_getNameConfigurationAttributeMethods inherited from class org.ametys.cms.model.properties.AbstractStaticProperty
_parseAndSetEnumerator, _parseDescription, _parseLabel, _parseName, configure, contextualizeMethods inherited from class org.ametys.cms.model.properties.AbstractProperty
getType, init, isEditable, setPluginInfoMethods inherited from class org.ametys.runtime.model.DefaultElementDefinition
_defaultValueToJSON, _getDefaultValues, _getSimpleDefaultValue, _toJSON, _widgetToJSON, _widgetToSAX, getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumerator, getEnumeratorConfiguration, getParsedDefaultValues, getValidator, getValidatorConfiguration, getWidget, getWidgetParameters, of, setCustomEnumerator, setCustomValidator, setDefaultValue, setEnumerator, setEnumeratorConfiguration, setMultiple, setParsedDefaultValues, setType, setValidator, setValidatorConfiguration, setWidget, setWidgetParameters, toSAXMethods inherited from class org.ametys.runtime.model.AbstractModelItem
_getModelItemHelper, _shouldJSONBeEmpty, _widgetParameterToSAX, addItemChecker, compareTo, disableConditionsToJSON, equals, getDescription, getDisableConditions, getItemCheckers, getLabel, getModel, getName, getParent, getPath, getPluginName, hashCode, setContext, setDescription, setDisableConditions, setLabel, setModel, setName, setParent, setPluginName, setServiceManager, toJSON, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.ametys.runtime.model.ElementDefinition
getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumerator, getEnumeratorConfiguration, getParsedDefaultValues, getValidator, getValidatorConfiguration, isEditable, setCustomEnumerator, setCustomValidator, setDefaultValue, setEnumerator, setEnumeratorConfiguration, setMultiple, setParsedDefaultValues, setValidator, setValidatorConfigurationMethods inherited from interface org.ametys.cms.search.model.IndexationAwareElementDefinition
getType, isFacetable, isSortableMethods inherited from interface org.ametys.runtime.util.Labelable
getDescription, getLabel, getNameMethods inherited from interface org.ametys.runtime.model.ModelItem
addItemChecker, getDisableConditions, getItemCheckers, getModel, getParent, getPath, getPluginName, getWidget, getWidgetParameters, setDisableConditions, setModel, setParent, setPluginName, setType, setWidget, setWidgetParameters, toJSON, toSAXMethods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel, setNameMethods inherited from interface org.ametys.cms.search.model.SystemProperty
getColumnWidth, getConverter, getRenderer
-
Field Details
-
ANNOTATION_PREFIX
Prefix for annotations- See Also:
-
_jsonUtils
The JSON utils
-
-
Constructor Details
-
SemanticAnnotationSystemProperty
public SemanticAnnotationSystemProperty()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractStaticProperty<String,Content> - Throws:
ServiceException
-
isMultiple
Description copied from interface:ElementDefinitionTest if the element is multiple.- Specified by:
isMultiplein interfaceElementDefinition<String>- Overrides:
isMultiplein classDefaultElementDefinition<String>- Returns:
trueif the metadata is multiple.
-
isDisplayable
Description copied from interface:SystemPropertyGet if the property can be displayed (i.e. used in a ResultField).- Specified by:
isDisplayablein interfaceSystemProperty<String,Content> - Returns:
trueif the property can be displayed,falseotherwise.
-
getValue
Description copied from interface:IndexationAwareElementDefinitionGet the element's value -
valueToJSON
Description copied from interface:PropertyConvert the property into a JSON object- Specified by:
valueToJSONin interfaceProperty<String,Content> - Parameters:
content- the ametysObject containing the property to convert.context- the context of the data to convert. Can not be null.- Returns:
- The property as JSON
-
valueToSAX
public void valueToSAX(ContentHandler contentHandler, Content content, DataContext context) throws SAXException Description copied from interface:PropertyGenerates SAX events for the property- Specified by:
valueToSAXin interfaceProperty<String,Content> - Parameters:
contentHandler- theContentHandlerthat will receive the SAX eventscontent- the ametysObject containing the property to SAX.context- the context of the data to SAX. Can not be null.- Throws:
SAXException- if an error occurs during the SAX events generation
-
indexValue
public void indexValue(org.apache.solr.common.SolrInputDocument document, Content content, CMSDataContext context) Description copied from interface:IndexationAwareElementDefinitionIndex the element in a solr document.- Specified by:
indexValuein interfaceIndexationAwareElementDefinition<String,Content> - Parameters:
document- the solr document to index into.content- the ametysObject containing the element to index.context- the context of the data to index. Can not be null.
-
getTypeId
Description copied from class:AbstractPropertyRetrieves the id of the property's type- Specified by:
getTypeIdin classAbstractProperty<String,Content> - Returns:
- the id of the property's type
-
getSolrFieldName
Description copied from interface:IndexationAwareElementDefinitionRetrieves the name of the element's solr field- Specified by:
getSolrFieldNamein interfaceIndexationAwareElementDefinition<String,Content> - Returns:
- the name of the element's solr field
-
getSolrSortFieldName
Description copied from interface:IndexationAwareElementDefinitionRetrieves the name of the element's solr sort field- Specified by:
getSolrSortFieldNamein interfaceIndexationAwareElementDefinition<String,Content> - Returns:
- the name of the element's solr sort field
-
getSolrFacetFieldName
Description copied from interface:IndexationAwareElementDefinitionRetrieves the name of the element's solr facet field- Specified by:
getSolrFacetFieldNamein interfaceIndexationAwareElementDefinition<String,Content> - Returns:
- the name of the element's solr facet field
-
getSchemaDefinitions
Description copied from interface:IndexationAwareSystemPropertyGet the schema definitions brought by this element.- Specified by:
getSchemaDefinitionsin interfaceIndexationAwareSystemProperty<String,Content> - Returns:
- The schema definitions used by this element.
-