Class JAXPPlatform
- java.lang.Object
-
- org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform
-
- All Implemented Interfaces:
XMLPlatform
public class JAXPPlatform extends java.lang.Object implements XMLPlatform
Purpose: An implementation of XMLPlatform using JAXP 1.3 APIs.
-
-
Constructor Summary
Constructors Constructor Description JAXPPlatform()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.DocumentcreateDocument()Creates a new document.org.w3c.dom.DocumentcreateDocumentWithPublicIdentifier(java.lang.String name, java.lang.String publicIdentifier, java.lang.String systemIdentifier)Creates a new document with the specified public and system identifiers in the DOCTYPE, and adds a root element with the specified name.org.w3c.dom.DocumentcreateDocumentWithSystemIdentifier(java.lang.String name, java.lang.String systemIdentifier)Creates a new document with the specified system identifier in the DOCTYPE, and adds a root element with the specified name.javax.xml.validation.SchemaFactorygetSchemaFactory()javax.xml.xpath.XPathFactorygetXPathFactory()booleanisSecureProcessingDisabled()booleanisWhitespaceNode(org.w3c.dom.Text text)Check to see if the text node represents a whitespace node.voidnamespaceQualifyFragment(org.w3c.dom.Element next)XMLParsernewXMLParser()Return a concrete implementation of the XML parser abstraction that is compatible with the XML Platform.XMLParsernewXMLParser(java.util.Map<java.lang.String,java.lang.Boolean> parserFeatures)Return a concrete implementation of the XML parser abstraction that is compatible with the XML Platform, based on these parser features.XMLTransformernewXMLTransformer()Return a concrete implementation of the XML transformer abstraction that is compatible with the XML Platform.java.lang.StringresolveNamespacePrefix(org.w3c.dom.Node contextNode, java.lang.String namespacePrefix)Return the namespace URI for the specified namespace prefix relative to the context node.org.w3c.dom.NodeListselectNodesAdvanced(org.w3c.dom.Node contextNode, java.lang.String xPathString, XMLNamespaceResolver xmlNamespaceResolver)Execute advanced XPath statements that are required for TopLink EIS.org.w3c.dom.NodeselectSingleNodeAdvanced(org.w3c.dom.Node contextNode, java.lang.String xPathString, XMLNamespaceResolver xmlNamespaceResolver)Execute advanced XPath statements that are required for TopLink EIS.voidsetDisableSecureProcessing(boolean disableSecureProcessing)booleanvalidate(org.w3c.dom.Element elem, XMLDescriptor xmlDescriptor, org.xml.sax.ErrorHandler handler)Validates a document fragment against a complex type or element in the XML schemabooleanvalidateDocument(org.w3c.dom.Document document, java.net.URL xmlSchemaURL, org.xml.sax.ErrorHandler errorHandler)Validate the document against the XML Schema
-
-
-
Method Detail
-
getXPathFactory
public javax.xml.xpath.XPathFactory getXPathFactory()
-
getSchemaFactory
public javax.xml.validation.SchemaFactory getSchemaFactory()
-
selectNodesAdvanced
public org.w3c.dom.NodeList selectNodesAdvanced(org.w3c.dom.Node contextNode, java.lang.String xPathString, XMLNamespaceResolver xmlNamespaceResolver) throws XMLPlatformExceptionExecute advanced XPath statements that are required for TopLink EIS.- Specified by:
selectNodesAdvancedin interfaceXMLPlatform- Parameters:
contextNode- 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:
- the XPath result
- Throws:
XMLPlatformException
-
selectSingleNodeAdvanced
public org.w3c.dom.Node selectSingleNodeAdvanced(org.w3c.dom.Node contextNode, java.lang.String xPathString, XMLNamespaceResolver xmlNamespaceResolver) throws XMLPlatformExceptionExecute advanced XPath statements that are required for TopLink EIS.- Specified by:
selectSingleNodeAdvancedin interfaceXMLPlatform- Parameters:
contextNode-xPathString-xmlNamespaceResolver-- Returns:
- Throws:
XMLPlatformException
-
isWhitespaceNode
public boolean isWhitespaceNode(org.w3c.dom.Text text)
Description copied from interface:XMLPlatformCheck to see if the text node represents a whitespace node.- Specified by:
isWhitespaceNodein interfaceXMLPlatform- Parameters:
text- a potential whitespace node- Returns:
- if the text node represents a whitespace node.
-
newXMLParser
public XMLParser newXMLParser()
Description copied from interface:XMLPlatformReturn a concrete implementation of the XML parser abstraction that is compatible with the XML Platform.- Specified by:
newXMLParserin interfaceXMLPlatform- Returns:
- a platform specific XML parser
-
newXMLParser
public XMLParser newXMLParser(java.util.Map<java.lang.String,java.lang.Boolean> parserFeatures)
Description copied from interface:XMLPlatformReturn a concrete implementation of the XML parser abstraction that is compatible with the XML Platform, based on these parser features.- Specified by:
newXMLParserin interfaceXMLPlatform- Returns:
- a platform specific XML parser
-
newXMLTransformer
public XMLTransformer newXMLTransformer()
Description copied from interface:XMLPlatformReturn a concrete implementation of the XML transformer abstraction that is compatible with the XML Platform.- Specified by:
newXMLTransformerin interfaceXMLPlatform- Returns:
- a platform specific XML transformer
-
createDocument
public org.w3c.dom.Document createDocument() throws XMLPlatformExceptionDescription copied from interface:XMLPlatformCreates a new document.- Specified by:
createDocumentin interfaceXMLPlatform- Returns:
- the new document
- Throws:
XMLPlatformException
-
createDocumentWithPublicIdentifier
public org.w3c.dom.Document createDocumentWithPublicIdentifier(java.lang.String name, java.lang.String publicIdentifier, java.lang.String systemIdentifier) throws XMLPlatformExceptionDescription copied from interface:XMLPlatformCreates a new document with the specified public and system identifiers in the DOCTYPE, and adds a root element with the specified name.- Specified by:
createDocumentWithPublicIdentifierin interfaceXMLPlatform- Parameters:
name- the name of the root element publicIdentifier the public identifier systemIdentifier the system identifier- Returns:
- the new document
- Throws:
XMLPlatformException
-
createDocumentWithSystemIdentifier
public org.w3c.dom.Document createDocumentWithSystemIdentifier(java.lang.String name, java.lang.String systemIdentifier) throws XMLPlatformExceptionDescription copied from interface:XMLPlatformCreates a new document with the specified system identifier in the DOCTYPE, and adds a root element with the specified name.- Specified by:
createDocumentWithSystemIdentifierin interfaceXMLPlatform- Parameters:
name- the name of the root element systemIdentifier the system identifier- Returns:
- the new document
- Throws:
XMLPlatformException
-
resolveNamespacePrefix
public java.lang.String resolveNamespacePrefix(org.w3c.dom.Node contextNode, java.lang.String namespacePrefix) throws XMLPlatformExceptionDescription copied from interface:XMLPlatformReturn the namespace URI for the specified namespace prefix relative to the context node.- Specified by:
resolveNamespacePrefixin interfaceXMLPlatform- Parameters:
contextNode- the node to be looking for the namespace URI namespacePrefix the namespace prefix- Returns:
- the namespace URI for the specified prefix
- Throws:
XMLPlatformException
-
validateDocument
public boolean validateDocument(org.w3c.dom.Document document, java.net.URL xmlSchemaURL, org.xml.sax.ErrorHandler errorHandler) throws XMLPlatformExceptionDescription copied from interface:XMLPlatformValidate the document against the XML Schema- Specified by:
validateDocumentin interfaceXMLPlatform- Parameters:
document- the document to be validatedxmlSchemaURL- the XML SchemaerrorHandler- a mechanism for selectively ignoring errors- Returns:
- true if the document is valid, else false
- Throws:
XMLPlatformException
-
validate
public boolean validate(org.w3c.dom.Element elem, XMLDescriptor xmlDescriptor, org.xml.sax.ErrorHandler handler) throws XMLPlatformExceptionDescription copied from interface:XMLPlatformValidates a document fragment against a complex type or element in the XML schema- Specified by:
validatein interfaceXMLPlatform- Returns:
- true if the document fragment is valid, false otherwise
- Throws:
XMLPlatformException
-
namespaceQualifyFragment
public void namespaceQualifyFragment(org.w3c.dom.Element next)
- Specified by:
namespaceQualifyFragmentin interfaceXMLPlatform- Parameters:
next- Element to qualify
-
setDisableSecureProcessing
public void setDisableSecureProcessing(boolean disableSecureProcessing)
- Specified by:
setDisableSecureProcessingin interfaceXMLPlatform
-
isSecureProcessingDisabled
public boolean isSecureProcessingDisabled()
- Specified by:
isSecureProcessingDisabledin interfaceXMLPlatform
-
-