public class SDOXSDHelperDelegate extends Object implements SDOXSDHelper
Purpose: Provides access to additional information when the Type or Property is defined by an XML Schema (XSD)..
Responsibilities:
| Constructor and Description |
|---|
SDOXSDHelperDelegate(commonj.sdo.helper.HelperContext aContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGlobalProperty(QName qname,
commonj.sdo.Property prop,
boolean isElement)
INTERNAL:
|
Map |
buildAppInfoMap(List appInfoElements)
INTERNAL:
|
List |
define(InputStream xsdInputStream,
String schemaLocation)
Define XML Schema as Types.
|
List |
define(Reader xsdReader,
SchemaResolver schemaResolver)
Define XML Schema as Types.
|
List |
define(Reader xsdReader,
String schemaLocation)
Define XML Schema as Types.
|
List |
define(Source xsdSource,
SchemaResolver schemaResolver)
INTERNAL:
|
List |
define(String xsd)
Define the XML Schema as Types.
|
String |
generate(List types)
Generate an XML Schema Declaration (XSD) from Types.
|
String |
generate(List types,
Map namespaceToSchemaLocation)
Generate an XML Schema Declaration (XSD) from Types.
|
String |
generate(List types,
SchemaLocationResolver schemaLocationResolver)
INTERNAL:
|
String |
getAppinfo(commonj.sdo.Property property,
String source)
Return the content of the appinfo declared for this Property and source.
|
String |
getAppinfo(commonj.sdo.Type type,
String source)
Return the appinfo declared for this Type and source.
|
commonj.sdo.Property |
getGlobalProperty(QName qname,
boolean isElement)
INTERNAL:
|
commonj.sdo.Property |
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.
|
commonj.sdo.helper.HelperContext |
getHelperContext()
INTERNAL:
Return the helperContext that this instance is associated with.
|
String |
getLocalName(commonj.sdo.Property property)
Returns the local name as declared in the XSD.
|
String |
getLocalName(commonj.sdo.Type type)
Returns the local name as declared in the XSD.
|
String |
getNamespaceURI(commonj.sdo.Property property)
Returns the namespace URI as declared in the XSD.
|
String |
getNamespaceURI(commonj.sdo.Type type)
Returns the namespace URI as declared in the XSD.
|
String |
getStringFromAppInfoElement(Element appInfo) |
boolean |
isAttribute(commonj.sdo.Property property)
Returns true if the property is declared as an attribute in the XSD.
|
boolean |
isElement(commonj.sdo.Property property)
Returns true if the property is declared as an element in the XSD.
|
boolean |
isMixed(commonj.sdo.Type type)
Returns true if the Type is declared to contain mixed content.
|
boolean |
isXSD(commonj.sdo.Type type)
Indicates if this helper contains XSD information for the specified type.
|
void |
reset()
INTERNAL:
|
void |
setGlobalAttributes(Map globalAttributes)
Assign a map of properties representing global attributes keyed on QName
|
void |
setGlobalElements(Map globalElements)
Assign a map of properties representing global elements keyed on QName
|
void |
setHelperContext(commonj.sdo.helper.HelperContext helperContext)
INTERNAL:
Set the helperContext that this instance is associated with.
|
public SDOXSDHelperDelegate(commonj.sdo.helper.HelperContext aContext)
public String getLocalName(commonj.sdo.Type type)
getLocalName in interface commonj.sdo.helper.XSDHelpertype - to return local name for.public String getLocalName(commonj.sdo.Property property)
getLocalName in interface commonj.sdo.helper.XSDHelperproperty - to return local name for.public String getNamespaceURI(commonj.sdo.Type type)
getNamespaceURI in interface commonj.sdo.helper.XSDHelpertype - to return namespace URI for.public String getNamespaceURI(commonj.sdo.Property property)
getNamespaceURI in interface commonj.sdo.helper.XSDHelperproperty - to return namespace URI for.public boolean isAttribute(commonj.sdo.Property property)
isAttribute in interface commonj.sdo.helper.XSDHelperproperty - to identify if an attribute.public boolean isElement(commonj.sdo.Property property)
isElement in interface commonj.sdo.helper.XSDHelperproperty - to identify if an element.public boolean isMixed(commonj.sdo.Type type)
isMixed in interface commonj.sdo.helper.XSDHelpertype - to identify if mixed content.public boolean isXSD(commonj.sdo.Type type)
isXSD in interface commonj.sdo.helper.XSDHelpertype - the type.public commonj.sdo.Property getGlobalProperty(String uri, String propertyName, boolean isElement)
getGlobalProperty in interface commonj.sdo.helper.XSDHelperuri - The uri of the targetNamespace.propertyName - The name of the global property.isElement - is true for global elements, false for global attributes.public commonj.sdo.Property getGlobalProperty(QName qname, boolean isElement)
SDOXSDHelpergetGlobalProperty in interface SDOXSDHelperpublic String getAppinfo(commonj.sdo.Type type, String source)
getAppinfo in interface commonj.sdo.helper.XSDHelpertype - the type with the appinfo declarationsource - the source of the appinfo declaration.public String getAppinfo(commonj.sdo.Property property, String source)
getAppinfo in interface commonj.sdo.helper.XSDHelperproperty - the Property with the appinfo declarationsource - the source of the appinfo declaration.public List define(String xsd)
define in interface commonj.sdo.helper.XSDHelperxsd - the XML Schema.IllegalArgumentException - if the Types could not be defined.public List define(Reader xsdReader, String schemaLocation)
define in interface commonj.sdo.helper.XSDHelperxsdReader - 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.IllegalArgumentException - if the Types could not be defined.public List define(Reader xsdReader, SchemaResolver schemaResolver)
xsdReader - reader to an XML Schema.schemaResolver - the URI of the location of the schema, used
for processing relative imports and includes. May be null if not used.IllegalArgumentException - if the Types could not be defined.public List define(Source xsdSource, SchemaResolver schemaResolver)
SDOXSDHelperdefine in interface SDOXSDHelperpublic List define(InputStream xsdInputStream, String schemaLocation)
define in interface commonj.sdo.helper.XSDHelperxsdInputStream - 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.IllegalArgumentException - if the Types could not be defined.public String generate(List types)
generate in interface commonj.sdo.helper.XSDHelpertypes - a List containing the TypesIllegalArgumentException - if the XSD could not be generated.public String generate(List types, Map namespaceToSchemaLocation)
generate in interface commonj.sdo.helper.XSDHelpertypes - a List containing the TypesnamespaceToSchemaLocation - map of target namespace to schema locations or nullIllegalArgumentException - if the XSD could not be generated.public String generate(List types, SchemaLocationResolver schemaLocationResolver)
SDOXSDHelpergenerate in interface SDOXSDHelperpublic void setGlobalAttributes(Map globalAttributes)
globalAttributes - a Map of global elements keyed on QNamepublic void setGlobalElements(Map globalElements)
globalElements - a Map of global elements keyed on QNamepublic Map buildAppInfoMap(List appInfoElements)
buildAppInfoMap in interface SDOXSDHelperpublic void reset()
SDOXSDHelperreset in interface SDOXSDHelperpublic commonj.sdo.helper.HelperContext getHelperContext()
SDOXSDHelpergetHelperContext in interface SDOXSDHelperpublic void setHelperContext(commonj.sdo.helper.HelperContext helperContext)
SDOXSDHelpersetHelperContext in interface SDOXSDHelperpublic void addGlobalProperty(QName qname, commonj.sdo.Property prop, boolean isElement)
addGlobalProperty in interface SDOXSDHelperqname - prop - isElement - Register the given property with the given qname.Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.