org.plasma.sdo.core
Class CoreXMLDocument

java.lang.Object
  extended by org.plasma.sdo.core.CoreXMLDocument
All Implemented Interfaces:
XMLDocument

public class CoreXMLDocument
extends Object
implements XMLDocument


Constructor Summary
CoreXMLDocument(DataObject rootDataObject)
           
CoreXMLDocument(DataObject rootDataObject, String rootElementURI, String rootElementName)
           
CoreXMLDocument(DataObject rootDataObject, XMLOptions xmlOptions)
           
 
Method Summary
 String getEncoding()
          Return the XML encoding of the document, or null if not specified.
 String getNoNamespaceSchemaLocation()
          Return the value of the noNamespaceSchemaLocation declaration for the http://www.w3.org/2001/XMLSchema-instance namespace in the root element, or null if not present.
 String getRootElementName()
          Return the name of the root element.
 String getRootElementURI()
          Return the targetNamespace URI for the root element.
 DataObject getRootObject()
          Return the root DataObject for the XMLDocument.
 String getSchemaLocation()
          Return the value of the schemaLocation declaration for the http://www.w3.org/2001/XMLSchema-instance namespace in the root element, or null if not present.
 String getXMLVersion()
          Return the XML version of the document, or null if not specified.
 boolean isXMLDeclaration()
          Return the XML declaration of the document.
 void setEncoding(String encoding)
          Set the XML encoding of the document, or null if not specified.
 void setNoNamespaceSchemaLocation(String schemaLocation)
          Sets the value of the noNamespaceSchemaLocation declaration for the http://www.w3.org/2001/XMLSchema-instance namespace in the root element, or null if it should not be present.
 void setSchemaLocation(String schemaLocation)
          Sets the value of the schemaLocation declaration for the http://www.w3.org/2001/XMLSchema-instance namespace in the root element, or null if it should not be present.
 void setXMLDeclaration(boolean xmlDeclaration)
          Set the XML declaration version of the document.
 void setXMLVersion(String xmlVersion)
          Set the XML version of the document, or null if not specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoreXMLDocument

public CoreXMLDocument(DataObject rootDataObject)

CoreXMLDocument

public CoreXMLDocument(DataObject rootDataObject,
                       XMLOptions xmlOptions)

CoreXMLDocument

public CoreXMLDocument(DataObject rootDataObject,
                       String rootElementURI,
                       String rootElementName)
Method Detail

getEncoding

public String getEncoding()
Return the XML encoding of the document, or null if not specified. The default value is "UTF-8". Specification of other values is implementation-dependent.

Specified by:
getEncoding in interface XMLDocument
Returns:
the XML encoding of the document, or null if not specified.

getNoNamespaceSchemaLocation

public String getNoNamespaceSchemaLocation()
Return the value of the noNamespaceSchemaLocation declaration for the http://www.w3.org/2001/XMLSchema-instance namespace in the root element, or null if not present.

Specified by:
getNoNamespaceSchemaLocation in interface XMLDocument
Returns:
the value of the noNamespaceSchemaLocation declaration, or null if not present.

getRootElementName

public String getRootElementName()
Return the name of the root element. The root element is a global element of the XML Schema with a type compatible to the DataObject.

Specified by:
getRootElementName in interface XMLDocument
Returns:
the name of the root element.

getRootElementURI

public String getRootElementURI()
Return the targetNamespace URI for the root element. If there is no targetNamespace URI, the value is null. The root element is a global element of the XML Schema with a type compatible to the DataObject.

Specified by:
getRootElementURI in interface XMLDocument
Returns:
the targetNamespace URI for the root element.

getRootObject

public DataObject getRootObject()
Return the root DataObject for the XMLDocument.

Specified by:
getRootObject in interface XMLDocument
Returns:
root DataObject for the XMLDocument.

getSchemaLocation

public String getSchemaLocation()
Return the value of the schemaLocation declaration for the http://www.w3.org/2001/XMLSchema-instance namespace in the root element, or null if not present.

Specified by:
getSchemaLocation in interface XMLDocument
Returns:
the value of the schemaLocation declaration, or null if not present.

getXMLVersion

public String getXMLVersion()
Description copied from interface: XMLDocument
Return the XML version of the document, or null if not specified. The default value is "1.0". Specification of other values is implementation-dependent.

Specified by:
getXMLVersion in interface XMLDocument
Returns:
the XML version of the document, or null if not specified.

isXMLDeclaration

public boolean isXMLDeclaration()
Description copied from interface: XMLDocument
Return the XML declaration of the document. If true, XMLHelper save() will produce a declaration of the form: Encoding will be suppressed if getEncoding() is null. The default value is true.

Specified by:
isXMLDeclaration in interface XMLDocument
Returns:
the XML declaration of the document.

setEncoding

public void setEncoding(String encoding)
Description copied from interface: XMLDocument
Set the XML encoding of the document, or null if not specified.

Specified by:
setEncoding in interface XMLDocument

setNoNamespaceSchemaLocation

public void setNoNamespaceSchemaLocation(String schemaLocation)
Description copied from interface: XMLDocument
Sets the value of the noNamespaceSchemaLocation declaration for the http://www.w3.org/2001/XMLSchema-instance namespace in the root element, or null if it should not be present.

Specified by:
setNoNamespaceSchemaLocation in interface XMLDocument
Parameters:
schemaLocation - the value of the noNamespaceSchemaLocation declaration, or null.

setSchemaLocation

public void setSchemaLocation(String schemaLocation)
Description copied from interface: XMLDocument
Sets the value of the schemaLocation declaration for the http://www.w3.org/2001/XMLSchema-instance namespace in the root element, or null if it should not be present.

Specified by:
setSchemaLocation in interface XMLDocument
Parameters:
schemaLocation - the value of the schemaLocation declaration, or null.

setXMLDeclaration

public void setXMLDeclaration(boolean xmlDeclaration)
Description copied from interface: XMLDocument
Set the XML declaration version of the document.

Specified by:
setXMLDeclaration in interface XMLDocument
Parameters:
xmlDeclaration - the XML declaration version of the document.

setXMLVersion

public void setXMLVersion(String xmlVersion)
Description copied from interface: XMLDocument
Set the XML version of the document, or null if not specified.

Specified by:
setXMLVersion in interface XMLDocument
Parameters:
xmlVersion - the XML version of the document, or null if not specified.


Copyright © 2014. All rights reserved.