org.arakhne.neteditor.io.gxl
public class GXLReader extends AbstractXMLToolReader implements GXLConstants
GXL (Graph eXchange Language) is designed to be a standard exchange format for graphs. GXL is an XML sublanguage and the syntax is given by a XML DTD (Document Type Definition). This exchange format offers an adaptable and flexible means to support interoperability between graph-based tools.
PROGRESS_STEP_SIZE_IN_ITERATORA_DIRECTION, A_EDGEIDS, A_EDGEMODE, A_FROM, A_ID, A_IDREF, A_ISDIRECTED, A_SPECIFICATION_VERSION, A_TO, A_XLINK_TYPE, A_XMLNS_NETEDITOR, A_XMLNS_XLINK, C_ATTR_LABEL, C_GXL_DTD_FILENAME, C_GXL_DTD_URL, C_GXL_EDGE_DEFAULTDIRECTED, C_GXL_NONE, C_GXL_REL_IN, C_GXL_REL_OUT, C_INTERNAL_COERCION_RELATION_TYPE, C_INTERNAL_NODE_ANCHOR_RELATION_TYPE, C_INTERNAL_VIEW_RELATION_TYPE, C_INTERNAL_VIEW_TYPE, C_NETEDITOR_NS_URI, C_XLINK_NS_URI, C_XLINK_SIMPLE, N_EDGE, N_GRAPH, N_GXL, N_NODE, N_REL, N_RELEND, N_TYPEA_NAME, A_XLINK_HREF, N_ATTR, N_BAG, N_BOOL, N_ENUM, N_FLOAT, N_INT, N_LOCATOR, N_SEQ, N_SET, N_STRING, SCHEMA_URL| Constructor and Description |
|---|
GXLReader() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
extractType(Element node)
Extract the type of the specified node as a string.
|
NetEditorContentType |
getContentType()
Replies the type of the last read content by this reader.
|
static String |
getPublicDTD()
Replies the public DTD for GraphML.
|
static URL |
getSystemDTD()
Replies the system DTD for GraphML.
|
boolean |
isDTDValidation()
Replies if the DTD is validating when reading.
|
boolean |
isFigureConnection()
Replies the flag that permits to connect the model objects and
the figures, or not.
|
<G extends Graph<?,?,?,?>> |
read(Class<G> type,
File inputFile,
Map<UUID,List<ViewComponent>> figures)
Read the specified input stream as a XML file,
and extract a graph model and its associated figures.
|
<G extends Graph<?,?,?,?>> |
read(Class<G> type,
InputStream is,
Map<UUID,List<ViewComponent>> figures)
Read the specified input stream as a GXL file,
and extract a graph model and its associated figures.
|
<G extends Graph<?,?,?,?>> |
read(Class<G> type,
URL inputURL,
Map<UUID,List<ViewComponent>> figures)
Read the specified input stream as a XML file,
and extract a graph model and its associated figures.
|
void |
setDTDValidation(boolean dtdValidation)
Set the flag that permits to validate, or not, the DTD.
|
void |
setFigureConnection(boolean connectFigures)
Set the flag that permits to connect the model objects and
the figures, or not.
|
createFigureInstance, createInstance, elementIterator, elementIterator, elements, elements, elements, elements, enforceUUID, extractNode, extractNodeNoFail, extractTypeClass, isGraphModel, parseUUIDgetProgression, getReaderVersion, getResourceRepository, setProgression, setResourceRepositorypublic static String getPublicDTD()
public static URL getSystemDTD()
public void setFigureConnection(boolean connectFigures)
connectFigures - indicates if the figures should be linked to their model
objects.public boolean isFigureConnection()
true if the figures should be linked to their model
objects; otherwise false.public void setDTDValidation(boolean dtdValidation)
dtdValidation - indicates if the DTD should be validated.public boolean isDTDValidation()
true if the DTD is validated; otherwise false.public final NetEditorContentType getContentType()
getContentType in interface NetEditorReadernull if unknown.public final <G extends Graph<?,?,?,?>> G read(Class<G> type, File inputFile, Map<UUID,List<ViewComponent>> figures) throws IOException
NetEditorReaderread in interface NetEditorReaderG - is the expected type of the graph to read from the stream.type - is the expected type of the graph to read from the stream.inputFile - is the file to read.figures - is the collection of figures that were read from the input stream, from the front to the background.IOExceptionpublic final <G extends Graph<?,?,?,?>> G read(Class<G> type, URL inputURL, Map<UUID,List<ViewComponent>> figures) throws IOException
NetEditorReaderread in interface NetEditorReaderG - is the expected type of the graph to read from the stream.type - is the expected type of the graph to read from the stream.inputURL - is the URL to read.figures - is the collection of figures that were read from the input stream, from the front to the background.IOExceptionpublic <G extends Graph<?,?,?,?>> G read(Class<G> type, InputStream is, Map<UUID,List<ViewComponent>> figures) throws IOException
NetEditorReaderread in interface NetEditorReaderG - is the expected type of the graph to read from the stream.type - is the expected type of the graph to read from the stream.is - is the input stream.figures - is the collection of figures that were read from the input stream, from the front to the background.IOExceptionprotected String extractType(Element node) throws IOException
AbstractXMLToolReaderextractType in class AbstractXMLToolReadernode - is the node to explorenull.IOExceptionCopyright © 2001-2013 NetEditor Developers. 
NetEditor API Documentation by NetEditor Developers is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Based on a work at www.arakhne.org/neteditor