Interface I_CmsXmlContentValue
- All Superinterfaces:
Comparable<I_CmsXmlSchemaType>
,I_CmsXmlSchemaType
- All Known Implementing Classes:
A_CmsXmlContentValue
,A_CmsXmlValueCdataBase
,A_CmsXmlValueTextBase
,CmsXmlAccessRestrictionValue
,CmsXmlBooleanValue
,CmsXmlCategoryValue
,CmsXmlColorValue
,CmsXmlDateTimeValue
,CmsXmlDisplayFormatterValue
,CmsXmlDynamicCategoryValue
,CmsXmlHtmlValue
,CmsXmlLocaleValue
,CmsXmlNestedContentDefinition
,CmsXmlPlainTextStringValue
,CmsXmlSerialDateValue
,CmsXmlStringValue
,CmsXmlVarLinkValue
,CmsXmlVfsFileValue
,CmsXmlVfsImageValue
- Since:
- 6.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Search content configuration for the value.static enum
The available search types for element searchsetting. -
Field Summary
Fields inherited from interface org.opencms.xml.types.I_CmsXmlSchemaType
XSI_NAMESPACE, XSI_NAMESPACE_ATTRIBUTE_NO_SCHEMA_LOCATION
-
Method Summary
Modifier and TypeMethodDescriptionReturns the XML content instance this value belongs to.org.dom4j.Element
Returns the original XML element of this XML content value.int
getIndex()
Returns the node index of this XML content value in the source XML document, starting with 0, with special handling of elements in choice groups.Returns the locale of this XML content value was generated for.int
Returns the total number of XML elements of this type that currently exist in the source document.getPath()
Returns the path of this XML content value in the source document.getPlainText
(CmsObject cms) Returns the value of this XML content node as a plain text String.Returns the search content type for the value.getStringValue
(CmsObject cms) Returns the value of this XML content node as a String.int
Returns the node index of this XML content value in the source XML document, starting with 0, based on the XML ordering.boolean
Returnstrue
in case this value is searchable by default with the integrated full text search.void
moveDown()
Moves this XML content value one position down in the source document, if possible.void
moveUp()
Moves this XML content value one position up in the source document, if possible.void
setStringValue
(CmsObject cms, String value) Sets the provided String as value of this XML content node.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.opencms.xml.types.I_CmsXmlSchemaType
appendXmlSchema, createValue, generateXml, getChoiceMaxOccurs, getContentDefinition, getDefault, getMaxOccurs, getMinOccurs, getName, getSchemaDefinition, getTypeName, isChoiceOption, isChoiceType, isSimpleType, newInstance, setContentDefinition, setDefault, validateValue
-
Method Details
-
getDocument
Returns the XML content instance this value belongs to.- Returns:
- the XML content instance this value belongs to
-
getElement
org.dom4j.Element getElement()Returns the original XML element of this XML content value.- Returns:
- the original XML element of this XML content value
-
getIndex
int getIndex()Returns the node index of this XML content value in the source XML document, starting with 0, with special handling of elements in choice groups.This is useful in case there are more than one elements with the same XML node name in the source XML document.
Elements in XML choice groups will share the same number space, so a choice sequence will be numbered like this:
Title[1], Text[2], Title[3], Image[4]
- Returns:
- the index of this XML content node in the source document with special handling of elements in choice groups
- See Also:
-
getLocale
Returns the locale of this XML content value was generated for.- Returns:
- the locale of this XML content value was generated for
-
getMaxIndex
int getMaxIndex()Returns the total number of XML elements of this type that currently exist in the source document.- Returns:
- the total number of XML elements of this type that currently exist in the source document
-
getPath
Returns the path of this XML content value in the source document.- Returns:
- the path of this XML content value in the source document
-
getPlainText
Returns the value of this XML content node as a plain text String.Plain text in this context means a pure textual representation of the content (i.e. without html tags). The plain text may be
null
, too, if there is no sound or useful textual representation (i.e. color values).- Parameters:
cms
- an initialized instance of a CmsObject- Returns:
- the value of this XML content node as a plain text String
-
getSearchContentConfig
Returns the search content type for the value. Default implementation uses the historic isSearchable() method.- Returns:
- the search content type
-
getStringValue
Returns the value of this XML content node as a String.- Parameters:
cms
- an initialized instance of a CmsObject- Returns:
- the value of this XML content node as a String
-
getXmlIndex
int getXmlIndex()Returns the node index of this XML content value in the source XML document, starting with 0, based on the XML ordering.Elements in choice groups will be numbered like this:
Title[1], Text[1], Title[2], Image[1]
- Returns:
- the index of this XML content node in the source document with special handling of elements in choice groups
- See Also:
-
isSearchable
boolean isSearchable()Returnstrue
in case this value is searchable by default with the integrated full text search.- Returns:
true
in case this value is searchable by default
-
moveDown
void moveDown()Moves this XML content value one position down in the source document, if possible.If the XML content value is already the first in it's sequence, it is not moved.
-
moveUp
void moveUp()Moves this XML content value one position up in the source document, if possible.If the XML content value is already the last in it's sequence, it is not moved.
-
setStringValue
Sets the provided String as value of this XML content node.This method does provide processing of the content based on the users current OpenCms context. This can be used e.g. for link extraction and replacement in the content.
- Parameters:
cms
- an initialized instance of a CmsObjectvalue
- the value to set
-