Package org.opencms.xml.types
Class CmsXmlStringValue
java.lang.Object
org.opencms.xml.types.A_CmsXmlContentValue
org.opencms.xml.types.A_CmsXmlValueCdataBase
org.opencms.xml.types.CmsXmlStringValue
- All Implemented Interfaces:
Comparable<I_CmsXmlSchemaType>,I_CmsWidgetParameter,I_CmsXmlContentValue,I_CmsXmlSchemaType
Describes the XML content type "OpenCmsString".
- Since:
- 6.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencms.xml.types.I_CmsXmlContentValue
I_CmsXmlContentValue.CmsSearchContentConfig, I_CmsXmlContentValue.SearchContentType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of this type as used in the XML schema.Fields inherited from class org.opencms.xml.types.A_CmsXmlValueCdataBase
m_stringValueFields inherited from class org.opencms.xml.types.A_CmsXmlContentValue
m_defaultValue, m_document, m_element, m_locale, m_maxOccurs, m_minOccurs, m_nameFields inherited from interface org.opencms.xml.types.I_CmsXmlSchemaType
XSI_NAMESPACE, XSI_NAMESPACE_ATTRIBUTE_NO_SCHEMA_LOCATION -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new, empty schema type descriptor of type "OpenCmsString".CmsXmlStringValue(String name, String minOccurs, String maxOccurs) Creates a new schema type descriptor for the type "OpenCmsString".CmsXmlStringValue(I_CmsXmlDocument document, org.dom4j.Element element, Locale locale, I_CmsXmlSchemaType type) Creates a new XML content value of type "OpenCmsString". -
Method Summary
Modifier and TypeMethodDescriptioncreateValue(I_CmsXmlDocument document, org.dom4j.Element element, Locale locale) Creates a XML content value object for this type.Returns a String representation of the XML definition for this schema type.Returns the schema type name.newInstance(String name, String minOccurs, String maxOccurs) Creates a new instance of this XML schema type initialized with the given values.Methods inherited from class org.opencms.xml.types.A_CmsXmlValueCdataBase
getPlainText, getStringValue, setStringValueMethods inherited from class org.opencms.xml.types.A_CmsXmlContentValue
appendXmlSchema, compareTo, equals, generateXml, getChoiceMaxOccurs, getContentDefinition, getDefault, getDefault, getDocument, getElement, getId, getIndex, getKey, getLocale, getMaxIndex, getMaxOccurs, getMinOccurs, getName, getPath, getRelationType, getXmlIndex, hasError, hashCode, isChoiceOption, isChoiceType, isSearchable, isSimpleType, moveDown, moveUp, moveValue, readSchemaDefinition, setContentDefinition, setDefault, setKeyPrefix, toString, validateValueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opencms.xml.types.I_CmsXmlContentValue
getSearchContentConfig
-
Field Details
-
TYPE_NAME
The name of this type as used in the XML schema.- See Also:
-
-
Constructor Details
-
CmsXmlStringValue
public CmsXmlStringValue()Creates a new, empty schema type descriptor of type "OpenCmsString". -
CmsXmlStringValue
public CmsXmlStringValue(I_CmsXmlDocument document, org.dom4j.Element element, Locale locale, I_CmsXmlSchemaType type) Creates a new XML content value of type "OpenCmsString".- Parameters:
document- the XML content instance this value belongs toelement- the XML element that contains this valuelocale- the locale this value is created fortype- the type instance to create the value for
-
CmsXmlStringValue
Creates a new schema type descriptor for the type "OpenCmsString".- Parameters:
name- the name of the XML node containing the value according to the XML schemaminOccurs- minimum number of occurrences of this type according to the XML schemamaxOccurs- maximum number of occurrences of this type according to the XML schema
-
-
Method Details
-
createValue
public I_CmsXmlContentValue createValue(I_CmsXmlDocument document, org.dom4j.Element element, Locale locale) Description copied from interface:I_CmsXmlSchemaTypeCreates a XML content value object for this type.- Parameters:
document- the XML content instance this value belongs toelement- the XML element to create the value fromlocale- the locale to create the value for- Returns:
- the created XML content value object
- See Also:
-
getSchemaDefinition
Description copied from interface:I_CmsXmlSchemaTypeReturns a String representation of the XML definition for this schema type.- Returns:
- a String representation of the XML definition for this schema type
- See Also:
-
getTypeName
Description copied from interface:I_CmsXmlSchemaTypeReturns the schema type name.By convention, a XML schema type name has the form
"OpenCms + ${name}". Examples are"OpenCmsString"or"OpenCmsBoolean".The schema type name is fixed by the implementation.
- Returns:
- the schema type name
- See Also:
-
newInstance
Description copied from interface:I_CmsXmlSchemaTypeCreates a new instance of this XML schema type initialized with the given values.- Parameters:
name- the name to use in the xml documentminOccurs- minimum number of occurrencesmaxOccurs- maximum number of occurrences- Returns:
- a new instance of this XML content type initialized with the given values
- See Also:
-