edu.sc.seis.fissuresUtil.xml
Class SimpleXLink
java.lang.Object
edu.sc.seis.fissuresUtil.xml.SimpleXLink
public class SimpleXLink
- extends java.lang.Object
Represents a simple XLink. Provides methods for following the link if the
protocol is known, ie URLConnection can be gotten from Java.
Field Summary |
protected java.net.URL |
base
|
protected javax.xml.parsers.DocumentBuilder |
docBuilder
|
protected org.w3c.dom.Element |
element
|
Method Summary |
static void |
main(java.lang.String[] args)
|
org.w3c.dom.Element |
retrieve()
Trys to retrieve as an XML Element referenced by this simple XLink. |
org.w3c.dom.Element |
retrieve(org.w3c.dom.Node context,
java.lang.String path)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
element
protected org.w3c.dom.Element element
docBuilder
protected javax.xml.parsers.DocumentBuilder docBuilder
base
protected java.net.URL base
retrieve
public org.w3c.dom.Element retrieve()
throws java.net.MalformedURLException,
java.io.IOException,
org.xml.sax.SAXException,
javax.xml.transform.TransformerException
- Trys to retrieve as an XML Element referenced by this simple XLink.
It is assumed that the href attribute is name spaced with xlink.
- Throws:
java.lang.IllegalArgumentException
- if the link is not a simple xlink
java.net.MalformedURLException
java.io.IOException
org.xml.sax.SAXException
javax.xml.transform.TransformerException
retrieve
public org.w3c.dom.Element retrieve(org.w3c.dom.Node context,
java.lang.String path)
throws java.net.MalformedURLException,
java.io.IOException,
org.xml.sax.SAXException,
javax.xml.transform.TransformerException
- Throws:
java.net.MalformedURLException
java.io.IOException
org.xml.sax.SAXException
javax.xml.transform.TransformerException
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception