|
EclipseLink 2.3.2, build 'v20111125-r10461' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XSDHelper
Provides access to additional information when the Type or Property is defined by an XML Schema (XSD). In case Types or Properties are not defined from an XML Schema, methods return information corresponding to what would be the generated XSD. Defines Types from an XSD.
Field Summary | |
---|---|
static XSDHelper |
INSTANCE
The default XSDHelper. |
Method Summary | |
---|---|
java.util.List |
define(java.io.InputStream xsdInputStream,
java.lang.String schemaLocation)
Define XML Schema as Types. |
java.util.List |
define(java.io.Reader xsdReader,
java.lang.String schemaLocation)
Define XML Schema as Types. |
java.util.List |
define(java.lang.String xsd)
Define the XML Schema as Types. |
java.lang.String |
generate(java.util.List types)
Generate an XML Schema Declaration (XSD) from Types. |
java.lang.String |
generate(java.util.List types,
java.util.Map namespaceToSchemaLocation)
Generate an XML Schema Declaration (XSD) from Types. |
java.lang.String |
getAppinfo(Property property,
java.lang.String source)
Return the content of the appinfo declared for this Property and source. |
java.lang.String |
getAppinfo(Type type,
java.lang.String source)
Return the appinfo declared for this Type and source. |
Property |
getGlobalProperty(java.lang.String uri,
java.lang.String propertyName,
boolean isElement)
Returns the Property defined by the named global element or attribute in the targetNamespace uri, or null if not found. |
java.lang.String |
getLocalName(Property property)
Returns the local name as declared in the XSD. |
java.lang.String |
getLocalName(Type type)
Returns the local name as declared in the XSD. |
java.lang.String |
getNamespaceURI(Property property)
Returns the namespace URI as declared in the XSD. |
java.lang.String |
getNamespaceURI(Type type)
Returns the namespace URI as declared in the XSD. |
boolean |
isAttribute(Property property)
Returns true if the property is declared as an attribute in the XSD. |
boolean |
isElement(Property property)
Returns true if the property is declared as an element in the XSD. |
boolean |
isMixed(Type type)
Returns true if the Type is declared to contain mixed content. |
boolean |
isXSD(Type type)
Indicates if this helper contains XSD information for the specified type. |
Field Detail |
---|
static final XSDHelper INSTANCE
Method Detail |
---|
java.lang.String getLocalName(Type type)
type
- to return local name for.
type
is one of the predefined SDO types, the result is undefined.java.lang.String getLocalName(Property property)
property
- to return local name for.
java.lang.String getNamespaceURI(Property property)
""
is returned.
property
- to return namespace URI for.
java.lang.String getNamespaceURI(Type type)
""
is returned.
type
- to return namespace URI for
boolean isAttribute(Property property)
property
- to identify if an attribute.
boolean isElement(Property property)
property
- to identify if an element.
boolean isMixed(Type type)
type
- to identify if mixed content.
boolean isXSD(Type type)
type
- the type.
Property getGlobalProperty(java.lang.String uri, java.lang.String propertyName, boolean isElement)
null
or ""
for the
uri
parameter means that an element/attribute defined in a
Schema with no target namespace will be returned.
uri
- The uri of the targetNamespace.propertyName
- The name of the global property.isElement
- is true for global elements, false for global attributes.
java.lang.String getAppinfo(Type type, java.lang.String source)
type
- the type with the appinfo declarationsource
- the source of the appinfo declaration.
java.lang.String getAppinfo(Property property, java.lang.String source)
property
- the Property with the appinfo declarationsource
- the source of the appinfo declaration.
java.util.List define(java.lang.String xsd)
TypeHelper.getType(java.lang.String, java.lang.String)
methods.
Same as define(new StringReader(xsd), null)
xsd
- the XML Schema.
java.lang.IllegalArgumentException
- if the Types could not be defined.java.util.List define(java.io.Reader xsdReader, java.lang.String schemaLocation)
TypeHelper.getType(java.lang.String, java.lang.String)
methods.
xsdReader
- reader to an XML Schema.schemaLocation
- the URI of the location of the schema, used
for processing relative imports and includes. May be null if not used.
java.lang.IllegalArgumentException
- if the Types could not be defined.java.util.List define(java.io.InputStream xsdInputStream, java.lang.String schemaLocation)
TypeHelper.getType(java.lang.String, java.lang.String)
methods.
xsdInputStream
- input stream to an XML Schema.schemaLocation
- the URI of the location of the schema, used
for processing relative imports and includes. May be null if not used.
java.lang.IllegalArgumentException
- if the Types could not be defined.java.lang.String generate(java.util.List types)
types
- a List containing the Types
java.lang.IllegalArgumentException
- if the XSD could not be generated.java.lang.String generate(java.util.List types, java.util.Map namespaceToSchemaLocation)
types
- a List containing the TypesnamespaceToSchemaLocation
- map of target namespace to schema locations or null
java.lang.IllegalArgumentException
- if the XSD could not be generated.
|
EclipseLink 2.3.2, build 'v20111125-r10461' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |