Package org.graphstream.stream.file
Class FileSourceGraphML
java.lang.Object
org.graphstream.stream.SourceBase
org.graphstream.stream.file.FileSourceXML
org.graphstream.stream.file.FileSourceGraphML
- All Implemented Interfaces:
XMLStreamConstants
,FileSource
,Source
public class FileSourceGraphML extends FileSourceXML
GraphML is a comprehensive and easy-to-use file format for graphs. It
consists of a language core to describe the structural properties of a graph
and a flexible extension mechanism to add application-specific data. Its main
features include support of
- directed, undirected, and mixed graphs,
- hypergraphs,
- hierarchical graphs,
- graphical representations,
- references to external data,
- application-specific attribute data, and
- light-weight parsers.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FileSourceGraphML.GraphMLConstants
Nested classes/interfaces inherited from class org.graphstream.stream.SourceBase
SourceBase.ElementType
-
Field Summary
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
-
Constructor Summary
Constructors Constructor Description FileSourceGraphML()
Build a new source to parse an xml stream in GraphML format. -
Method Summary
Modifier and Type Method Description boolean
nextEvents()
Try to process one graph event, or as few as possible, if more must be read at once.Methods inherited from class org.graphstream.stream.file.FileSourceXML
begin, begin, begin, begin, end, isStrictMode, nextStep, readAll, readAll, readAll, readAll, setStrictMode
Methods inherited from class org.graphstream.stream.SourceBase
addAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, removeAttributeSink, removeElementSink, removeSink, sendAttributeChangedEvent, sendAttributeChangedEvent, sendEdgeAdded, sendEdgeAdded, sendEdgeAttributeAdded, sendEdgeAttributeAdded, sendEdgeAttributeChanged, sendEdgeAttributeChanged, sendEdgeAttributeRemoved, sendEdgeAttributeRemoved, sendEdgeRemoved, sendEdgeRemoved, sendGraphAttributeAdded, sendGraphAttributeAdded, sendGraphAttributeChanged, sendGraphAttributeChanged, sendGraphAttributeRemoved, sendGraphAttributeRemoved, sendGraphCleared, sendGraphCleared, sendNodeAdded, sendNodeAdded, sendNodeAttributeAdded, sendNodeAttributeAdded, sendNodeAttributeChanged, sendNodeAttributeChanged, sendNodeAttributeRemoved, sendNodeAttributeRemoved, sendNodeRemoved, sendNodeRemoved, sendStepBegins, sendStepBegins
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.graphstream.stream.Source
addAttributeSink, addElementSink, addSink, clearAttributeSinks, clearElementSinks, clearSinks, removeAttributeSink, removeElementSink, removeSink
-
Constructor Details
-
FileSourceGraphML
public FileSourceGraphML()Build a new source to parse an xml stream in GraphML format.
-
-
Method Details
-
nextEvents
Description copied from interface:FileSource
Try to process one graph event, or as few as possible, if more must be read at once. For this method to work, you must have calledFileSource.begin(InputStream)
orFileSource.begin(String)
before. This method return true while there are still events to read.- Specified by:
nextEvents
in interfaceFileSource
- Specified by:
nextEvents
in classFileSourceXML
- Returns:
- true if there are still events to read, false as soon as the file is finished.
- Throws:
IOException
- If an I/O error occurs while reading.
-