deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.framework.xml.schema
Class ElementDeclaration

java.lang.Object
  extended by org.deegree.framework.xml.schema.ElementDeclaration
Direct Known Subclasses:
MappedElementDeclaration

public class ElementDeclaration
extends java.lang.Object

Represents an XML element declaration in an XMLSchema.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Markus Schneider , last edited by: $Author: mschneider $

Constructor Summary
ElementDeclaration(QualifiedName name, boolean isAbstract, TypeReference type, int minOccurs, int maxOccurs, QualifiedName substitutionGroup)
          Creates a new ElementDeclaration instance from the given parameters.
 
Method Summary
 int getMaxOccurs()
          Returns the maximum number of occurences of the element.
 int getMinOccurs()
          Returns the minimum number of occurences of the element.
 QualifiedName getName()
          Returns the qualified name of the declared XML element.
 ElementReference getSubstitutionGroup()
          Returns an ElementReference which the element may be substituted for.
 TypeReference getType()
          Returns a TypeReference that describes the content of the element.
 boolean isAbstract()
          Returns whether the element is declared abstract.
 boolean isSubstitutionFor(QualifiedName substitutionName)
          Returns whether this element is substitutable for the given element name.
 java.lang.String toString(java.lang.String indent)
          Returns a string representation of the object (indented for better readablity, as this is part of a hierarchical structure).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementDeclaration

public ElementDeclaration(QualifiedName name,
                          boolean isAbstract,
                          TypeReference type,
                          int minOccurs,
                          int maxOccurs,
                          QualifiedName substitutionGroup)
Creates a new ElementDeclaration instance from the given parameters.

Parameters:
name -
isAbstract -
type -
minOccurs -
maxOccurs -
substitutionGroup -
Method Detail

getName

public QualifiedName getName()
Returns the qualified name of the declared XML element.

Returns:
the qualified name of the declared XML element

isAbstract

public boolean isAbstract()
Returns whether the element is declared abstract.

Returns:
true, if the element is abstract, false otherwise

getType

public TypeReference getType()
Returns a TypeReference that describes the content of the element.

Returns:
a TypeReference that describes the content of the element

getMinOccurs

public int getMinOccurs()
Returns the minimum number of occurences of the element.

Returns:
the minimum number of occurences of the element, -1 if it is unconstrained

getMaxOccurs

public int getMaxOccurs()
Returns the maximum number of occurences of the element.

Returns:
the maximum number of occurences of the element, -1 if it is unconstrained

getSubstitutionGroup

public ElementReference getSubstitutionGroup()
Returns an ElementReference which the element may be substituted for.

Returns:
an ElementReference which the element may be substituted for

isSubstitutionFor

public boolean isSubstitutionFor(QualifiedName substitutionName)
Returns whether this element is substitutable for the given element name.

This is true if the substitutionGroup equals the given element name, or if an element that this element is substitutable for may be substituted for the given element name.

Parameters:
substitutionName -
Returns:
true, if this element declaration is a valid substiution for elements with the given name

toString

public java.lang.String toString(java.lang.String indent)
Returns a string representation of the object (indented for better readablity, as this is part of a hierarchical structure).

Parameters:
indent - current indentation (as a whitespace string)
Returns:
an indented string representation of the object

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org