|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.xml.content.CmsXmlContentValueSequence
public class CmsXmlContentValueSequence
Describes the sequence of XML content values of a specific type in an XML content instance.
Constructor Summary | |
---|---|
CmsXmlContentValueSequence(java.lang.String path,
I_CmsXmlSchemaType schemaType,
java.util.Locale locale,
CmsXmlContent content)
Generates a new content sequence element from the given type, content and content definition. |
Method Summary | |
---|---|
I_CmsXmlContentValue |
addValue(CmsObject cms,
int index)
Adds a value element of the sequence type at the selected index to the XML content document. |
int |
getElementCount()
Returns the count of XML content values for the selected schema type and locale in the XML content. |
java.lang.String |
getElementName()
Returns the XML element node name of this sequence element in the current schema. |
java.util.Locale |
getLocale()
Returns the locale this sequence is based on. |
int |
getMaxOccurs()
Returns the maximum occurrences of this type in the XML content schema. |
int |
getMinOccurs()
Returns the minimum occurrences of this type in the XML content schema. |
java.lang.String |
getPath()
Returns the (simplified) Xpath expression that identifies the root node of this content value sequence. |
I_CmsXmlContentValue |
getValue(int index)
Returns the XML content values from the index position of this sequence. |
java.util.List<I_CmsXmlContentValue> |
getValues()
Returns the list of XML content values for the selected schema type and locale in the XML content. |
I_CmsXmlSchemaType |
getXmlSchemaType()
Return the XML schema type of this sequence element. |
boolean |
isExtendable()
Returns true if more elements of this type can be added to the XML content. |
boolean |
isReducable()
Returns true if elements of this type can be removed from the XML content. |
boolean |
isSimpleType()
Returns true if this is a simple type, or false
if this type is a nested schema. |
void |
removeValue(int index)
Removes the value element of the sequence type at the selected index from XML content document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmsXmlContentValueSequence(java.lang.String path, I_CmsXmlSchemaType schemaType, java.util.Locale locale, CmsXmlContent content)
path
- the path in the document to generate the value sequence forschemaType
- the schema type to generate the sequence element forlocale
- the locale to get the content values fromcontent
- the XML content to generate the sequence element out ofMethod Detail |
---|
public I_CmsXmlContentValue addValue(CmsObject cms, int index)
cms
- the current users OpenCms contextindex
- the index where to add the new value element
CmsXmlContent.addValue(CmsObject, String, Locale, int)
public int getElementCount()
public java.lang.String getElementName()
The XML element node name can be configured in the schema.
For example, the node name could be "Title"
,
"Teaser"
or "Text"
. The XML schema controls
what node names are allowed.
I_CmsXmlSchemaType.getName()
public java.util.Locale getLocale()
public int getMaxOccurs()
I_CmsXmlSchemaType.getMaxOccurs()
public int getMinOccurs()
I_CmsXmlSchemaType.getMinOccurs()
public java.lang.String getPath()
public I_CmsXmlContentValue getValue(int index)
index
- the index position to get the value from
public java.util.List<I_CmsXmlContentValue> getValues()
getValue(int)
public I_CmsXmlSchemaType getXmlSchemaType()
public boolean isExtendable()
true
if more elements of this type can be added to the XML content.
true
if more elements of this type can be added to the XML contentpublic boolean isReducable()
true
if elements of this type can be removed from the XML content.
true
if elements of this type can be removed from the XML contentpublic boolean isSimpleType()
true
if this is a simple type, or false
if this type is a nested schema.
If a value is a nested schema, it must be an instance of CmsXmlNestedContentDefinition
.
CmsXmlNestedContentDefinition
public void removeValue(int index)
index
- the index where to remove the value elementCmsXmlContent.removeValue(String, Locale, int)
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |