Class SchemaElementDefinition
SchemaElementDefinition are returned by Service
objects and Operation
objects
to define the content of requests, replies and events. The SchemaTypeDefinition
returned
by typeDefinition()
may itself return SchemaElementDefinition
objects when the schema contains complex items. SchemaElementDefinition objects are read-only and
always created by the API, never by the application. The SchemaElementDefinition defines the
symbolic name any constraints on this item and the SchemaTypeDefinition which represents
instances of this item.
An item which is optional in the schema has minValues()
== 0.
An item which is mandatory in the schema has minValues()
>= 1.
An item which is a single value has maxValues()
== 1.
An item which is an array has maxValues()
> 1.
An item which is an unbounded array has maxValues()
== UNBOUNDED
.
As well as the symbolic name, array constraints and other constraints this class also provides access to the description and status of the item.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Indicates that an array element has an unbounded number of values -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract ConstraintsList
abstract String
Return a String containing a human readable description of this itemabstract Name
getAlternateName
(int index) Return the alternate name for this item at the specified indexabstract int
Return the maximum number of occurences of the this item.abstract int
Return the minimum number of occurences of this item.abstract Name
name()
Return the name of this itemabstract int
Return the number of alternate names for this itemabstract void
setUserData
(Object userData) Set the user data associated with this object to the specified userData.abstract Schema.Status
status()
Return the status of this SchemaElementDefinitionabstract SchemaTypeDefinition
Return the SchemaTypeDefinition of this itemabstract Object
userData()
Return the user data associated with this ElementDefinition
-
Field Details
-
UNBOUNDED
public static final int UNBOUNDEDIndicates that an array element has an unbounded number of values- See Also:
-
-
Constructor Details
-
SchemaElementDefinition
public SchemaElementDefinition()
-
-
Method Details
-
setUserData
Set the user data associated with this object to the specified userData. -
name
Return the name of this item -
numAlternateNames
public abstract int numAlternateNames()Return the number of alternate names for this item -
getAlternateName
Return the alternate name for this item at the specified index- Throws:
IndexOutOfBoundsException
- if index >=numAlternateNames()
-
description
Return a String containing a human readable description of this item -
status
Return the status of this SchemaElementDefinition -
typeDefinition
Return the SchemaTypeDefinition of this item -
minValues
public abstract int minValues()Return the minimum number of occurences of this item. This value is always >= 0. -
maxValues
public abstract int maxValues()Return the maximum number of occurences of the this item. This value may be UNBOUNDED (-1) or any value >= 1. -
constraints
-
userData
Return the user data associated with this ElementDefinition
-