Module org.eclipse.persistence.sdo
Class SDOXSDHelperDelegator
java.lang.Object
org.eclipse.persistence.sdo.helper.delegates.AbstractHelperDelegator
org.eclipse.persistence.sdo.helper.delegates.SDOXSDHelperDelegator
- All Implemented Interfaces:
- XSDHelper,- SDOXSDHelper
Purpose: Provides access to additional information when the Type or Property is defined by an XML Schema (XSD)..
Responsibilities:
- Finds the appropriate SDOXSDHelperDelegate for the classLoader/application name and delegates work to that implementation of SDOXSDHelper.
- Define methods defines Types from an XSD.
- Generate methods an XSD from Types.
- Other Methods return null/false otherwise or if the information is unavailable.
- 
Field SummaryFields inherited from class org.eclipse.persistence.sdo.helper.delegates.AbstractHelperDelegatoraHelperContext
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddGlobalProperty(QName qname, Property prop, boolean isElement) INTERNAL:buildAppInfoMap(List appInfoElements) INTERNAL:define(InputStream xsdInputStream, String schemaLocation) Define XML Schema as Types.Define XML Schema as Types.Define the XML Schema as Types.define(Source xsdSource, SchemaResolver schemaResolver) INTERNAL:Generate an XML Schema Declaration (XSD) from Types.Generate an XML Schema Declaration (XSD) from Types.generate(List types, SchemaLocationResolver schemaLocationResolver) INTERNAL:getAppinfo(Property property, String source) Return the content of the appinfo declared for this Property and source.getAppinfo(Type type, String source) Return the appinfo declared for this Type and source.getGlobalProperty(String uri, String propertyName, boolean isElement) Returns the Property defined by the named global element or attribute in the targetNamespace uri, or null if not found.getGlobalProperty(QName qname, boolean isElement) INTERNAL:getLocalName(Property property) Returns the local name as declared in the XSD.getLocalName(Type type) Returns the local name as declared in the XSD.getNamespaceURI(Property property) Returns the namespace URI as declared in the XSD.getNamespaceURI(Type type) Returns the namespace URI as declared in the XSD.booleanisAttribute(Property property) Returns true if the property is declared as an attribute in the XSD.booleanReturns true if the property is declared as an element in the XSD.booleanReturns true if the Type is declared to contain mixed content.booleanIndicates if this helper contains XSD information for the specified type.voidreset()INTERNAL:Methods inherited from class org.eclipse.persistence.sdo.helper.delegates.AbstractHelperDelegatorgetHelperContext, setHelperContextMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.persistence.sdo.helper.SDOXSDHelpergetHelperContext, setHelperContext
- 
Constructor Details- 
SDOXSDHelperDelegatorpublic SDOXSDHelperDelegator()
- 
SDOXSDHelperDelegator
 
- 
- 
Method Details- 
getLocalNameDescription copied from interface:XSDHelperReturns the local name as declared in the XSD.- Specified by:
- getLocalNamein interface- XSDHelper
- Parameters:
- type- to return local name for.
- Returns:
- the local name as declared in the XSD.  If typeis one of the predefined SDO types, the result is undefined.
 
- 
getLocalNameDescription copied from interface:XSDHelperReturns the local name as declared in the XSD.- Specified by:
- getLocalNamein interface- XSDHelper
- Parameters:
- property- to return local name for.
- Returns:
- the local name as declared in the XSD.
 
- 
getNamespaceURIDescription copied from interface:XSDHelperReturns the namespace URI as declared in the XSD. If the XSD has no namespace URI, then""is returned.- Specified by:
- getNamespaceURIin interface- XSDHelper
- Parameters:
- type- to return namespace URI for
- Returns:
- the namespace URI as declared in the XSD.
 
- 
getNamespaceURIDescription copied from interface:XSDHelperReturns the namespace URI as declared in the XSD. If the XSD has no namespace URI, then""is returned.- Specified by:
- getNamespaceURIin interface- XSDHelper
- Parameters:
- property- to return namespace URI for.
- Returns:
- the namespace URI as declared in the XSD.
 
- 
isAttributeDescription copied from interface:XSDHelperReturns true if the property is declared as an attribute in the XSD. Returns false if not known or for advanced cases. It is possible for both isAttribute and isElement to return false but they will not both return true.- Specified by:
- isAttributein interface- XSDHelper
- Parameters:
- property- to identify if an attribute.
- Returns:
- true if the property is declared as an attribute in the XSD.
 
- 
isElementDescription copied from interface:XSDHelperReturns true if the property is declared as an element in the XSD. Returns false if not known or for advanced cases. It is possible for both isAttribute and isElement to return false but they will not both return true.
- 
isMixedDescription copied from interface:XSDHelperReturns true if the Type is declared to contain mixed content. A DataObject's mixed content values are typically accessed via a Sequence.
- 
isXSDDescription copied from interface:XSDHelperIndicates if this helper contains XSD information for the specified type.
- 
getGlobalPropertyDescription copied from interface:XSDHelperReturns the Property defined by the named global element or attribute in the targetNamespace uri, or null if not found. If the SDO name for a property is different than the XSD name, then only the XSD name is used for the lookup. Passing innullor""for theuriparameter means that an element/attribute defined in a Schema with no target namespace will be returned.- Specified by:
- getGlobalPropertyin interface- XSDHelper
- Parameters:
- uri- The uri of the targetNamespace.
- propertyName- The name of the global property.
- isElement- is true for global elements, false for global attributes.
- Returns:
- the Property defined by the named global element or attribute in the targetNamespace uri, or null if not found.
 
- 
getGlobalPropertyDescription copied from interface:SDOXSDHelperINTERNAL:- Specified by:
- getGlobalPropertyin interface- SDOXSDHelper
- Parameters:
- qname-
- isElement-
- Returns:
 
- 
getAppinfoDescription copied from interface:XSDHelperReturn the appinfo declared for this Type and source. The appinfo start and end tags and content are returned. The xml namespace context is preserved in the appinfo element. If more than one appinfo with the same source is declared on the same Type their contents are concatenated.- Specified by:
- getAppinfoin interface- XSDHelper
- Parameters:
- type- the type with the appinfo declaration
- source- the source of the appinfo declaration.
- Returns:
- the appinfo declared for this Type and source.
 
- 
getAppinfoDescription copied from interface:XSDHelperReturn the content of the appinfo declared for this Property and source. If the property is defined by ref= the appinfo of the referenced element or attribute is included. The appinfo start and end tags and content are returned. The xml namespace context is preserved in the appinfo element. If more than one appinfo with the same source is declared on the same Type their contents are concatenated.- Specified by:
- getAppinfoin interface- XSDHelper
- Parameters:
- property- the Property with the appinfo declaration
- source- the source of the appinfo declaration.
- Returns:
- the appinfo declared for this Property and source.
 
- 
defineDescription copied from interface:XSDHelperDefine the XML Schema as Types. The Types are available throughTypeHelper.getType(java.lang.String, java.lang.String)methods. Same as define(new StringReader(xsd), null)
- 
defineDescription copied from interface:XSDHelperDefine XML Schema as Types. The Types are available throughTypeHelper.getType(java.lang.String, java.lang.String)methods.- Specified by:
- definein interface- XSDHelper
- Parameters:
- 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.
- Returns:
- the defined Types. Not all of the XML Schema types cause an SDO type to be defined (for example in case of duplicates), the returned list only includes the newly defined types.
 
- 
defineDescription copied from interface:SDOXSDHelperINTERNAL:- Specified by:
- definein interface- SDOXSDHelper
- Parameters:
- xsdSource-
- schemaResolver-
- Returns:
 
- 
defineDescription copied from interface:XSDHelperDefine XML Schema as Types. The Types are available throughTypeHelper.getType(java.lang.String, java.lang.String)methods.- Specified by:
- definein interface- XSDHelper
- Parameters:
- 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.
- Returns:
- the defined Types. Not all of the XML Schema types cause an SDO type to be defined (for example in case of duplicates), the returned list only includes the newly defined types.
 
- 
generateDescription copied from interface:XSDHelperGenerate an XML Schema Declaration (XSD) from Types. Same as generate(types, null);
- 
generateDescription copied from interface:XSDHelperGenerate an XML Schema Declaration (XSD) from Types. Round trip from SDO to XSD to SDO is supported. Round trip from XSD to SDO to XSD is not supported. Use the original schema if one exists instead of generating a new one, as the generated XSD validates a different set of documents than the original XSD. Generating an XSD does not affect the XSDHelper or the Types. The Types must all have the same URI. The result is a String containing the generated XSD. All Types referenced with the same URI will be generated in the XSD and the list will be expanded to include all types generated. Any Types referenced with other URIs will cause imports to be produced as appropriate. Imports will include a schemaLocation if a Map is provided with an entry of the form key=import target namespace, value=schemaLocation
- 
generateDescription copied from interface:SDOXSDHelperINTERNAL:- Specified by:
- generatein interface- SDOXSDHelper
- Parameters:
- types-
- schemaLocationResolver-
- Returns:
 
- 
buildAppInfoMapINTERNAL:- Specified by:
- buildAppInfoMapin interface- SDOXSDHelper
- Parameters:
- appInfoElements-
- Returns:
 
- 
addGlobalPropertyINTERNAL:- Specified by:
- addGlobalPropertyin interface- SDOXSDHelper
- Parameters:
- qname-
- prop-
- isElement- Register the given property with the given qname.
 
- 
getXSDHelperDelegate
- 
resetpublic void reset()Description copied from interface:SDOXSDHelperINTERNAL:- Specified by:
- resetin interface- SDOXSDHelper
 
 
-