|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.helsinki.dacopan.pef.XMLProtocolEventsReader
public class XMLProtocolEventsReader
The default, DOM-based implementation of the PEF reader.
Field Summary | |
---|---|
protected org.w3c.dom.Document |
document
source DOM document used to populate the view |
static java.lang.String |
DTD_RESOURCE
the classpath resource where the DTD should reside |
static java.lang.String |
DTD_SYSTEM_ID
system id of the DTD that PEF instances should use |
protected DataView |
view
the view to be populated |
Constructor Summary | |
---|---|
XMLProtocolEventsReader()
|
Method Summary | |
---|---|
protected float |
getFloatAttribute(org.w3c.dom.Node node,
java.lang.String name)
Returns the attribute value as a float. |
protected long |
getId(org.w3c.dom.Node node)
Returns the id value of the given node. |
protected long |
getId(org.w3c.dom.Node node,
java.lang.String name)
Returns the id value of the given attribute of the given node. |
protected long[] |
getIdRefs(org.w3c.dom.Node node,
java.lang.String name)
Gets IDREFS in an array. |
protected int |
getIntegerAttribute(org.w3c.dom.Node node,
java.lang.String name)
Returns the attribute value as an integer. |
protected java.lang.String |
getStringAttribute(org.w3c.dom.Node node,
java.lang.String name)
Returns the value of the attribute with the given name. |
protected java.lang.String |
getText(org.w3c.dom.Node node)
Returns the text content of the given node. |
protected org.w3c.dom.Document |
parseDocument(java.io.Reader reader)
Parses the contents of the reader to a DOM document. |
protected void |
processFlows()
|
protected void |
processHosts()
|
protected void |
processLayersAndProtocols()
|
protected void |
processLinks()
|
protected void |
processUnits(ProgressIndicator indicator)
|
protected void |
processVariables()
|
void |
read(java.io.Reader reader,
DataView view)
|
void |
read(java.io.Reader reader,
DataView view,
ProgressIndicator indicator)
Reads in the contents of the reader and notifies the given indicator of any progress being made. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Provides special resolving for the PEF DTD: it is loaded from the classpath. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DTD_SYSTEM_ID
public static final java.lang.String DTD_RESOURCE
protected org.w3c.dom.Document document
protected DataView view
Constructor Detail |
---|
public XMLProtocolEventsReader()
Method Detail |
---|
public void read(java.io.Reader reader, DataView view)
public void read(java.io.Reader reader, DataView view, ProgressIndicator indicator)
read
in interface ProtocolEventsReader
reader
- source of dataview
- target of dataindicator
- progress indicator (optional, can be null)public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
resolveEntity
in interface org.xml.sax.EntityResolver
org.xml.sax.SAXException
java.io.IOException
protected org.w3c.dom.Document parseDocument(java.io.Reader reader)
protected void processHosts()
protected void processFlows()
protected void processLinks()
protected void processLayersAndProtocols()
protected void processVariables()
protected void processUnits(ProgressIndicator indicator)
protected long getId(org.w3c.dom.Node node)
protected long getId(org.w3c.dom.Node node, java.lang.String name)
protected java.lang.String getStringAttribute(org.w3c.dom.Node node, java.lang.String name)
protected long[] getIdRefs(org.w3c.dom.Node node, java.lang.String name)
protected int getIntegerAttribute(org.w3c.dom.Node node, java.lang.String name)
protected float getFloatAttribute(org.w3c.dom.Node node, java.lang.String name)
protected java.lang.String getText(org.w3c.dom.Node node)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |