Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.framework.xml.schema
Class ElementDeclaration

    java.lang.Object
      org.deegree.framework.xml.schema.ElementDeclaration

Direct Known Subclasses:
  MappedElementDeclaration

    public class ElementDeclaration

extends 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.
`String` | `toString(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 String toString(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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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