Package org.eclipse.xsd

This provides an API for the XML Schema Standard Part 1 and Part 2; for differences between the current version of the API and the previous version of the API, please see the Appendix.

See:
          Description

Interface Summary
XSDAnnotation A representation of the model object 'Annotation'.
XSDAttributeDeclaration A representation of the model object 'Attribute Declaration'
XSDAttributeGroupContent A representation of the model object 'Attribute Group Content'.
XSDAttributeGroupDefinition A representation of the model object 'Attribute Group Definition'
XSDAttributeUse A representation of the model object 'Attribute Use'
XSDBoundedFacet A representation of the model object 'Bounded Facet'
XSDCardinalityFacet A representation of the model object 'Cardinality Facet'
XSDComplexTypeContent A representation of the model object 'Complex Type Content'.
XSDComplexTypeDefinition A representation of the model object 'Complex Type Definition'
XSDComponent A representation of the model object 'Component'.
XSDConcreteComponent A representation of the model object 'Concrete Component'.
XSDConstrainingFacet A representation of the model object 'Constraining Facet'
XSDDiagnostic A representation of the model object 'Diagnostic'.
XSDElementDeclaration A representation of the model object 'Element Declaration'
XSDEnumerationFacet A representation of the model object 'Enumeration Facet'
XSDFacet A representation of the model object 'Facet'
XSDFactory The Factory for the model.
XSDFeature A representation of the model object 'Feature'.
XSDFixedFacet A representation of the model object 'Fixed Facet'
XSDFractionDigitsFacet A representation of the model object 'Fraction Digits Facet'
XSDFundamentalFacet A representation of the model object 'Fundamental Facet'
XSDIdentityConstraintDefinition A representation of the model object 'Identity Constraint Definition'
XSDImport A representation of the model object 'Import'
XSDInclude A representation of the model object 'Include'
XSDLengthFacet A representation of the model object 'Length Facet'
XSDMaxExclusiveFacet A representation of the model object 'Max Exclusive Facet'
XSDMaxFacet A representation of the model object 'Max Facet'.
XSDMaxInclusiveFacet A representation of the model object 'Max Inclusive Facet'
XSDMaxLengthFacet A representation of the model object 'Max Length Facet'
XSDMinExclusiveFacet A representation of the model object 'Min Exclusive Facet'
XSDMinFacet A representation of the model object 'Min Facet'.
XSDMinInclusiveFacet A representation of the model object 'Min Inclusive Facet'
XSDMinLengthFacet A representation of the model object 'Min Length Facet'
XSDModelGroup A representation of the model object 'Model Group'
XSDModelGroupDefinition A representation of the model object 'Model Group Definition'
XSDNamedComponent A representation of the model object 'Named Component'.
XSDNotationDeclaration A representation of the model object 'Notation Declaration'
XSDNumericFacet A representation of the model object 'Numeric Facet'
XSDOrderedFacet A representation of the model object 'Ordered Facet'
XSDPackage The Package for the model.
XSDPackage.Literals Defines literals for the meta objects that represent each class, each feature of each class, each enum, and each data type
XSDParticle A representation of the model object 'Particle'
XSDParticle.DFA A deterministic finite state automaton as described for 'Unique Particle Attribution'.
XSDParticle.DFA.State A state of a deterministic finite state automaton.
XSDParticle.DFA.Transition A transition of a deterministic finite state automaton.
XSDParticleContent A representation of the model object 'Particle Content'.
XSDPatternFacet A representation of the model object 'Pattern Facet'
XSDRedefinableComponent A representation of the model object 'Redefinable Component'.
XSDRedefine A representation of the model object 'Redefine'
XSDRedefineContent A representation of the model object 'Redefine Content'.
XSDRepeatableFacet A representation of the model object 'Repeatable Facet'.
XSDSchema A representation of the model object 'Schema'
XSDSchemaCompositor A representation of the model object 'Schema Compositor'.
XSDSchemaContent A representation of the model object 'Schema Content'.
XSDSchemaDirective A representation of the model object 'Schema Directive'.
XSDScope A representation of the model object 'Scope'.
XSDSimpleTypeDefinition A representation of the model object 'Simple Type Definition'.
XSDSimpleTypeDefinition.Assessment Information gathered during the assessment a literal with respect to a 'Simple Type Definition'.
XSDTerm A representation of the model object 'Term'.
XSDTotalDigitsFacet A representation of the model object 'Total Digits Facet'
XSDTypeDefinition A representation of the model object 'Type Definition'.
XSDWhiteSpaceFacet A representation of the model object 'White Space Facet'
XSDWildcard A representation of the model object 'Wildcards'
XSDXPathDefinition A representation of the model object 'XPath Definition'.
 

Class Summary
XSDPlugin The Plugin for the model.
XSDPlugin.Implementation The actual implementation of the Eclipse Plugin.
XSDPlugin.StringComparator A comparator for strings which does collation specific to the current locale by default.
XSDPlugin.UnicodeStringComparator A comparator for strings which does collation based simply on unicode values.
 

Enum Summary
XSDAttributeUseCategory A representation of the literals of the enumeration 'Attribute Use Category'.
XSDCardinality A representation of the literals of the enumeration 'Cardinality'.
XSDComplexFinal A representation of the literals of the enumeration 'Complex Final'.
XSDCompositor A representation of the literals of the enumeration 'Compositor'.
XSDConstraint A representation of the literals of the enumeration 'Constraint'.
XSDContentTypeCategory A representation of the literals of the enumeration 'Content Type Category'.
XSDDerivationMethod A representation of the literals of the enumeration 'Derivation Method'.
XSDDiagnosticSeverity A representation of the literals of the enumeration 'Diagnostic Severity'.
XSDDisallowedSubstitutions A representation of the literals of the enumeration 'Disallowed Substitutions'.
XSDForm A representation of the literals of the enumeration 'Form'.
XSDIdentityConstraintCategory A representation of the literals of the enumeration 'Identity Constraint Category'.
XSDNamespaceConstraintCategory A representation of the literals of the enumeration 'Namespace Constraint Category'.
XSDOrdered A representation of the literals of the enumeration 'Ordered'.
XSDProcessContents A representation of the literals of the enumeration 'Process Contents'.
XSDProhibitedSubstitutions A representation of the literals of the enumeration 'Prohibited Substitutions'.
XSDSimpleFinal A representation of the literals of the enumeration 'Simple Final'.
XSDSubstitutionGroupExclusions A representation of the literals of the enumeration 'Substitution Group Exclusions'.
XSDVariety A representation of the literals of the enumeration 'Variety'.
XSDWhiteSpace A representation of the literals of the enumeration 'White Space'.
XSDXPathVariety A representation of the literals of the enumeration 'XPath Variety'.
 

Package org.eclipse.xsd Description

This provides an API for the XML Schema Standard Part 1 and Part 2; for differences between the current version of the API and the previous version of the API, please see the Appendix.

Abstract XML Schema Components Part 1

The abstract XML Schema Components, as described in Part 1 of the Standard, are related according to this hierarchy:

Diagram of the Abstract Schema Component Hierarchy

In this UML notation, each feature (i.e., each relation or attribute) Xyz in a diagram, corresponds to a getXyz method in Java for accessing that feature. If the feature is many-valued, the getXyz method yields a list, which can be modified directly using standard Java List API; otherwise a corresponding setXyz method is available for modification. A relation with a black diamond corresponds to a containment relation; these form the basis for the concrete tree structure of the model. A relation with a white diamond corresponds to a shared psuedo-containment relation; it is used only for documentation purposes since it is not logically different from a relation with no diamond. In general, the white diamond relations represent relations defined directly in the XML Schema specification. They are typically computed from other relations and hence should not be modified directly. The exception to this rule are relations involving types, e.g., base-type, member-type, item-type, and element- or attribute-type.

Throughout this Javadoc, the distinction between methods that support the abstract features representing concepts defined in the XML Schema specification verses methods that support the concrete features representing the syntactic structure of the XML serialization, will be carefully emphasized. The former support read-only analysis whereas the later support editing.

The abstract XML Schema Components have the following defined relations:

Diagram of the Abstract Schema Component Relations

This is very similar to the standard non-normative Schema Components Diagram.

The abstract XML Schema Components have the following defined attributes:

Diagram of the Abstract Schema Component Attributes

Abstract XML Schema Components Part 2

The abstract XML Schema Components, as described in Part 2 of the Standard, are related according to this hierarchy with these defined relations and attributes:

Diagram of the Abstract Schema Components for Part 2

Abstract XML Schema Annotations

The abstract XML Schema Components, as described in Part 1 and Part 2 of the Standard, are annotated as follows:

Diagram of the Abstract Schema Component Annotations

Concrete XML Schema Components

The set of abstract XML Schema Components is extended to represent the concrete syntax as follows:

Diagram of the Concrete Schema Components

The concrete attributes are represented as follows:

Diagram of the Concrete Schema Component Attributes

The concrete containment relations are represented as follows:

Diagram of the Concrete Containment Relations

The following concrete components resolve to abstract components:

Diagram of Concrete Component Resolution

The following diagnostics are produced by validation:

Diagram of Concrete Component Diagnostics

The following concrete components have supplemental relations and attributes:

Diagram of Concrete Component Supplemental Relations and Attributes

XSD API Changes

An earlier version of this API was incorporated into Websphere Studio Workbench v2.0 beta, in which the package names were called com.ibm.etools.xsd.

This older version of the API was generated using more complex rules than this current version. As a result, the newer version has significantly fewer (redundant) methods.

No Boolean Getter or Setter

All methods of the form:

 Boolean getXyz()
 void setXyz(Boolean)
are removed. Use this form instead:
 boolean isXyz();
 void setXyz(boolean);

No Wrapper-type Getter or Setter

All methods of the form:

 Integer getXyz();
 void setXyz(Integer);
 int getXyzValue();
are removed. Use this form instead:
 int getXyz(int);
 void setXyz(int);

No IsSet Tester for Null-pointer Test

All methods of the form

  Abc isSetXyz()
where
  getXyz() != null
yields the same answer, have been removed. Use a null test instead.

Type-safe Enumerations

Enumerations are now implemented using Java type-safe enums, rather than using EEnumLiteral. As a result, this set of methods:

 Integer getXyz();
 String getXyzString();
 int getXyzValue();
 EEnumLiteral getXyzLiteral();
 void setXyz(Integer);
 void setXyz(String);
 void setXyz(int);
 void setXyz(EEnumLiteral);
is reduced to
  Abc getXyz();
  void setXyz(Abc);
where Abc is the type-same enumeration. Rather than accessing the literal like this:
  EEnumLiteral XSDPackage.getAbc__EnumeratorGhi();
you can access the literal like this:
  Abc.ENUMERATOR_GHI_LITERAL
The name and int value are accessible like this:
  Abc.ENUMERATOR_GHI_LITERAL.getName()
  Abc.ENUMERATOR_GHI_LITERAL.getValue()
And conversion from String or int is supported like this:
  Abc.get(Abc.ENUMERATOR_GHI_LITERAL.getName())
  Abc.get(Abc.ENUMERATOR_GHI_LITERAL.getValue())

EMF API Changes

Naturally there have been many changes within EMF itself. Below are described the most significant changes that will impact the XSD client.

Package and Factory Access

Rather than accessing a package or factory like this:

  XSDPackage xsdPackage = (XSDPackage)RefRegister.getPackage(XSDPackage.packageURI);
  XSDFactory xsdFactory = xsdPackage.getXSDFactory();
you can access it like this:
  XSDPackage.eINSTANCE;
  XSDFactory.eINSTANCE;

Resources

Rather than registering the resource factory like this:

  ResourceFactoryRegister.registerExtension("xsd", new XSDResourceFactoryImpl());
you can register it like this:
  Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xsd", new XSDResourceFactoryImpl());
You can also do this directly on just a resource set now too:
  ResourceSet resourceSet = new ResourceSetImpl();
  resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xsd", new XSDResourceFactoryImpl());
A resource is loaded like this:
  XSDResourceImpl xsdSchemaResource = 
    (XSDResourceImpl)resourceSet.getResource(URI.createDeviceURI(xsdSchemaURI), true);

URI Reference Removed to use EMF URI Fragment

The URIReference for XSDComponet and XSDDiagnostic have been removed. The function is subsumbed by the EMF concept of a URI Fragment Path.

Owner Removed to use Containment

The concept of ownership has been eliminated in favor of "transient" containment. This ensures that absolutely every valid component is contained by a schema. The relations XSDConcreteComponent.getDiagnostics(), XSDSimpleTypeDefinition.getFundamentalFacets(), and XSDSchema.getIncorporatedVersions(), are now black diamond, and XSDDiagnostic extends XSDConcreteComponent. The new relations XSDSimpleTypeDefinition.getSyntheticFacets(), XSDComplexTypeDefinition.getSyntheticParticle(), XSDAttributeGroupDefinition.getSyntheticWildcard(), and XSDComplexTypeDefiniton.getSyntheticWildcard() are defined to contain the synthesized components that were formerly only just owned. None of these relations should be modified by the client.

XSD Version

First version, August 1, 2002, donated by IBM Corporation.


Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.