org.cip4.jdflib.core
Class XMLDoc

java.lang.Object
  extended by org.cip4.jdflib.core.XMLDoc
Direct Known Subclasses:
JDFDoc

public class XMLDoc
extends Object

Author:
Dr. Rainer Prosi, Heidelberger Druckmaschinen AG < July 15, 2009

Field Summary
protected  org.apache.commons.logging.Log log
           
protected  DocumentXMLImpl m_doc
           
protected static String sm_strENCODING
          Encoding.
 
Constructor Summary
XMLDoc()
          constructor
XMLDoc(Document document)
          constructor
XMLDoc(DocumentXMLImpl document)
          constructor
XMLDoc(String strDocType)
          Deprecated. use XMLDoc(String strDocType, String namespaceURI)
XMLDoc(String strDocType, String namespaceURI)
          constructor
XMLDoc(XMLDoc other)
          constructor
 
Method Summary
 Node appendChild(Node newChild)
          append a new child node to 'this'
 XMLDoc clone()
          clone the document, completely severing all connections to the original document
 Node cloneNode(boolean deep)
          get a copy of 'this'
 void copyMeta(XMLDoc dMine)
          copy metadata from other document
 Attr createAttribute(String name)
          createAttribute in namespace JDFCoreConstants.NONAMESPACE (DOM Level 2)
 Attr createAttributeNS(String namespaceURI, String qualifiedName)
          create an attribute withe the given name in the given namespace
 CDATASection createCDATASection(String data)
          create a CDATA section, which has this document as ownerDoc
 Comment createComment(String data)
          createComment
 DocumentFragment createDocumentFragment()
          createDocumentFragment
 DocumentType createDocumentType(String qualifiedName, String publicID, String systemID)
          createDocumentType
 Element createElement(String elementName)
          createElement create a JDFElement that floats in nirvana.
 org.apache.xerces.dom.ElementDefinitionImpl createElementDefinition(String name)
          creates an element definition.
 Element createElementNS(String namespaceURI, String qualifiedName)
          create a Element that floats in nirvana, this must be appended to a node with appendChild
 Entity createEntity(String name)
          create an entity
 EntityReference createEntityReference(String name)
          creates an EntityReference
 Event createEvent(String type)
          create an Event object
 org.w3c.dom.traversal.NodeIterator createNodeIterator(Node root, int whatToShow, org.w3c.dom.traversal.NodeFilter filter, boolean entityReferenceExpansion)
          createNodeIterator
 org.w3c.dom.traversal.NodeIterator createNodeIterator(Node root, short whatToShow, org.w3c.dom.traversal.NodeFilter filter)
          create a node iterator
 Notation createNotation(String name)
          creates a Notation having this Document as its OwnerDoc
 ProcessingInstruction createProcessingInstruction(String target, String data)
          creates a ProcessingInstruction having this Document as ownerDoc
 org.w3c.dom.ranges.Range createRange()
          createRange
protected  XMLDoc createRoot(Document document)
           
 Text createTextNode(String data)
          createTextNode
 org.w3c.dom.traversal.TreeWalker createTreeWalker(Node root, int whatToShow, org.w3c.dom.traversal.NodeFilter filter, boolean entityReferenceExpansion)
          creates a TreeWalker
 org.w3c.dom.traversal.TreeWalker createTreeWalker(Node root, short whatToShow, org.w3c.dom.traversal.NodeFilter filter)
          creates a TreeWalker
 boolean equals(Object o)
           
protected  boolean flush()
          Method Flush
clean the m_doc and restart from scratch.
 NamedNodeMap getAttributes()
          get the attributes associated with this node
 javax.mail.BodyPart getBodyPart()
          get the Javax.Mail.BodyPart
 NodeList getChildNodes()
          get the child nodes of this node
 long getDocMemoryUsed()
          rough guestimate of the memory used by this if called after parsing
 DocumentType getDoctype()
          getDoctype
 Element getDocumentElement()
          getDocumentElement
 Element getElementById(String elementId)
          get element with ID = elementId similar to Docoment.getElementByID but works with non schema parsed documents
 NodeList getElementsByTagName(String tagname)
          return a NodeList of all elements having the specified tagname
 NodeList getElementsByTagNameNS(String namespaceURI, String myLocalName)
          get a NodeList of all elements with a given name and namespace URI
 boolean getErrorChecking()
          does the DOM implementation perform error checking upon operations?
 Node getFirstChild()
          get the first child node of 'this'
 Element getIdentifier(String idName)
          gets the element with the registered name = "idName"
 Enumeration<?> getIdentifiers()
          gets the registered identifiers
protected  DocumentXMLImpl getImpl()
           
 DOMImplementation getImplementation()
          getImplementation
 Node getLastChild()
          get the last child node of 'this'
 String getLocalName()
          get the the local part of the qualified name of 'this'
 DocumentXMLImpl getMemberDocument()
          getMemberDocument
 javax.mail.Multipart getMultiPart()
          get the Javax.Mail.Multipart
 Node getNextSibling()
          get the next sibling of 'this'
 String getNodeName()
          gets the node name
 short getNodeType()
          get node type
 String getNodeValue()
          gets the node value
 String getOriginalFileName()
           
 Node getParentNode()
          get the parent node of 'this' node
 String getPrefix()
          get the namespace prefix of 'this' node
 Node getPreviousSibling()
          get the previous sibling of 'this'
 KElement getRoot()
          get the root of the dom tree
 String getSchemaLocation(String nsURI)
           
 File getSchemaLocationFile(String nsURI)
           
protected  XMLParser getXMLParser()
           
 ZipReader getZipReader()
          get the ZipReader
 boolean hasAttributes()
          check if 'this' has attributes
 boolean hasChildNodes()
          test if 'this' has any children
 int hashCode()
           
 Node importNode(Node importedNode, boolean deep)
          copy a node from another document in this document
 Node insertBefore(Node newChild, Node refChild)
          insert a new node before a given node
 boolean isNull()
          check whether the underlying document is null
 boolean isSupported(String feature, String version)
          test whether a specific DOMImplelementation feature is supported by 'this'
 void normalize()
          normalize
static XMLDoc parseFile(File file)
          parse an XML file
static XMLDoc parseFile(String fileName)
          parse an XML file
static XMLDoc parseStream(InputStream is)
          parse a JDF input stream
static XMLDoc parseURL(String url, javax.mail.BodyPart bp)
          parse a given url
 void putIdentifier(String idName, Element element)
          Registers an identifier name with a specified element node
 Node removeChild(Node oldChild)
          remove a child from 'this'
 void removeIdentifier(String idName)
          remove element with identifier "idName"
 Node replaceChild(Node newChild, Node oldChild)
          replace a child node with a new one
 void setBodyPart(javax.mail.BodyPart bodyPart)
          set the Javax.Mail.BodyPart
 void setErrorChecking(boolean check)
          sets whether the DOM implementation performs error checking upon operations
protected  void setMemberDoc(DocumentXMLImpl myDoc)
           
 void setNodeValue(String nodeValue)
          set the node value
 void setNSMap(XMLDoc other)
          set the namespace map from another document
 void setOriginalFileName(String originalFileName)
           
 void setPrefix(String prefix)
          set the namespace prefix of 'this' node
 KElement setRoot(String strDocType, String namespaceURI)
          initialize a new root of strDocType in the document called by constructor XMLDoc(String strDocType)
 void setSchemaLocation(String nsURI, File _schemaLocation)
          set xs:schemalocation to
 void setValidationResult(XMLDoc validationResult)
           
 void setXSLTURL(String url)
          sets the processing instruction for an xslt stylesheet
 void setZipReader(ZipReader zip)
          set the ZipReader
 String toString()
          toString
 String toXML()
          toXML
 boolean write2File(File file, int indent, boolean bPreserveSpace)
          write2File - write to a file; Create if it doesn't exist
 boolean write2File(String oFilePath, int indent)
          Deprecated. 060419 use write2File(oFilePath, indent, true);
 boolean write2File(String oFilePath, int indent, boolean bPreserveSpace)
          write2File - write to a file; Create if it doesn't exist always assume utf-8 encoding
 UrlPart write2HttpURL(URL url, String strContentType, UrlUtil.HTTPDetails det)
           
 HttpURLConnection write2HTTPURL(URL url, String strContentType, UrlUtil.HTTPDetails det)
           
 void write2Stream(OutputStream outStream, int indent)
          Deprecated. use write2Stream(outStream, indent, true);
 void write2Stream(OutputStream outStream, int indent, boolean bPreserveSpace)
          write this to a stream
static void write2StreamStatic(Element elem, OutputStream outStream, int indent)
          Deprecated. 060306
static void write2StreamStatic(Element elem, OutputStream outStream, int indent, boolean bPreserveSpace)
          Deprecated. 060306
 String write2String(int indent)
          write2String - write to a string;
 XMLDoc write2URL(String strURL, String strContentType)
          This method sends the contents of this XMLDoc to the URL strURL and receives the response in the returned XMLDoc.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

m_doc

protected DocumentXMLImpl m_doc

log

protected final org.apache.commons.logging.Log log

sm_strENCODING

protected static final String sm_strENCODING
Encoding.

See Also:
Constant Field Values
Constructor Detail

XMLDoc

public XMLDoc()
constructor


XMLDoc

public XMLDoc(Document document)
constructor

Parameters:
document -

XMLDoc

public XMLDoc(DocumentXMLImpl document)
constructor

Parameters:
document -

XMLDoc

public XMLDoc(XMLDoc other)
constructor

Parameters:
other -

XMLDoc

@Deprecated
public XMLDoc(String strDocType)
Deprecated. use XMLDoc(String strDocType, String namespaceURI)

constructor

Parameters:
strDocType - ElementName.JDF, ElementName.JMF, "Config" ...

XMLDoc

public XMLDoc(String strDocType,
              String namespaceURI)
constructor

Parameters:
strDocType - ElementName.JDF, ElementName.JMF, "Config" ...
namespaceURI - namespace to be used by the new XMLDoc
Method Detail

equals

public boolean equals(Object o)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

createRoot

protected XMLDoc createRoot(Document document)

getImpl

protected DocumentXMLImpl getImpl()

setRoot

public KElement setRoot(String strDocType,
                        String namespaceURI)
initialize a new root of strDocType in the document called by constructor XMLDoc(String strDocType)

Parameters:
strDocType - qualified tag name of the doc root to create if still empty
namespaceURI - namespace URI of the doc root
Returns:
JDFElement - the root element

getMemberDocument

public DocumentXMLImpl getMemberDocument()
getMemberDocument

Returns:
the MemberDocument

flush

protected boolean flush()
Method Flush
clean the m_doc and restart from scratch. The root element remains

Returns:
boolean - true if successful

getRoot

public KElement getRoot()
get the root of the dom tree

Returns:
JDFElement default: getRoot()

write2String

public String write2String(int indent)
write2String - write to a string;

Parameters:
indent - the indentation of the xml
Returns:
String - output

write2File

@Deprecated
public boolean write2File(String oFilePath,
                                     int indent)
Deprecated. 060419 use write2File(oFilePath, indent, true);

write2File - write to a file; Create if it doesn't exist always assume utf-8 encoding

Parameters:
oFilePath -
indent -
Returns:
boolean

write2File

public boolean write2File(String oFilePath,
                          int indent,
                          boolean bPreserveSpace)
write2File - write to a file; Create if it doesn't exist always assume utf-8 encoding

Parameters:
oFilePath - where to write the file
indent - indentation
bPreserveSpace - if true, preserve whitespace
Returns:
boolean - true if successful

write2File

public boolean write2File(File file,
                          int indent,
                          boolean bPreserveSpace)
write2File - write to a file; Create if it doesn't exist

Parameters:
file - the file to write to
indent - indentation
bPreserveSpace - if true, preserve whitespace
Returns:
boolean - true if successful

write2Stream

@Deprecated
public void write2Stream(OutputStream outStream,
                                    int indent)
                  throws IOException
Deprecated. use write2Stream(outStream, indent, true);

Parameters:
outStream -
indent -
Throws:
IOException

write2Stream

public void write2Stream(OutputStream outStream,
                         int indent,
                         boolean bPreserveSpace)
                  throws IOException
write this to a stream

Parameters:
outStream -
indent -
bPreserveSpace -
Throws:
IOException
Since:
080425 synchronized

write2StreamStatic

@Deprecated
public static void write2StreamStatic(Element elem,
                                                 OutputStream outStream,
                                                 int indent)
                               throws IOException
Deprecated. 060306

Parameters:
elem -
outStream -
indent -
Throws:
IOException

write2StreamStatic

@Deprecated
public static void write2StreamStatic(Element elem,
                                                 OutputStream outStream,
                                                 int indent,
                                                 boolean bPreserveSpace)
                               throws IOException
Deprecated. 060306

Parameters:
elem -
outStream -
indent -
bPreserveSpace -
Throws:
IOException

getDoctype

public DocumentType getDoctype()
getDoctype

Returns:
DocumentType

getImplementation

public DOMImplementation getImplementation()
getImplementation

Returns:
DOMImplementation

getDocumentElement

public Element getDocumentElement()
getDocumentElement

Returns:
Element

createElement

public Element createElement(String elementName)
createElement create a JDFElement that floats in nirvana. This must be appended to a node with appendChild (created in namespace JDFCoreConstants.NONAMESPACE (DOM Level 2)).
Another way would be to use KElement.appendElement(String elementName, String nameSpaceURI)

Parameters:
elementName - name of the element that is created
Returns:
Element - unconnected element that is created

createDocumentFragment

public DocumentFragment createDocumentFragment()
createDocumentFragment

Returns:
DocumentFragment

createTextNode

public Text createTextNode(String data)
createTextNode

Parameters:
data -
Returns:
Text

createComment

public Comment createComment(String data)
createComment

Parameters:
data -
Returns:
Comment

createCDATASection

public CDATASection createCDATASection(String data)
create a CDATA section, which has this document as ownerDoc

Parameters:
data - content of the CDATA
Returns:
CDATASection

setXSLTURL

public void setXSLTURL(String url)
sets the processing instruction for an xslt stylesheet

Parameters:
url - the url of the xslt file

createProcessingInstruction

public ProcessingInstruction createProcessingInstruction(String target,
                                                         String data)
creates a ProcessingInstruction having this Document as ownerDoc

Parameters:
target - the target "processor channel"
data - parameter string to be passed to the target
Returns:
ProcessingInstruction

createAttribute

public Attr createAttribute(String name)
createAttribute in namespace JDFCoreConstants.NONAMESPACE (DOM Level 2)

Parameters:
name - attribute name
Returns:
Attr

createEntityReference

public EntityReference createEntityReference(String name)
creates an EntityReference

Parameters:
name - name of the entity to refer to
Returns:
the newly created EntityReference

getElementsByTagName

public NodeList getElementsByTagName(String tagname)
return a NodeList of all elements having the specified tagname

Parameters:
tagname - tag name of the elements to find (JDFCoreConstants.star for all elements)
Returns:
NodeList

importNode

public Node importNode(Node importedNode,
                       boolean deep)
copy a node from another document in this document

Parameters:
importedNode - node to import
deep - if true: recurse and import the subtree under the node as well
Returns:
Node

createElementNS

public Element createElementNS(String namespaceURI,
                               String qualifiedName)
create a Element that floats in nirvana, this must be appended to a node with appendChild

Parameters:
namespaceURI - the namespace uri of the created element
qualifiedName - name of the element that is created
Returns:
Element - unconnected element that is created

createAttributeNS

public Attr createAttributeNS(String namespaceURI,
                              String qualifiedName)
create an attribute withe the given name in the given namespace

Parameters:
namespaceURI - namespace URI of the attribute
qualifiedName - qualified name of the attribute
Returns:
Attr - the newly created attribute

getElementsByTagNameNS

public NodeList getElementsByTagNameNS(String namespaceURI,
                                       String myLocalName)
get a NodeList of all elements with a given name and namespace URI

Parameters:
namespaceURI - the namespace URI to look for
myLocalName - the element name to look for
Returns:
NodeList with all elements found

getElementById

public Element getElementById(String elementId)
get element with ID = elementId similar to Docoment.getElementByID but works with non schema parsed documents

Parameters:
elementId - the element ID to look for
Returns:
the Element found

getNodeName

public String getNodeName()
gets the node name

Returns:
String

getNodeValue

public String getNodeValue()
gets the node value

Returns:
String

setNodeValue

public void setNodeValue(String nodeValue)
set the node value

Parameters:
nodeValue - value to set the node to

setNSMap

public void setNSMap(XMLDoc other)
set the namespace map from another document

Parameters:
other - value to set the node to

getNodeType

public short getNodeType()
get node type

Returns:
a short representing the node type

getParentNode

public Node getParentNode()
get the parent node of 'this' node

Returns:
the parent node

getChildNodes

public NodeList getChildNodes()
get the child nodes of this node

Returns:
a NodeList containing the child nodes

getFirstChild

public Node getFirstChild()
get the first child node of 'this'

Returns:
the first child node

getLastChild

public Node getLastChild()
get the last child node of 'this'

Returns:
the last child node

getPreviousSibling

public Node getPreviousSibling()
get the previous sibling of 'this'

Returns:
the previous sibling node

getNextSibling

public Node getNextSibling()
get the next sibling of 'this'

Returns:
the next sibling node

getAttributes

public NamedNodeMap getAttributes()
get the attributes associated with this node

Returns:
NamedNodeMap containing the attributes associated with this node

insertBefore

public Node insertBefore(Node newChild,
                         Node refChild)
insert a new node before a given node

Parameters:
newChild - the new child node to insert
refChild - the ref child node, the new node is inserted before it
Returns:
Node

replaceChild

public Node replaceChild(Node newChild,
                         Node oldChild)
replace a child node with a new one

Parameters:
newChild - the new child node to add
oldChild - the old child node to be replaced
Returns:
Node

removeChild

public Node removeChild(Node oldChild)
remove a child from 'this'

Parameters:
oldChild - the child node to be removed
Returns:
oldChild, in its new state (removed)

appendChild

public Node appendChild(Node newChild)
append a new child node to 'this'

Parameters:
newChild - new child node to add
Returns:
Node

hasChildNodes

public boolean hasChildNodes()
test if 'this' has any children

Returns:
boolean - true, if 'this' has children

cloneNode

public Node cloneNode(boolean deep)
get a copy of 'this'

Parameters:
deep - true: copy children as well
Returns:
Node - a copy of 'this'

normalize

public void normalize()
normalize


isSupported

public boolean isSupported(String feature,
                           String version)
test whether a specific DOMImplelementation feature is supported by 'this'

Parameters:
feature - package name of the feature to test
version - version number of the package name to test
Returns:
boolean - true, if the feature is sopported
See Also:
Xerxes-Documentation

getPrefix

public String getPrefix()
get the namespace prefix of 'this' node

Returns:
String - namespace prefix (null if unspecified)

setPrefix

public void setPrefix(String prefix)
set the namespace prefix of 'this' node

Parameters:
prefix - namespace prefix

getLocalName

public String getLocalName()
get the the local part of the qualified name of 'this'

Returns:
String - local name

isNull

public boolean isNull()
check whether the underlying document is null

Returns:
true if m_doc==null

hasAttributes

public boolean hasAttributes()
check if 'this' has attributes

Returns:
true, if 'this' has attributes

createDocumentType

public DocumentType createDocumentType(String qualifiedName,
                                       String publicID,
                                       String systemID)
createDocumentType

Parameters:
qualifiedName -
publicID -
systemID -
Returns:
DocumentType

setErrorChecking

public void setErrorChecking(boolean check)
sets whether the DOM implementation performs error checking upon operations

Parameters:
check - true - enable error checking

getErrorChecking

public boolean getErrorChecking()
does the DOM implementation perform error checking upon operations?

Returns:
true - error checking is enabled, otherwise false

createEntity

public Entity createEntity(String name)
create an entity

Parameters:
name - name of the entity
Returns:
Entity - the newly created entity

createNotation

public Notation createNotation(String name)
creates a Notation having this Document as its OwnerDoc

Parameters:
name - name of the notation
Returns:
Notation - the newly created notation

createElementDefinition

public org.apache.xerces.dom.ElementDefinitionImpl createElementDefinition(String name)
creates an element definition. Element definitions hold default attribute values.

Parameters:
name -
Returns:
ElementDefinitionImpl

putIdentifier

public void putIdentifier(String idName,
                          Element element)
Registers an identifier name with a specified element node

Parameters:
idName -
element -

getIdentifier

public Element getIdentifier(String idName)
gets the element with the registered name = "idName"

Parameters:
idName - name of the element to get
Returns:
Element - the element with "idName"

removeIdentifier

public void removeIdentifier(String idName)
remove element with identifier "idName"

Parameters:
idName -

getIdentifiers

public Enumeration<?> getIdentifiers()
gets the registered identifiers

Returns:
Enumeration of registered identifiers

createNodeIterator

public org.w3c.dom.traversal.NodeIterator createNodeIterator(Node root,
                                                             short whatToShow,
                                                             org.w3c.dom.traversal.NodeFilter filter)
create a node iterator

Parameters:
root - the root of the iterator
whatToShow - the whatToShow mask
filter - the node filter (null = no filter)
Returns:
the newly created NodeIterator

createNodeIterator

public org.w3c.dom.traversal.NodeIterator createNodeIterator(Node root,
                                                             int whatToShow,
                                                             org.w3c.dom.traversal.NodeFilter filter,
                                                             boolean entityReferenceExpansion)
createNodeIterator

Parameters:
root - the root of the iterator
whatToShow - the whatToShow mask
filter - the node filter (null = no filter)
entityReferenceExpansion - true: expand the contents of EntityReference nodes
Returns:
the newly created NodeIterator

createTreeWalker

public org.w3c.dom.traversal.TreeWalker createTreeWalker(Node root,
                                                         short whatToShow,
                                                         org.w3c.dom.traversal.NodeFilter filter)
creates a TreeWalker

Parameters:
root - the root of the iterator
whatToShow - the whatToShow mask
filter - the node filter (null = no filter)
Returns:
the newly created TreeWalker

createTreeWalker

public org.w3c.dom.traversal.TreeWalker createTreeWalker(Node root,
                                                         int whatToShow,
                                                         org.w3c.dom.traversal.NodeFilter filter,
                                                         boolean entityReferenceExpansion)
creates a TreeWalker

Parameters:
root - the root of the iterator
whatToShow - the whatToShow mask
filter - the node filter (null = no filter)
entityReferenceExpansion - true: expand the contents of EntityReference nodes
Returns:
the newly created TreeWalker

createRange

public org.w3c.dom.ranges.Range createRange()
createRange

Returns:
Range

createEvent

public Event createEvent(String type)
create an Event object

Parameters:
type - type of Event interface to be created
Returns:
the newly created Event

clone

public XMLDoc clone()
clone the document, completely severing all connections to the original document

Overrides:
clone in class Object
Returns:
Object

toString

public String toString()
toString

Overrides:
toString in class Object
Returns:
String

toXML

public String toXML()
toXML

Returns:
String

setMemberDoc

protected void setMemberDoc(DocumentXMLImpl myDoc)

write2URL

public XMLDoc write2URL(String strURL,
                        String strContentType)
This method sends the contents of this XMLDoc to the URL strURL and receives the response in the returned XMLDoc.

Parameters:
strURL - the URL to write to
strContentType - the content type to write to
Returns:
docResponse the response received from URL. if url is a file, an empty doc is returned A Null document if no response was received, or an exception occurred

getXMLParser

protected XMLParser getXMLParser()

write2HTTPURL

public HttpURLConnection write2HTTPURL(URL url,
                                       String strContentType,
                                       UrlUtil.HTTPDetails det)
Parameters:
url - the url to write to
strContentType - the content type; if null use text/xml
det - the details to set
Returns:
the HttpURLConnection, null if failure

write2HttpURL

public UrlPart write2HttpURL(URL url,
                             String strContentType,
                             UrlUtil.HTTPDetails det)
Parameters:
url - the url to write to
strContentType - the content type; if null use text/xml
det - the details to set
Returns:
the HttpURLConnection, null if failure

getDocMemoryUsed

public long getDocMemoryUsed()
rough guestimate of the memory used by this if called after parsing

Returns:
the difference of memory used when calling compared to construction time

getBodyPart

public javax.mail.BodyPart getBodyPart()
get the Javax.Mail.BodyPart

Returns:
the BodyPart

getMultiPart

public javax.mail.Multipart getMultiPart()
get the Javax.Mail.Multipart

Returns:
the Multipart

setBodyPart

public void setBodyPart(javax.mail.BodyPart bodyPart)
set the Javax.Mail.BodyPart

Parameters:
bodyPart - the value to set

setZipReader

public void setZipReader(ZipReader zip)
set the ZipReader

Parameters:
zip - the value to set

getZipReader

public ZipReader getZipReader()
get the ZipReader

Returns:
zip the value to set

getOriginalFileName

public String getOriginalFileName()
Returns:
Returns the m_OriginalFileName.

setOriginalFileName

public void setOriginalFileName(String originalFileName)
Parameters:
originalFileName - The OriginalFileName to set.

getSchemaLocation

public String getSchemaLocation(String nsURI)
Parameters:
nsURI - the namespace uri to get the schema location for
Returns:
String that corresponds to the schema, null if no schemalocation is defined for nsURI

getSchemaLocationFile

public File getSchemaLocationFile(String nsURI)
Parameters:
nsURI - the namespace uri to get the schema location for
Returns:
File that corresponds to the schema, null if no readable file is found

setSchemaLocation

public void setSchemaLocation(String nsURI,
                              File _schemaLocation)
set xs:schemalocation to

Parameters:
nsURI -
_schemaLocation -

setValidationResult

public void setValidationResult(XMLDoc validationResult)
Parameters:
validationResult - the validationResult to set.

parseStream

public static XMLDoc parseStream(InputStream is)
parse a JDF input stream

Parameters:
is -
Returns:
the parsed JDFDoc

parseFile

public static XMLDoc parseFile(String fileName)
parse an XML file

Parameters:
fileName -
Returns:
the parsed JDFDoc

parseFile

public static XMLDoc parseFile(File file)
parse an XML file

Parameters:
file -
Returns:
the parsed JDFDoc

parseURL

public static XMLDoc parseURL(String url,
                              javax.mail.BodyPart bp)
parse a given url

Parameters:
url - the url to search
bp - the bodypart that the CID url is located in
Returns:
the parsed JDFDoc

copyMeta

public void copyMeta(XMLDoc dMine)
copy metadata from other document

Parameters:
dMine -


Copyright © 2013. All Rights Reserved.