|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencms.xml.types.A_CmsXmlContentValue
org.opencms.xml.types.A_CmsXmlValueTextBase
org.opencms.xml.types.CmsXmlColorValue
public class CmsXmlColorValue
Describes the XML content type "OpenCmsColor".
| Field Summary | |
|---|---|
static String |
TYPE_NAME
The name of this type as used in the XML schema. |
static String |
TYPE_RULE
The validation rule used for this schema type. |
| Fields inherited from class org.opencms.xml.types.A_CmsXmlValueTextBase |
|---|
m_stringValue |
| Fields inherited from class org.opencms.xml.types.A_CmsXmlContentValue |
|---|
m_defaultValue, m_document, m_element, m_locale, m_maxOccurs, m_minOccurs, m_name |
| Fields inherited from interface org.opencms.xml.types.I_CmsXmlSchemaType |
|---|
XSI_NAMESPACE, XSI_NAMESPACE_ATTRIBUTE_NO_SCHEMA_LOCATION |
| Constructor Summary | |
|---|---|
CmsXmlColorValue()
Creates a new, empty schema type descriptor of type "OpenCmsColor". |
|
CmsXmlColorValue(I_CmsXmlDocument document,
Element element,
Locale locale,
I_CmsXmlSchemaType type)
Creates a new XML content value of type "OpenCmsColor". |
|
CmsXmlColorValue(String name,
String minOccurs,
String maxOccurs)
Creates a new schema type descriptor for the type "OpenCmsColor". |
|
| Method Summary | |
|---|---|
I_CmsXmlContentValue |
createValue(I_CmsXmlDocument document,
Element element,
Locale locale)
Creates a XML content value object for this type. |
String |
getDefault(Locale locale)
Returns the default value for a node of this type in the current schema. |
String |
getSchemaDefinition()
Returns a String representation of the XML definition for this schema type. |
String |
getTypeName()
Returns the schema type name. |
I_CmsXmlSchemaType |
newInstance(String name,
String minOccurs,
String maxOccurs)
Creates a new instance of this XML schema type initialized with the given values. |
boolean |
validateValue(String value)
Checks if a given value is valid according to the validation rule (regular expression) used for validation of this schema type in the XML schema. |
| Methods inherited from class org.opencms.xml.types.A_CmsXmlValueTextBase |
|---|
getStringValue, setStringValue |
| Methods inherited from class org.opencms.xml.types.A_CmsXmlContentValue |
|---|
appendXmlSchema, compareTo, equals, generateXml, getContentDefinition, getDefault, getDocument, getElement, getId, getIndex, getKey, getLocale, getMaxIndex, getMaxOccurs, getMinOccurs, getName, getPath, getPlainText, hasError, hashCode, isSimpleType, moveDown, moveUp, moveValue, readSchemaDefinition, setContentDefinition, setDefault, setKeyPrefix, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String TYPE_NAME
public static final String TYPE_RULE
| Constructor Detail |
|---|
public CmsXmlColorValue()
public CmsXmlColorValue(I_CmsXmlDocument document,
Element element,
Locale locale,
I_CmsXmlSchemaType type)
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
public CmsXmlColorValue(String name,
String minOccurs,
String maxOccurs)
name - the name of the XML node containing the value according to the XML schemaminOccurs - minimum number of occurences of this type according to the XML schemamaxOccurs - maximum number of occurences of this type according to the XML schema| Method Detail |
|---|
public I_CmsXmlContentValue createValue(I_CmsXmlDocument document,
Element element,
Locale locale)
I_CmsXmlSchemaType
document - the XML content instance this value belongs toelement - the XML element to create the value fromlocale - the locale to create the value for
I_CmsXmlSchemaType.createValue(I_CmsXmlDocument, org.dom4j.Element, Locale)public String getDefault(Locale locale)
I_CmsXmlSchemaType
getDefault in interface I_CmsXmlSchemaTypegetDefault in class A_CmsXmlContentValuelocale - the locale to generate the default value for
A_CmsXmlContentValue.getDefault(Locale)public String getSchemaDefinition()
I_CmsXmlSchemaType
I_CmsXmlSchemaType.getSchemaDefinition()public String getTypeName()
I_CmsXmlSchemaType
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.
I_CmsXmlSchemaType.getTypeName()
public I_CmsXmlSchemaType newInstance(String name,
String minOccurs,
String maxOccurs)
I_CmsXmlSchemaType
name - the name to use in the xml documentminOccurs - minimum number of occurencesmaxOccurs - maximum number of occurences
I_CmsXmlSchemaType.newInstance(java.lang.String, java.lang.String, java.lang.String)public boolean validateValue(String value)
I_CmsXmlSchemaType
To have a more refined validation according to the special requirements of the
content type, use custom validation rules in the appinfo which are
processed with I_CmsXmlContentHandler.resolveValidation(CmsObject, I_CmsXmlContentValue, org.opencms.xml.content.CmsXmlContentErrorHandler).
validateValue in interface I_CmsXmlSchemaTypevalidateValue in class A_CmsXmlContentValuevalue - the value to validate
I_CmsXmlSchemaType.validateValue(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||