|
||||||||
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(String path,
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,
I_CmsXmlSchemaType type,
int index)
Adds a value element of the given type at the selected index to the XML content document. |
I_CmsXmlContentValue |
addValue(CmsObject cms,
int index)
Adds a value element of the type the original xpath indicates at the selected index to the XML content document. |
I_CmsXmlContentValue |
addValue(CmsObject cms,
String xpath,
int index)
Adds a value element of the type indicated by the given xpath 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. |
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. |
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. |
List<I_CmsXmlContentValue> |
getValues()
Returns the list of XML content values for the selected schema type and locale in the XML content. |
boolean |
isChoiceSequence()
Returns true if this sequence represents a choice sequence. |
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(String path, Locale locale, CmsXmlContent content)
path
- the path in the document to generate the value sequence 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, I_CmsXmlSchemaType type, int index)
cms
- the current users OpenCms contexttype
- the type to addindex
- the index where to add the new value element
CmsXmlContent.addValue(CmsObject, String, Locale, int)
,
addValue(CmsObject, String, int)
,
addValue(CmsObject, int)
public I_CmsXmlContentValue addValue(CmsObject cms, int index)
The "original xpath" is the path used in the constructor when creating this value sequence.
cms
- the current users OpenCms contextindex
- the index where to add the new value element
CmsXmlContent.addValue(CmsObject, String, Locale, int)
,
addValue(CmsObject, String, int)
,
addValue(CmsObject, I_CmsXmlSchemaType, int)
public I_CmsXmlContentValue addValue(CmsObject cms, String xpath, int index)
cms
- the current users OpenCms contextxpath
- the path that indicates the element type in the content definitionindex
- the index where to add the new value element
CmsXmlContent.addValue(CmsObject, String, Locale, int)
,
addValue(CmsObject, I_CmsXmlSchemaType, int)
,
addValue(CmsObject, int)
public int getElementCount()
public Locale getLocale()
public int getMaxOccurs()
I_CmsXmlSchemaType.getMaxOccurs()
public int getMinOccurs()
I_CmsXmlSchemaType.getMinOccurs()
public String getPath()
public I_CmsXmlContentValue getValue(int index)
index
- the index position to get the value from
public List<I_CmsXmlContentValue> getValues()
getValue(int)
public boolean isChoiceSequence()
true
if this sequence represents a choice sequence.
true
if this sequence represents a choice sequencepublic 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 |