public class CmsType extends java.lang.Object implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CHOICE_ATTRIBUTE_NAME
The choice attribute name.
|
| Modifier | Constructor and Description |
|---|---|
protected |
CmsType()
Constructor.
|
|
CmsType(java.lang.String id)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(java.lang.String attributeName,
CmsType attributeType,
int minOccurrence,
int maxOccurrence)
Adds an attribute to the type.
|
int |
getAttributeMaxOccurrence(java.lang.String attributeName)
Returns the maximum occurrence of the given attribute.
|
int |
getAttributeMinOccurrence(java.lang.String attributeName)
Returns the minimum occurrence of the given attribute.
|
java.util.List<java.lang.String> |
getAttributeNames()
The names of the attributes of this type.
|
CmsType |
getAttributeType(java.lang.String attributeName)
Returns the type of the given attribute.
|
java.lang.String |
getAttributeTypeName(java.lang.String attributeName)
Returns the type name of the given attribute.
|
int |
getChoiceMaxOccurrence()
Returns the maximum choice occurrence.
|
java.lang.String |
getId()
Returns the name of the type.
|
boolean |
isChoice()
Returns if this is a choice type.
|
boolean |
isSimpleType()
Returns if this is a simple type.
|
void |
setChoiceMaxOccurrence(int choiceMaxOccurrence)
Sets the maximum choice occurrence.
|
public static final java.lang.String CHOICE_ATTRIBUTE_NAME
public CmsType(java.lang.String id)
id - the type id/nameprotected CmsType()
public void addAttribute(java.lang.String attributeName, CmsType attributeType, int minOccurrence, int maxOccurrence)
attributeName - the attribute nameattributeType - the attribute typeminOccurrence - the minimum occurrence of this attributemaxOccurrence - the axnimum occurrence of this attributepublic int getAttributeMaxOccurrence(java.lang.String attributeName)
attributeName - the attribute namepublic int getAttributeMinOccurrence(java.lang.String attributeName)
attributeName - the attribute namepublic java.util.List<java.lang.String> getAttributeNames()
public CmsType getAttributeType(java.lang.String attributeName)
attributeName - the attribute namepublic java.lang.String getAttributeTypeName(java.lang.String attributeName)
attributeName - the attribute namepublic int getChoiceMaxOccurrence()
public java.lang.String getId()
public boolean isChoice()
true if this is a choice typepublic boolean isSimpleType()
true if this is a simple typepublic void setChoiceMaxOccurrence(int choiceMaxOccurrence)
choiceMaxOccurrence - the maximum choice occurrence