com.virtualweaver.xotics.datamodel
Interface XoContentModel


public interface XoContentModel

XoContentModel represents the unique node to describe a content-model tree. It permits to an XoContainer to build its content-model description. This interface is also used by core system to build static content-model from description in DMDL documents. XoContentModel can fall in three categories :

XoContentModel object is created by XoUtilities

Version:
4.1
See Also:
XoContainer, XoUtilities

Method Summary
 void addSubContentModel(XoContentModel cm)
          Append a Content-Model node to the list of children nodes
 byte getCmType()
          cmType is the type of Content-Model node.
 java.lang.String getElementRef()
          elementRef is the local name of an XML element.
 java.lang.String getElementType()
          elementType is an identifier to distinguish a particular XML element implementation.
 int getMaxOccurs()
          maxOccurs represents the maximum occurrence.
 int getMinOccurs()
          minOccurs represents the minimum occurrence.
 java.lang.String getNsRef()
          nsRef is the namespace of an XML element.
 XoContentModel[] getSubContentModel()
          Returns the list of Content-Model children nodes.
 XoContentModel getSubContentModel(int index)
          Returns the Content-Model child node at index param
 void setCmType(byte cmType)
          cmType is the type of Content-Model node.
 void setElementRef(java.lang.String elementRef)
          elementRef is the local name of an XML element.
 void setElementType(java.lang.String elementType)
          elementType is an identifier to distinguish a particular XML element implementation.
 void setMaxOccurs(int maxOccurs)
          maxOccurs represents the maximum occurrence.
 void setMinOccurs(int minOccurs)
          minOccurs represents the minimum occurrence.
 void setNsRef(java.lang.String nsRef)
          nsRef is the namespace of an XML element.
 

Method Detail

getMinOccurs

public int getMinOccurs()
minOccurs represents the minimum occurrence.

Returns:
value of property minOccurs.

setMinOccurs

public void setMinOccurs(int minOccurs)
                  throws java.beans.PropertyVetoException
minOccurs represents the minimum occurrence.

Parameters:
minOccurs - new value of property minOccurs.
Throws:
java.beans.PropertyVetoException

getMaxOccurs

public int getMaxOccurs()
maxOccurs represents the maximum occurrence.

Returns:
value of property maxOccurs.

setMaxOccurs

public void setMaxOccurs(int maxOccurs)
                  throws java.beans.PropertyVetoException
maxOccurs represents the maximum occurrence.

Parameters:
maxOccurs - new value of property maxOccurs.
Throws:
java.beans.PropertyVetoException

getCmType

public byte getCmType()
cmType is the type of Content-Model node. Possible values are :

Returns:
value of property cmType.

setCmType

public void setCmType(byte cmType)
               throws java.beans.PropertyVetoException
cmType is the type of Content-Model node. Possible values are :

Parameters:
cmType - new cmType value.
Throws:
java.beans.PropertyVetoException

getElementType

public java.lang.String getElementType()
elementType is an identifier to distinguish a particular XML element implementation.

Returns:
value of property elementType.

setElementType

public void setElementType(java.lang.String elementType)
                    throws java.beans.PropertyVetoException
elementType is an identifier to distinguish a particular XML element implementation.

Parameters:
elementType - new value of property elementType.
Throws:
java.beans.PropertyVetoException

getElementRef

public java.lang.String getElementRef()
elementRef is the local name of an XML element.

Returns:
value of property elementRef.

setElementRef

public void setElementRef(java.lang.String elementRef)
                   throws java.beans.PropertyVetoException
elementRef is the local name of an XML element.

Parameters:
elementRef - new value of property elementRef.
Throws:
java.beans.PropertyVetoException

getNsRef

public java.lang.String getNsRef()
nsRef is the namespace of an XML element.

Returns:
value of property nsRef.

setNsRef

public void setNsRef(java.lang.String nsRef)
              throws java.beans.PropertyVetoException
nsRef is the namespace of an XML element.

Parameters:
nsRef - new value of property nsRef.
Throws:
java.beans.PropertyVetoException

getSubContentModel

public XoContentModel getSubContentModel(int index)
                                  throws java.lang.ArrayIndexOutOfBoundsException
Returns the Content-Model child node at index param

Parameters:
index - index of the child node.
Returns:
child node
Throws:
java.lang.ArrayIndexOutOfBoundsException - if index is invalid

getSubContentModel

public XoContentModel[] getSubContentModel()
Returns the list of Content-Model children nodes.

Returns:
an array of all Content-Model children

addSubContentModel

public void addSubContentModel(XoContentModel cm)
Append a Content-Model node to the list of children nodes

Parameters:
cm - sub Content-Model to append