Class XMLSchemaReference
java.lang.Object
org.eclipse.persistence.oxm.schema.XMLSchemaReference
- All Implemented Interfaces:
XMLSchemaReference
- Direct Known Subclasses:
XMLSchemaClassPathReference
,XMLSchemaFileReference
,XMLSchemaURLReference
Provides a way for a descriptor's reference to its schema to be specified.
The schema can be reference through a classpath resource, a file or URL.
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
The string used to access the XMLSchema, be it classpath resource, URL, or file nameprotected String
The path to a simple/complex type definition or element in the schemaprotected QName
protected int
Indicates if a simple/complex type definition, element, or group is being referencedFields inherited from interface org.eclipse.persistence.platform.xml.XMLSchemaReference
COMPLEX_TYPE, ELEMENT, GROUP, SIMPLE_TYPE
-
Constructor Summary
ModifierConstructorDescriptionprotected
The default constructor.protected
XMLSchemaReference
(String resource) This constructor takes a string that references an XMLSchema. -
Method Summary
Modifier and TypeMethodDescriptionGet the path to the simple/complex type definition, element or group to be referenced in the schemagetSchemaContextAsQName
(org.eclipse.persistence.internal.oxm.NamespaceResolver nsResolver) INTERNAL:int
getType()
Indicates if the schema reference references a simple type definition, complex type definition, element, or group.abstract URL
getURL()
A URL which referenes the Schema.void
initialize
(org.eclipse.persistence.internal.core.sessions.CoreAbstractSession session) Allow subclasses to perform initialization if required.boolean
Indicates a global definitionboolean
isValid
(Document document, ErrorHandler errorHandler) void
setResource
(String resource) void
setSchemaContext
(String schemaContext) Set the path to the simple/complex type definition, element, or group to be referenced in the schemavoid
setSchemaContextAsQName
(QName qname) void
setType
(int type) Set to indicate if the schema reference references a simple type definition, complex type definition, element or group.
-
Field Details
-
resource
The string used to access the XMLSchema, be it classpath resource, URL, or file name -
schemaContext
The path to a simple/complex type definition or element in the schema -
type
protected int typeIndicates if a simple/complex type definition, element, or group is being referenced -
schemaContextAsQName
-
-
Constructor Details
-
XMLSchemaReference
protected XMLSchemaReference()The default constructor. -
XMLSchemaReference
This constructor takes a string that references an XMLSchema.- Parameters:
resource
- - used to access the XMLSchema (classpath, URL, or file name)
-
-
Method Details
-
getResource
-
setResource
-
getURL
Description copied from interface:XMLSchemaReference
A URL which referenes the Schema.- Specified by:
getURL
in interfaceXMLSchemaReference
- Returns:
- the schema URL
-
getType
public int getType()Indicates if the schema reference references a simple type definition, complex type definition, element, or group.- Specified by:
getType
in interfaceXMLSchemaReference
- Returns:
- COMPLEX_TYPE=1, SIMPLE_TYPE=2, ELEMENT=3, GROUP=5
-
setType
public void setType(int type) Set to indicate if the schema reference references a simple type definition, complex type definition, element or group.- Parameters:
type
- - COMPLEX_TYPE=1, SIMPLE_TYPE=2, ELEMENT=3, GROUP=5
-
getSchemaContext
Get the path to the simple/complex type definition, element or group to be referenced in the schema- Specified by:
getSchemaContext
in interfaceXMLSchemaReference
- Returns:
- the schema context
-
setSchemaContext
Set the path to the simple/complex type definition, element, or group to be referenced in the schema- Parameters:
schemaContext
- - the schema context
-
setSchemaContextAsQName
-
getSchemaContextAsQName
-
getSchemaContextAsQName
public QName getSchemaContextAsQName(org.eclipse.persistence.internal.oxm.NamespaceResolver nsResolver) INTERNAL:- Parameters:
nsResolver
-- Returns:
-
isValid
-
isGlobalDefinition
public boolean isGlobalDefinition()Indicates a global definition -
initialize
public void initialize(org.eclipse.persistence.internal.core.sessions.CoreAbstractSession session) Allow subclasses to perform initialization if required. This method will typically be called during the owning descriptor's initialization phase.- Parameters:
session
-
-