|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) E28847-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
org.eclipse.persistence.sdo.helper.delegates.SDOXSDHelperDelegate
public class SDOXSDHelperDelegate
Purpose: Provides access to additional information when the Type or Property is defined by an XML Schema (XSD)..
Responsibilities:
Field Summary | |
---|---|
private HelperContext |
aHelperContext |
private java.util.Map |
globalAttributes |
private java.util.Map |
globalElements |
Constructor Summary | |
---|---|
SDOXSDHelperDelegate(HelperContext aContext) |
Method Summary | |
---|---|
void |
addGlobalProperty(javax.xml.namespace.QName qname, Property prop, boolean isElement) INTERNAL: |
java.util.Map |
buildAppInfoMap(java.util.List appInfoElements) INTERNAL: |
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, SchemaResolver schemaResolver) 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(javax.xml.transform.Source xsdSource, SchemaResolver schemaResolver) INTERNAL: |
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 |
generate(java.util.List types, SchemaLocationResolver schemaLocationResolver) INTERNAL: |
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. |
private java.util.Map |
getGlobalAttributes() Return a map of properties representing global attributes keyed on QName |
private java.util.Map |
getGlobalElements() Return a map of properties representing global elements keyed on QName |
Property |
getGlobalProperty(javax.xml.namespace.QName qname, boolean isElement) INTERNAL: |
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. |
HelperContext |
getHelperContext() INTERNAL: Return the helperContext that this instance is associated with. |
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. |
java.lang.String |
getStringFromAppInfoElement(org.w3c.dom.Element appInfo) |
private void |
initOpenProps() |
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. |
void |
reset() INTERNAL: |
void |
setGlobalAttributes(java.util.Map globalAttributes) Assign a map of properties representing global attributes keyed on QName |
void |
setGlobalElements(java.util.Map globalElements) Assign a map of properties representing global elements keyed on QName |
void |
setHelperContext(HelperContext helperContext) INTERNAL: Set the helperContext that this instance is associated with. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Map globalAttributes
private java.util.Map globalElements
private HelperContext aHelperContext
Constructor Detail |
---|
public SDOXSDHelperDelegate(HelperContext aContext)
Method Detail |
---|
public java.lang.String getLocalName(Type type)
type
- to return local name for.public java.lang.String getLocalName(Property property)
property
- to return local name for.public java.lang.String getNamespaceURI(Type type)
type
- to return namespace URI for.public java.lang.String getNamespaceURI(Property property)
property
- to return namespace URI for.public boolean isAttribute(Property property)
property
- to identify if an attribute.public boolean isElement(Property property)
property
- to identify if an element.public boolean isMixed(Type type)
type
- to identify if mixed content.public boolean isXSD(Type type)
type
- the type.public Property getGlobalProperty(java.lang.String uri, java.lang.String propertyName, boolean isElement)
uri
- The uri of the targetNamespace.propertyName
- The name of the global property.isElement
- is true for global elements, false for global attributes.public Property getGlobalProperty(javax.xml.namespace.QName qname, boolean isElement)
SDOXSDHelper
getGlobalProperty
in interface SDOXSDHelper
public java.lang.String getAppinfo(Type type, java.lang.String source)
type
- the type with the appinfo declarationsource
- the source of the appinfo declaration.public java.lang.String getAppinfo(Property property, java.lang.String source)
property
- the Property with the appinfo declarationsource
- the source of the appinfo declaration.public java.util.List define(java.lang.String xsd)
xsd
- the XML Schema.java.lang.IllegalArgumentException
- if the Types could not be defined.public java.util.List define(java.io.Reader xsdReader, java.lang.String schemaLocation)
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.public java.util.List define(java.io.Reader xsdReader, SchemaResolver schemaResolver)
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.public java.util.List define(javax.xml.transform.Source xsdSource, SchemaResolver schemaResolver)
SDOXSDHelper
define
in interface SDOXSDHelper
public java.util.List define(java.io.InputStream xsdInputStream, java.lang.String schemaLocation)
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.public java.lang.String generate(java.util.List types)
types
- a List containing the Typesjava.lang.IllegalArgumentException
- if the XSD could not be generated.public 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 nulljava.lang.IllegalArgumentException
- if the XSD could not be generated.public java.lang.String generate(java.util.List types, SchemaLocationResolver schemaLocationResolver)
SDOXSDHelper
generate
in interface SDOXSDHelper
public void setGlobalAttributes(java.util.Map globalAttributes)
globalAttributes
- a Map of global elements keyed on QNameprivate java.util.Map getGlobalAttributes()
private void initOpenProps()
public void setGlobalElements(java.util.Map globalElements)
globalElements
- a Map of global elements keyed on QNameprivate java.util.Map getGlobalElements()
public java.util.Map buildAppInfoMap(java.util.List appInfoElements)
buildAppInfoMap
in interface SDOXSDHelper
public void reset()
SDOXSDHelper
reset
in interface SDOXSDHelper
public HelperContext getHelperContext()
SDOXSDHelper
getHelperContext
in interface SDOXSDHelper
public void setHelperContext(HelperContext helperContext)
SDOXSDHelper
setHelperContext
in interface SDOXSDHelper
public java.lang.String getStringFromAppInfoElement(org.w3c.dom.Element appInfo)
public void addGlobalProperty(javax.xml.namespace.QName qname, Property prop, boolean isElement)
addGlobalProperty
in interface SDOXSDHelper
qname
-prop
-isElement
- Register the given property with the given qname.
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |