edu.uci.ics.jung.io.graphml
Class GraphMetadata

java.lang.Object
  extended by edu.uci.ics.jung.io.graphml.AbstractMetadata
      extended by 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
static class GraphMetadata.EdgeDefault
           
 
Nested classes/interfaces inherited from interface edu.uci.ics.jung.io.graphml.Metadata
Metadata.MetadataType
 
Constructor Summary
GraphMetadata()
           
 
Method Summary
 void addEdgeMetadata(Object edge, EdgeMetadata metadata)
           
 void addHyperEdgeMetadata(Object edge, HyperEdgeMetadata metadata)
           
 void addNodeMetadata(Object vertex, NodeMetadata metadata)
           
 String getDescription()
           
 GraphMetadata.EdgeDefault getEdgeDefault()
           
 Map<Object,EdgeMetadata> getEdgeMap()
           
 EdgeMetadata getEdgeMetadata(Object edge)
           
 String getEdgeProperty(Object edge, String key)
          Gets the property for the given edge object.
 Object getGraph()
           
 Map<Object,HyperEdgeMetadata> getHyperEdgeMap()
           
 HyperEdgeMetadata getHyperEdgeMetadata(Object edge)
           
 String getId()
           
 Metadata.MetadataType getMetadataType()
          Gets the metadata type of this object.
 Map<Object,NodeMetadata> getNodeMap()
           
 NodeMetadata getNodeMetadata(Object vertex)
           
 String getVertexProperty(Object vertex, String key)
          Gets the property for the given vertex object.
 void setDescription(String desc)
           
 void setEdgeDefault(GraphMetadata.EdgeDefault edgeDefault)
           
 void setGraph(Object graph)
           
 void setId(String id)
           
 
Methods inherited from class edu.uci.ics.jung.io.graphml.AbstractMetadata
addData, getProperties, getProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphMetadata

public GraphMetadata()
Method Detail

getId

public String getId()

setId

public void setId(String id)

getEdgeDefault

public GraphMetadata.EdgeDefault getEdgeDefault()

setEdgeDefault

public void setEdgeDefault(GraphMetadata.EdgeDefault edgeDefault)

getDescription

public String getDescription()

setDescription

public void setDescription(String desc)

addNodeMetadata

public void addNodeMetadata(Object vertex,
                            NodeMetadata metadata)

getNodeMetadata

public NodeMetadata getNodeMetadata(Object vertex)

getNodeMap

public Map<Object,NodeMetadata> getNodeMap()

addEdgeMetadata

public void addEdgeMetadata(Object edge,
                            EdgeMetadata metadata)

getEdgeMetadata

public EdgeMetadata getEdgeMetadata(Object edge)

getEdgeMap

public Map<Object,EdgeMetadata> getEdgeMap()

addHyperEdgeMetadata

public void addHyperEdgeMetadata(Object edge,
                                 HyperEdgeMetadata metadata)

getHyperEdgeMetadata

public HyperEdgeMetadata getHyperEdgeMetadata(Object edge)

getHyperEdgeMap

public Map<Object,HyperEdgeMetadata> getHyperEdgeMap()

getGraph

public Object getGraph()

setGraph

public void setGraph(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 String getVertexProperty(Object vertex,
                                String key)
                         throws IllegalArgumentException
Gets the property for the given vertex object.

Parameters:
vertex - the subject vertex
key - the property key
Returns:
the property value
Throws:
IllegalArgumentException - thrown if there is no metadata associated with the provided vertex object.

getEdgeProperty

public String getEdgeProperty(Object edge,
                              String key)
                       throws IllegalArgumentException
Gets the property for the given edge object.

Parameters:
edge - the subject edge.
key - the property key
Returns:
the property value
Throws:
IllegalArgumentException - thrown if there is no metadata associated with the provided edge object.


Copyright © 2009. All Rights Reserved.