|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcwi.GraphXML.Elements.Reference
public class Reference
This class represents a link reference as used in the GraphXML dtd.
The real references are stored in java.net.URL objects. As a reminder: the URL.getRef()
method can be used to retrieve the "anchor", or the "reference" part of the url, ie,
the portion following the "#" character. This portion is usually used to refer to the
a graph in the same file.
Formally, each URL specification must have a protocol part, ie, the form
<... href="#name"/>is not valid. This implementation catches this problem, and adds the "file" protocol to the url.
Constructor Summary | |
---|---|
Reference(java.net.URL u,
java.lang.String cr,
java.lang.String ct)
|
Method Summary | |
---|---|
static Reference |
create(org.w3c.dom.Node node,
ParserError parserError)
Retrieve the representation of a reference from a node, and returns a corresponding class instance. |
static Reference |
create(org.w3c.dom.Node node,
java.lang.String attrName,
ParserError parserError)
Retrieve the representation of a reference from a node via the given attribute name, and return a corresponding class instance. |
java.lang.String |
getContentRole()
|
java.lang.String |
getContentTitle()
|
java.net.URL |
getURL()
|
java.lang.String |
toString()
Overrides the corresponding public method in Object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
Reference(java.net.URL u, java.lang.String cr, java.lang.String ct)
Method Detail |
---|
public java.net.URL getURL()
public java.lang.String getContentRole()
public java.lang.String getContentTitle()
public static Reference create(org.w3c.dom.Node node, ParserError parserError)
node
- The node containing the xlink informationparserError
- The parser in charge; used to generate error messages
public static Reference create(org.w3c.dom.Node node, java.lang.String attrName, ParserError parserError)
< edge source="xlink:href='#subgraph0.source'" target="target" >
< edge source="source" target="xlink:href='#subgraph1.target'" >
node
- The node containing the xlink informationattrName
- The specific attribute of the node containing the xlink informationparserError
- The parser in charge; used to generate error messages
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |