Package org.exolab.castor.builder.info
Class GroupInfo
java.lang.Object
org.exolab.castor.builder.info.GroupInfo
A class to hold group information.
- Version:
- $Revision: 6665 $ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $
- Author:
- Keith Visco
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The compositor value that indicates that all fields are required, but order is not important.static final int
The compositor value that indicates that only one field may be present.static final int
The compositor value that indicates that all fields are required and order is important. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the maximum occurance for this group.int
Returns the minimum occurance for this group.boolean
isChoice()
Returns true if the compositor of this GroupInfo is a choice.boolean
Return whether or not the object described by this XMLInfo is multi-valued (appears more than once in the XML document).boolean
Return true if the XML object described by this GroupInfo must appear at least once in the XML document (or object model).boolean
Returns true if the compositor of this GroupInfo is a sequence.void
setAsAll()
Sets the compositor for the fields of this group to be "all".void
Sets the compositor for the fields of this group to be a choice.void
Sets the compositor for the fields of this group to be a sequence.void
setMaxOccurs
(int maxOccurs) Sets the maximum occurance for this group.void
setMinOccurs
(int minOccurs) Sets the minimum occurrence for this group.void
setMultivalued
(boolean multivalued) Sets whether the XML object can appear more than once in the XML document.void
setRequired
(boolean required) Sets whether or not the XML object must appear at least once.
-
Field Details
-
ALL
public static final int ALLThe compositor value that indicates that all fields are required, but order is not important. default- See Also:
-
CHOICE
public static final int CHOICEThe compositor value that indicates that only one field may be present.- See Also:
-
SEQUENCE
public static final int SEQUENCEThe compositor value that indicates that all fields are required and order is important.- See Also:
-
-
Constructor Details
-
GroupInfo
public GroupInfo()Creates a new GroupInfo.
-
-
Method Details
-
getMaxOccurs
public int getMaxOccurs()Returns the maximum occurance for this group.- Returns:
- the maximum occurance for this group.
-
getMinOccurs
public int getMinOccurs()Returns the minimum occurance for this group.- Returns:
- the minimum occurance for this group.
-
isMultivalued
public boolean isMultivalued()Return whether or not the object described by this XMLInfo is multi-valued (appears more than once in the XML document).- Returns:
- true if this object can appear more than once.
-
isRequired
public boolean isRequired()Return true if the XML object described by this GroupInfo must appear at least once in the XML document (or object model).- Returns:
- true if the XML object must appear at least once.
-
isChoice
public boolean isChoice()Returns true if the compositor of this GroupInfo is a choice.- Returns:
- true if the compositor of this GroupInfo is a choice.
-
isSequence
public boolean isSequence()Returns true if the compositor of this GroupInfo is a sequence.- Returns:
- true if the compositor of this GroupInfo is a sequence.
-
setAsAll
public void setAsAll()Sets the compositor for the fields of this group to be "all". -
setAsChoice
public void setAsChoice()Sets the compositor for the fields of this group to be a choice. -
setAsSequence
public void setAsSequence()Sets the compositor for the fields of this group to be a sequence. -
setMaxOccurs
public void setMaxOccurs(int maxOccurs) Sets the maximum occurance for this group.- Parameters:
maxOccurs
- the maximum occurance this group must appear
-
setMinOccurs
public void setMinOccurs(int minOccurs) Sets the minimum occurrence for this group.- Parameters:
minOccurs
- the minimum occurance this group must appear
-
setMultivalued
public void setMultivalued(boolean multivalued) Sets whether the XML object can appear more than once in the XML document.- Parameters:
multivalued
- the boolean indicating whether or not the object can appear more than once
-
setRequired
public void setRequired(boolean required) Sets whether or not the XML object must appear at least once.- Parameters:
required
- the flag indicating whether or not this XML object is required
-