Package edu.uci.ics.jung.io.graphml
Class GraphMetadata
- java.lang.Object
-
- edu.uci.ics.jung.io.graphml.AbstractMetadata
-
- edu.uci.ics.jung.io.graphml.GraphMetadata
-
- All Implemented Interfaces:
Metadata
public class GraphMetadata extends AbstractMetadata
Metadata structure for the 'graph' GraphML element.- Author:
- Nathan Mittler - nathan.mittler@gmail.com
- See Also:
- "http://graphml.graphdrawing.org/specification.html"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GraphMetadata.EdgeDefault
-
Nested classes/interfaces inherited from interface edu.uci.ics.jung.io.graphml.Metadata
Metadata.MetadataType
-
-
Constructor Summary
Constructors Constructor Description GraphMetadata()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEdgeMetadata(java.lang.Object edge, EdgeMetadata metadata)
void
addHyperEdgeMetadata(java.lang.Object edge, HyperEdgeMetadata metadata)
void
addNodeMetadata(java.lang.Object vertex, NodeMetadata metadata)
java.lang.String
getDescription()
GraphMetadata.EdgeDefault
getEdgeDefault()
java.util.Map<java.lang.Object,EdgeMetadata>
getEdgeMap()
EdgeMetadata
getEdgeMetadata(java.lang.Object edge)
java.lang.String
getEdgeProperty(java.lang.Object edge, java.lang.String key)
Gets the property for the given edge object.java.lang.Object
getGraph()
java.util.Map<java.lang.Object,HyperEdgeMetadata>
getHyperEdgeMap()
HyperEdgeMetadata
getHyperEdgeMetadata(java.lang.Object edge)
java.lang.String
getId()
Metadata.MetadataType
getMetadataType()
Gets the metadata type of this object.java.util.Map<java.lang.Object,NodeMetadata>
getNodeMap()
NodeMetadata
getNodeMetadata(java.lang.Object vertex)
java.lang.String
getVertexProperty(java.lang.Object vertex, java.lang.String key)
Gets the property for the given vertex object.void
setDescription(java.lang.String desc)
void
setEdgeDefault(GraphMetadata.EdgeDefault edgeDefault)
void
setGraph(java.lang.Object graph)
void
setId(java.lang.String id)
-
Methods inherited from class edu.uci.ics.jung.io.graphml.AbstractMetadata
addData, getProperties, getProperty, setProperty
-
-
-
-
Method Detail
-
getId
public java.lang.String getId()
-
setId
public void setId(java.lang.String id)
-
getEdgeDefault
public GraphMetadata.EdgeDefault getEdgeDefault()
-
setEdgeDefault
public void setEdgeDefault(GraphMetadata.EdgeDefault edgeDefault)
-
getDescription
public java.lang.String getDescription()
-
setDescription
public void setDescription(java.lang.String desc)
-
addNodeMetadata
public void addNodeMetadata(java.lang.Object vertex, NodeMetadata metadata)
-
getNodeMetadata
public NodeMetadata getNodeMetadata(java.lang.Object vertex)
-
getNodeMap
public java.util.Map<java.lang.Object,NodeMetadata> getNodeMap()
-
addEdgeMetadata
public void addEdgeMetadata(java.lang.Object edge, EdgeMetadata metadata)
-
getEdgeMetadata
public EdgeMetadata getEdgeMetadata(java.lang.Object edge)
-
getEdgeMap
public java.util.Map<java.lang.Object,EdgeMetadata> getEdgeMap()
-
addHyperEdgeMetadata
public void addHyperEdgeMetadata(java.lang.Object edge, HyperEdgeMetadata metadata)
-
getHyperEdgeMetadata
public HyperEdgeMetadata getHyperEdgeMetadata(java.lang.Object edge)
-
getHyperEdgeMap
public java.util.Map<java.lang.Object,HyperEdgeMetadata> getHyperEdgeMap()
-
getGraph
public java.lang.Object getGraph()
-
setGraph
public void setGraph(java.lang.Object graph)
-
getMetadataType
public Metadata.MetadataType getMetadataType()
Description copied from interface:Metadata
Gets the metadata type of this object.- Returns:
- the metadata type
-
getVertexProperty
public java.lang.String getVertexProperty(java.lang.Object vertex, java.lang.String key) throws java.lang.IllegalArgumentException
Gets the property for the given vertex object.- Parameters:
vertex
- the subject vertexkey
- the property key- Returns:
- the property value
- Throws:
java.lang.IllegalArgumentException
- thrown if there is no metadata associated with the provided vertex object.
-
getEdgeProperty
public java.lang.String getEdgeProperty(java.lang.Object edge, java.lang.String key) throws java.lang.IllegalArgumentException
Gets the property for the given edge object.- Parameters:
edge
- the subject edge.key
- the property key- Returns:
- the property value
- Throws:
java.lang.IllegalArgumentException
- thrown if there is no metadata associated with the provided edge object.
-
-