Top Description Fields Constructors Methods
org.eclipse.persistence.platform.xml.jaxp

public Class JAXPPlatform

extends Object
implements XMLPlatform
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.platform.xml.XMLPlatform
Imports
java.net.URL, java.util.ArrayList, .List, .Map, javax.xml.XMLConstants, javax.xml.parsers.DocumentBuilder, .DocumentBuilderFactory, javax.xml.transform.dom.DOMSource, javax.xml.validation.Schema, .SchemaFactory, .Validator, javax.xml.xpath.XPath, .XPathConstants, .XPathException, .XPathExpression, .XPathFactory, org.eclipse.persistence.internal.helper.XMLHelper, org.eclipse.persistence.internal.oxm.Constants, org.eclipse.persistence.platform.xml.XMLNamespaceResolver, .XMLParser, .XMLPlatform, .XMLPlatformException, .XMLPlatformFactory, .XMLTransformer, org.w3c.dom.Attr, .DOMImplementation, .Document, .DocumentType, .Element, .NamedNodeMap, .Node, .NodeList, .Text, org.xml.sax.ErrorHandler, .SAXException

Purpose: An implementation of XMLPlatform using JAXP 1.3 APIs.

Field Summary

Modifier and TypeField and Description
private boolean
private DocumentBuilderFactory
private SchemaFactory
private XPathFactory

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Document
public Document
createDocumentWithPublicIdentifier(String
the name of the root element publicIdentifier the public identifier systemIdentifier the system identifier
name
,
String publicIdentifier, String systemIdentifier)

Implements org.eclipse.persistence.platform.xml.XMLPlatform.createDocumentWithPublicIdentifier.

Creates a new document with the specified public and system identifiers in the DOCTYPE, and adds a root element with the specified name.
public Document
createDocumentWithSystemIdentifier(String
the name of the root element systemIdentifier the system identifier
name
,
String systemIdentifier)

Implements org.eclipse.persistence.platform.xml.XMLPlatform.createDocumentWithSystemIdentifier.

Creates a new document with the specified system identifier in the DOCTYPE, and adds a root element with the specified name.
private DocumentBuilderFactory
public SchemaFactory
public XPathFactory
public boolean
public boolean
isWhitespaceNode(Text
a potential whitespace node
text
)

Implements org.eclipse.persistence.platform.xml.XMLPlatform.isWhitespaceNode.

Check to see if the text node represents a whitespace node.
public void
private void
namespaceQualifyFragment(Element next, List<String> declaredPrefixes)

public XMLParser
newXMLParser()

Implements org.eclipse.persistence.platform.xml.XMLPlatform.newXMLParser.

Return a concrete implementation of the XML parser abstraction that is compatible with the XML Platform.
public XMLParser
newXMLParser(Map<String, Boolean> parserFeatures)

Implements org.eclipse.persistence.platform.xml.XMLPlatform.newXMLParser.

Return a concrete implementation of the XML parser abstraction that is compatible with the XML Platform, based on these parser features.
public XMLTransformer
newXMLTransformer()

Implements org.eclipse.persistence.platform.xml.XMLPlatform.newXMLTransformer.

Return a concrete implementation of the XML transformer abstraction that is compatible with the XML Platform.
public String
resolveNamespacePrefix(Node
the node to be looking for the namespace URI namespacePrefix the namespace prefix
contextNode
,
String namespacePrefix)

Implements org.eclipse.persistence.platform.xml.XMLPlatform.resolveNamespacePrefix.

Return the namespace URI for the specified namespace prefix relative to the context node.
public NodeList

Returns:

the XPath result
selectNodesAdvanced
(Node
the node relative to which the XPath statement will be executed. xPath the XPath statement namespaceResolver used to resolve namespace prefixes to the corresponding namespace URI
contextNode
,
String xPathString, XMLNamespaceResolver xmlNamespaceResolver)

Implements org.eclipse.persistence.platform.xml.XMLPlatform.selectNodesAdvanced.

Execute advanced XPath statements that are required for TopLink EIS.
public Node
selectSingleNodeAdvanced(Node contextNode, String xPathString, XMLNamespaceResolver xmlNamespaceResolver)

Implements org.eclipse.persistence.platform.xml.XMLPlatform.selectSingleNodeAdvanced.

Execute advanced XPath statements that are required for TopLink EIS.
public void
public boolean
validate(Element elem, XMLDescriptor xmlDescriptor, ErrorHandler handler)

Implements org.eclipse.persistence.platform.xml.XMLPlatform.validate.

Validates a document fragment against a complex type or element in the XML schema
public boolean
validateDocument(Document
the document to be validated
document
,
URL
the XML Schema
xmlSchemaURL
,
ErrorHandler
a mechanism for selectively ignoring errors
errorHandler
)

Implements org.eclipse.persistence.platform.xml.XMLPlatform.validateDocument.

Validate the document against the XML Schema
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

disableSecureProcessingback to summary
private boolean disableSecureProcessing
documentBuilderFactoryback to summary
private DocumentBuilderFactory documentBuilderFactory
schemaFactoryback to summary
private SchemaFactory schemaFactory
xPathFactoryback to summary
private XPathFactory xPathFactory

Constructor Detail

JAXPPlatformback to summary
public JAXPPlatform()

Method Detail

createDocumentback to summary
public Document createDocument() throws XMLPlatformException

Implements org.eclipse.persistence.platform.xml.XMLPlatform.createDocument.

Doc from org.eclipse.persistence.platform.xml.XMLPlatform.createDocument.

Creates a new document.

Returns:Document

the new document

Annotations
@Override
createDocumentWithPublicIdentifierback to summary
public Document createDocumentWithPublicIdentifier(String name, String publicIdentifier, String systemIdentifier) throws XMLPlatformException

Implements org.eclipse.persistence.platform.xml.XMLPlatform.createDocumentWithPublicIdentifier.

Doc from org.eclipse.persistence.platform.xml.XMLPlatform.createDocumentWithPublicIdentifier.

Creates a new document with the specified public and system identifiers in the DOCTYPE, and adds a root element with the specified name.

Parameters
name:String

the name of the root element publicIdentifier the public identifier systemIdentifier the system identifier

Returns:Document

the new document

Annotations
@Override
createDocumentWithSystemIdentifierback to summary
public Document createDocumentWithSystemIdentifier(String name, String systemIdentifier) throws XMLPlatformException

Implements org.eclipse.persistence.platform.xml.XMLPlatform.createDocumentWithSystemIdentifier.

Doc from org.eclipse.persistence.platform.xml.XMLPlatform.createDocumentWithSystemIdentifier.

Creates a new document with the specified system identifier in the DOCTYPE, and adds a root element with the specified name.

Parameters
name:String

the name of the root element systemIdentifier the system identifier

Returns:Document

the new document

Annotations
@Override
getDocumentBuilderFactoryback to summary
private DocumentBuilderFactory getDocumentBuilderFactory()
getSchemaFactoryback to summary
public SchemaFactory getSchemaFactory()
getXPathFactoryback to summary
public XPathFactory getXPathFactory()
isSecureProcessingDisabledback to summary
public boolean isSecureProcessingDisabled()

Implements org.eclipse.persistence.platform.xml.XMLPlatform.isSecureProcessingDisabled.

Annotations
@Override
isWhitespaceNodeback to summary
public boolean isWhitespaceNode(Text text)

Implements org.eclipse.persistence.platform.xml.XMLPlatform.isWhitespaceNode.

Doc from org.eclipse.persistence.platform.xml.XMLPlatform.isWhitespaceNode.

Check to see if the text node represents a whitespace node.

Parameters
text:Text

a potential whitespace node

Returns:boolean

if the text node represents a whitespace node.

Annotations
@Override
namespaceQualifyFragmentback to summary
public void namespaceQualifyFragment(Element next)

Implements org.eclipse.persistence.platform.xml.XMLPlatform.namespaceQualifyFragment.

Parameters
next:Element

Doc from org.eclipse.persistence.platform.xml.XMLPlatform.namespaceQualifyFragment.

Element to qualify

Annotations
@Override
namespaceQualifyFragmentback to summary
private void namespaceQualifyFragment(Element next, List<String> declaredPrefixes)
newXMLParserback to summary
public XMLParser newXMLParser()

Implements org.eclipse.persistence.platform.xml.XMLPlatform.newXMLParser.

Doc from org.eclipse.persistence.platform.xml.XMLPlatform.newXMLParser.

Return a concrete implementation of the XML parser abstraction that is compatible with the XML Platform.

Returns:XMLParser

a platform specific XML parser

Annotations
@Override
newXMLParserback to summary
public XMLParser newXMLParser(Map<String, Boolean> parserFeatures)

Implements org.eclipse.persistence.platform.xml.XMLPlatform.newXMLParser.

Doc from org.eclipse.persistence.platform.xml.XMLPlatform.newXMLParser.

Return a concrete implementation of the XML parser abstraction that is compatible with the XML Platform, based on these parser features.

Returns:XMLParser

a platform specific XML parser

Annotations
@Override
newXMLTransformerback to summary
public XMLTransformer newXMLTransformer()

Implements org.eclipse.persistence.platform.xml.XMLPlatform.newXMLTransformer.

Doc from org.eclipse.persistence.platform.xml.XMLPlatform.newXMLTransformer.

Return a concrete implementation of the XML transformer abstraction that is compatible with the XML Platform.

Returns:XMLTransformer

a platform specific XML transformer

Annotations
@Override
resolveNamespacePrefixback to summary
public String resolveNamespacePrefix(Node contextNode, String namespacePrefix) throws XMLPlatformException

Implements org.eclipse.persistence.platform.xml.XMLPlatform.resolveNamespacePrefix.

Doc from org.eclipse.persistence.platform.xml.XMLPlatform.resolveNamespacePrefix.

Return the namespace URI for the specified namespace prefix relative to the context node.

Parameters
contextNode:Node

the node to be looking for the namespace URI namespacePrefix the namespace prefix

Returns:String

the namespace URI for the specified prefix

Annotations
@Override
selectNodesAdvancedback to summary
public NodeList selectNodesAdvanced(Node contextNode, String xPathString, XMLNamespaceResolver xmlNamespaceResolver) throws XMLPlatformException

Implements org.eclipse.persistence.platform.xml.XMLPlatform.selectNodesAdvanced.

Execute advanced XPath statements that are required for TopLink EIS.

Parameters
contextNode:Node

the node relative to which the XPath statement will be executed. xPath the XPath statement namespaceResolver used to resolve namespace prefixes to the corresponding namespace URI

Returns:NodeList

the XPath result

Annotations
@Override
selectSingleNodeAdvancedback to summary
public Node selectSingleNodeAdvanced(Node contextNode, String xPathString, XMLNamespaceResolver xmlNamespaceResolver) throws XMLPlatformException

Implements org.eclipse.persistence.platform.xml.XMLPlatform.selectSingleNodeAdvanced.

Execute advanced XPath statements that are required for TopLink EIS.

Annotations
@Override
setDisableSecureProcessingback to summary
public void setDisableSecureProcessing(boolean disableSecureProcessing)

Implements org.eclipse.persistence.platform.xml.XMLPlatform.setDisableSecureProcessing.

Annotations
@Override
validateback to summary
public boolean validate(Element elem, XMLDescriptor xmlDescriptor, ErrorHandler handler) throws XMLPlatformException

Implements org.eclipse.persistence.platform.xml.XMLPlatform.validate.

Doc from org.eclipse.persistence.platform.xml.XMLPlatform.validate.

Validates a document fragment against a complex type or element in the XML schema

Returns:boolean

true if the document fragment is valid, false otherwise

Annotations
@Override
validateDocumentback to summary
public boolean validateDocument(Document document, URL xmlSchemaURL, ErrorHandler errorHandler) throws XMLPlatformException

Implements org.eclipse.persistence.platform.xml.XMLPlatform.validateDocument.

Doc from org.eclipse.persistence.platform.xml.XMLPlatform.validateDocument.

Validate the document against the XML Schema

Parameters
document:Document

the document to be validated

xmlSchemaURL:URL

the XML Schema

errorHandler:ErrorHandler

a mechanism for selectively ignoring errors

Returns:boolean

true if the document is valid, else false

Annotations
@Override