Package org.geotools.xml.schema.impl
Class ChoiceGT
- Object
-
- ChoiceGT
-
- All Implemented Interfaces:
Choice
,ElementGrouping
public class ChoiceGT extends Object implements Choice
- Author:
- dzwiers
-
-
Constructor Summary
Constructors Constructor Description ChoiceGT(String id, int min, int max, ElementGrouping[] children)
Creates a new ChoiceGT object.ChoiceGT(ElementGrouping[] children)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Element
findChildElement(String name)
Convinience method which will search for the specified element within it's children.Element
findChildElement(String localName, URI namespaceURI)
ElementGrouping[]
getChildren()
This method returns a list of children which repreensts the options for the element which this choice is representing in an XML Schema.int
getGrouping()
Returns the mask informing the caller as to the type of object they are dealing with.String
getId()
The Schema ID for this choice definition.int
getMaxOccurs()
returns the max number of allowable occurences within the xml schema for this construct.int
getMinOccurs()
returns the min number of allowable occurences within the xml schema for this construct.
-
-
-
Constructor Detail
-
ChoiceGT
public ChoiceGT(String id, int min, int max, ElementGrouping[] children)
Creates a new ChoiceGT object.
-
ChoiceGT
public ChoiceGT(ElementGrouping[] children)
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:Choice
The Schema ID for this choice definition.- Specified by:
getId
in interfaceChoice
- See Also:
Choice.getId()
-
getMaxOccurs
public int getMaxOccurs()
Description copied from interface:ElementGrouping
returns the max number of allowable occurences within the xml schema for this construct.- Specified by:
getMaxOccurs
in interfaceChoice
- Specified by:
getMaxOccurs
in interfaceElementGrouping
- See Also:
ElementGrouping.getMaxOccurs()
-
getMinOccurs
public int getMinOccurs()
Description copied from interface:ElementGrouping
returns the min number of allowable occurences within the xml schema for this construct.- Specified by:
getMinOccurs
in interfaceChoice
- Specified by:
getMinOccurs
in interfaceElementGrouping
- See Also:
ElementGrouping.getMinOccurs()
-
getChildren
public ElementGrouping[] getChildren()
Description copied from interface:Choice
This method returns a list of children which repreensts the options for the element which this choice is representing in an XML Schema. Although the list is semantically a set, we encourage you to add elements to the list as they apear, to allow Schema writers to optimize the search order.- Specified by:
getChildren
in interfaceChoice
- See Also:
Choice.getChildren()
-
getGrouping
public int getGrouping()
Description copied from interface:ElementGrouping
Returns the mask informing the caller as to the type of object they are dealing with.- Specified by:
getGrouping
in interfaceElementGrouping
- See Also:
ElementGrouping.getGrouping()
-
findChildElement
public Element findChildElement(String name)
Description copied from interface:ElementGrouping
Convinience method which will search for the specified element within it's children. This is typically implemented recursively, and as such may be expensive to execute (so don't call me too much if you want to be fast).- Specified by:
findChildElement
in interfaceElementGrouping
- Parameters:
name
- The Element LocalName (namespace and prefix should not be included)- Returns:
- Element or null if not found.
- See Also:
ElementGrouping.findChildElement(java.lang.String)
-
findChildElement
public Element findChildElement(String localName, URI namespaceURI)
- Specified by:
findChildElement
in interfaceElementGrouping
-
-