Package mgui.io.domestic.graphs.xml
Class GraphXMLFunctions
java.lang.Object
mgui.interfaces.Utility
mgui.io.domestic.graphs.xml.GraphXMLFunctions
public class GraphXMLFunctions extends Utility
Utility class for XML operations involving graphs.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Constructor Summary
Constructors Constructor Description GraphXMLFunctions() -
Method Summary
Modifier and Type Method Description static java.lang.StringgetEdgeTypeAsString(edu.uci.ics.jung.graph.util.EdgeType type)Returns a string representation oftype.static edu.uci.ics.jung.graph.util.EdgeTypegetEdgeTypeForString(java.lang.String type)Returns the type corresponding to the string representationtype.static AbstractGraphEdgegetGraphEdgeInstance(org.xml.sax.Attributes attributes)Returns a new instance ofAbstractGraphEdge, from the given SAX attributes.static InterfaceAbstractGraphgetGraphInstance(org.xml.sax.Attributes attributes)Returns a new instance ofInterfaceAbstractGraph, from the given SAX attributes.static AbstractGraphNodegetGraphNodeInstance(org.xml.sax.Attributes attributes)Returns a new instance ofAbstractGraphNode, from the given SAX attributes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
GraphXMLFunctions
public GraphXMLFunctions()
-
-
Method Details
-
getGraphInstance
Returns a new instance ofInterfaceAbstractGraph, from the given SAX attributes.- Parameters:
attributes-- Returns:
- The new instance, or
nullif things didn't work out
-
getGraphEdgeInstance
Returns a new instance ofAbstractGraphEdge, from the given SAX attributes.- Parameters:
attributes-- Returns:
- The new instance, or
nullif things didn't work out
-
getGraphNodeInstance
Returns a new instance ofAbstractGraphNode, from the given SAX attributes.- Parameters:
attributes-- Returns:
- The new instance, or
nullif things didn't work out
-
getEdgeTypeAsString
public static java.lang.String getEdgeTypeAsString(edu.uci.ics.jung.graph.util.EdgeType type)Returns a string representation oftype.- Parameters:
type-- Returns:
-
getEdgeTypeForString
public static edu.uci.ics.jung.graph.util.EdgeType getEdgeTypeForString(java.lang.String type)Returns the type corresponding to the string representationtype.- Parameters:
type-- Returns:
- The type, or
nullif there is no corresponding type
-