DLESE Tools
v1.6.0

org.dlese.dpc.standards.asn
Class NameSpaceXMLDocReader

java.lang.Object
  extended by org.dlese.dpc.standards.asn.NameSpaceXMLDocReader
Direct Known Subclasses:
ASNResReader, MetsIngester, SIFDocReader

public class NameSpaceXMLDocReader
extends Object

Class to read the ASN topics docuement and provide lookups by topic purl.

Author:
Jonathan Ostwald

Constructor Summary
NameSpaceXMLDocReader(Document doc)
           
NameSpaceXMLDocReader(File file)
          Constructor for the NameSpaceXMLDocReader object
NameSpaceXMLDocReader(String xml)
           
NameSpaceXMLDocReader(URL url)
          Constructor for the NameSpaceXMLDocReader object
 
Method Summary
 void destroy()
           
 String getChildElementAttribute(Element e, String childElementName, String attributeName)
           
 String getChildElementText(Element e, String childElementName)
           
 Document getDocument()
           
 Namespace getNamespace(String prefix)
           
 Node getNode(Node baseNode, String xpath)
           
 Node getNode(String xpath)
          Gets the node attribute of the NameSpaceXMLDocReader object
 List getNodes(Node baseNode, String path)
           
 List getNodes(String path)
          Gets the nodes attribute of the NameSpaceXMLDocReader object
 String getNodeText(String xpath)
           
 QName getQName(String qualifiedName)
           
 Element getRootElement()
           
 String getValueAtPath(Element baseElement, String relativePath)
           
 XPath getXPath(String path)
          Gets the xPath attribute of the NameSpaceXMLDocReader object
protected  void init()
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameSpaceXMLDocReader

public NameSpaceXMLDocReader(String xml)
                      throws Exception
Throws:
Exception

NameSpaceXMLDocReader

public NameSpaceXMLDocReader(Document doc)
                      throws Exception
Throws:
Exception

NameSpaceXMLDocReader

public NameSpaceXMLDocReader(URL url)
                      throws Exception
Constructor for the NameSpaceXMLDocReader object

Parameters:
url - NOT YET DOCUMENTED
nsContext - NOT YET DOCUMENTED
Throws:
Exception - NOT YET DOCUMENTED

NameSpaceXMLDocReader

public NameSpaceXMLDocReader(File file)
                      throws Exception
Constructor for the NameSpaceXMLDocReader object

Parameters:
url - NOT YET DOCUMENTED
nsContext - NOT YET DOCUMENTED
Throws:
Exception - NOT YET DOCUMENTED
Method Detail

init

protected void init()
             throws Exception
Throws:
Exception

getQName

public QName getQName(String qualifiedName)

getNamespace

public Namespace getNamespace(String prefix)

getDocument

public Document getDocument()

getRootElement

public Element getRootElement()

getNodeText

public String getNodeText(String xpath)

getValueAtPath

public String getValueAtPath(Element baseElement,
                             String relativePath)
                      throws Exception
Throws:
Exception

getNode

public Node getNode(String xpath)
Gets the node attribute of the NameSpaceXMLDocReader object

Parameters:
xpath - NOT YET DOCUMENTED
Returns:
The node value

getNode

public Node getNode(Node baseNode,
                    String xpath)

getNodes

public List getNodes(String path)
Gets the nodes attribute of the NameSpaceXMLDocReader object

Parameters:
path - NOT YET DOCUMENTED
Returns:
The nodes value

getNodes

public List getNodes(Node baseNode,
                     String path)

getXPath

public XPath getXPath(String path)
Gets the xPath attribute of the NameSpaceXMLDocReader object

Parameters:
path - NOT YET DOCUMENTED
Returns:
The xPath value

getChildElementText

public String getChildElementText(Element e,
                                  String childElementName)

getChildElementAttribute

public String getChildElementAttribute(Element e,
                                       String childElementName,
                                       String attributeName)

destroy

public void destroy()

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

DLESE Tools
v1.6.0