Package it.univr.di.cstnu.graph
Class TNGraphMLWriter
java.lang.Object
edu.uci.ics.jung.io.GraphMLWriter<LabeledNode,Edge>
 
it.univr.di.cstnu.graph.TNGraphMLWriter
Allows the writing of a Temporal Network graph to a file or a string in GraphML format.
 
GraphML format allows the definition of different attributes for the TNGraph, vertices, and edges.
All attributes are defined in the first part of a GraphML file. Examples of GraphML files that this class can read are given in the Instances directory under CstnuTool one.
It assumes that nodes are LabeledNode and edges are Edge.
- Version:
 - $Rev: 995 $
 - Author:
 - posenato
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String(package private) edu.uci.ics.jung.algorithms.layout.AbstractLayout<LabeledNode, ? extends Edge> (package private) static final Loggerloggerstatic final String(package private) TNGraph.NetworkTypeGraph typestatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class edu.uci.ics.jung.io.GraphMLWriter
directed, edge_data, edge_desc, edge_ids, graph_data, graph_desc, nest_level, vertex_data, vertex_desc, vertex_ids - 
Constructor Summary
ConstructorsConstructorDescriptionTNGraphMLWriter(edu.uci.ics.jung.algorithms.layout.AbstractLayout<LabeledNode, ? extends Edge> lay) Constructor for TNGraphMLWriter. - 
Method Summary
Modifier and TypeMethodDescriptionHelper method for makingGraphMLWriter.save(Hypergraph, Writer)easier.voidHelper method for makingGraphMLWriter.save(Hypergraph, Writer)easier.voidMethods inherited from class edu.uci.ics.jung.io.GraphMLWriter
addEdgeData, addGraphData, addVertexData, format, save, setEdgeData, setEdgeDescriptions, setEdgeIDs, setGraphData, setGraphDescriptions, setVertexData, setVertexDescriptions, setVertexIDs, writeEdgeData, writeIndentedText, writeKeySpecification, writeVertexData 
- 
Field Details
- 
EDGE_CASE_VALUE_KEY
- See Also:
 
 - 
EDGE_LABELED_LC_VALUE_KEY
- See Also:
 
 - 
EDGE_LABELED_UC_VALUE_KEY
- See Also:
 
 - 
EDGE_LABELED_VALUE_KEY
- See Also:
 
 - 
EDGE_TYPE_KEY
- See Also:
 
 - 
EDGE_VALUE_KEY
- See Also:
 
 - 
GRAPH_NAME_KEY
- See Also:
 
 - 
GRAPH_nCTG_KEY
- See Also:
 
 - 
GRAPH_nEDGES_KEY
- See Also:
 
 - 
GRAPH_nOBS_KEY
- See Also:
 
 - 
GRAPH_nVERTICES_KEY
- See Also:
 
 - 
NETWORK_TYPE_KEY
- See Also:
 
 - 
NODE_LABEL_KEY
- See Also:
 
 - 
NODE_LOGNORMALDISTRIBUTION_KEY
- See Also:
 
 - 
NODE_OBSERVED_KEY
- See Also:
 
 - 
NODE_PARAMETER_KEY
- See Also:
 
 - 
NODE_POTENTIAL_KEY
- See Also:
 
 - 
NODE_X_KEY
- See Also:
 
 - 
NODE_Y_KEY
- See Also:
 
 - 
LOG
logger - 
layout
edu.uci.ics.jung.algorithms.layout.AbstractLayout<LabeledNode,? extends Edge> layout - 
networkType
TNGraph.NetworkType networkTypeGraph type 
 - 
 - 
Constructor Details
- 
TNGraphMLWriter
public TNGraphMLWriter(edu.uci.ics.jung.algorithms.layout.AbstractLayout<LabeledNode, ? extends Edge> lay) Constructor for TNGraphMLWriter.- Parameters:
 lay- aAbstractLayoutobject. If it is null, the vertex coordinates are determined from the property of the vertex.
 
 - 
 - 
Method Details
- 
save
Helper method for makingGraphMLWriter.save(Hypergraph, Writer)easier.- Parameters:
 graph- the network to saveoutputFile- file object where to save the XML string representing the graph. File encoding is UTF-8.- Throws:
 IOException- if it is not possible to save to outputFile
 - 
save
- Parameters:
 graph- the graph to savewriter- the writer to use- Throws:
 IOException- if the writer cannot write the file
 - 
save
Helper method for makingGraphMLWriter.save(Hypergraph, Writer)easier.- Parameters:
 graph- the network to save- Returns:
 - a GraphML string representing the graph.
 
 
 -