Top Description Fields Constructors Methods
org.eclipse.persistence.oxm.schema

public abstract Class XMLSchemaReference

extends Object
implements XMLSchemaReference
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.platform.xml.XMLSchemaReference
Known Direct Subclasses
org.eclipse.persistence.oxm.schema.XMLSchemaURLReference, org.eclipse.persistence.oxm.schema.XMLSchemaClassPathReference, org.eclipse.persistence.oxm.schema.XMLSchemaFileReference
Imports
java.net.URL, javax.xml.namespace.QName, org.eclipse.persistence.exceptions.XMLMarshalException, org.eclipse.persistence.internal.core.sessions.CoreAbstractSession, org.eclipse.persistence.internal.oxm.Constants, .NamespaceResolver, org.eclipse.persistence.platform.xml.XMLPlatform, .XMLPlatformException, .XMLPlatformFactory, org.w3c.dom.Document, org.xml.sax.ErrorHandler

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 TypeField and Description
protected String
resource

The string used to access the XMLSchema, be it classpath resource, URL, or file name

protected String
schemaContext

The path to a simple/complex type definition or element in the schema

protected QName
protected int
type

Indicates if a simple/complex type definition, element, or group is being referenced

Constructor Summary

AccessConstructor and Description
protected
XMLSchemaReference()

The default constructor.

protected
XMLSchemaReference(String
- used to access the XMLSchema (classpath, URL, or file name)
resource
)

This constructor takes a string that references an XMLSchema.

Method Summary

Modifier and TypeMethod and Description
public String
public String

Returns:

the schema context
getSchemaContext
()

Implements org.eclipse.persistence.platform.xml.XMLSchemaReference.getSchemaContext.

Get the path to the simple/complex type definition, element or group to be referenced in the schema
public QName
public QName
public int

Returns:

COMPLEX_TYPE=1, SIMPLE_TYPE=2, ELEMENT=3, GROUP=5
getType
()

Implements org.eclipse.persistence.platform.xml.XMLSchemaReference.getType.

Indicates if the schema reference references a simple type definition, complex type definition, element, or group.
public abstract URL
getURL()

Redeclares org.eclipse.persistence.platform.xml.XMLSchemaReference.getURL.

A URL which referenes the Schema.
public void
initialize(CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>> session)

Allow subclasses to perform initialization if required.

public boolean
isGlobalDefinition()

Indicates a global definition

public boolean
isValid(Document document, ErrorHandler errorHandler)

public void
setResource(String resource)

public void
setSchemaContext(String
- the schema context
schemaContext
)

Set the path to the simple/complex type definition, element, or group to be referenced in the schema

public void
public void
setType(int
- COMPLEX_TYPE=1, SIMPLE_TYPE=2, ELEMENT=3, GROUP=5
type
)

Set to indicate if the schema reference references a simple type definition, complex type definition, element or group.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

resourceback to summary
protected String resource

The string used to access the XMLSchema, be it classpath resource, URL, or file name

schemaContextback to summary
protected String schemaContext

The path to a simple/complex type definition or element in the schema

schemaContextAsQNameback to summary
protected QName schemaContextAsQName
typeback to summary
protected int type

Indicates if a simple/complex type definition, element, or group is being referenced

Constructor Detail

XMLSchemaReferenceback to summary
protected XMLSchemaReference()

The default constructor.

XMLSchemaReferenceback to summary
protected XMLSchemaReference(String resource)

This constructor takes a string that references an XMLSchema.

Parameters
resource:String

- used to access the XMLSchema (classpath, URL, or file name)

Method Detail

getResourceback to summary
public String getResource()
getSchemaContextback to summary
public String getSchemaContext()

Implements org.eclipse.persistence.platform.xml.XMLSchemaReference.getSchemaContext.

Get the path to the simple/complex type definition, element or group to be referenced in the schema

Returns:String

the schema context

Annotations
@Override
getSchemaContextAsQNameback to summary
public QName getSchemaContextAsQName()
getSchemaContextAsQNameback to summary
public QName getSchemaContextAsQName(NamespaceResolver nsResolver)

INTERNAL:

getTypeback to summary
public int getType()

Implements org.eclipse.persistence.platform.xml.XMLSchemaReference.getType.

Indicates if the schema reference references a simple type definition, complex type definition, element, or group.

Returns:int

COMPLEX_TYPE=1, SIMPLE_TYPE=2, ELEMENT=3, GROUP=5

Annotations
@Override
getURLback to summary
public abstract URL getURL()

Redeclares org.eclipse.persistence.platform.xml.XMLSchemaReference.getURL.

Doc from org.eclipse.persistence.platform.xml.XMLSchemaReference.getURL.

A URL which referenes the Schema.

Returns:URL

the schema URL

Annotations
@Override
initializeback to summary
public void initialize(CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>> session)

Allow subclasses to perform initialization if required. This method will typically be called during the owning descriptor's initialization phase.

isGlobalDefinitionback to summary
public boolean isGlobalDefinition()

Indicates a global definition

isValidback to summary
public boolean isValid(Document document, ErrorHandler errorHandler)
setResourceback to summary
public void setResource(String resource)
setSchemaContextback to summary
public void setSchemaContext(String schemaContext)

Set the path to the simple/complex type definition, element, or group to be referenced in the schema

Parameters
schemaContext:String

- the schema context

setSchemaContextAsQNameback to summary
public void setSchemaContextAsQName(QName qname)
setTypeback to summary
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:int

- COMPLEX_TYPE=1, SIMPLE_TYPE=2, ELEMENT=3, GROUP=5