owltools.graph.shunt
Class OWLShuntGraph

java.lang.Object
  extended by owltools.graph.shunt.OWLShuntGraph

public class OWLShuntGraph
extends Object

A simple (and easily serializable through GSON) graph model to move data from the OWL model out to more standard graph resources. This is intended to be used with OWLTools-Solr for loading ontology graph segements for eventual use with (and modelled after) the BBOP JavaScript graph model. TODO: To completely mirror the JS, predicates would have to be added as well. The graph is not operational--merely a structured data store. See: OWLShuntNode and OWLShuntEdge.


Field Summary
 Set<OWLShuntEdge> edges
           
 String id
           
 Set<OWLShuntNode> nodes
           
 
Constructor Summary
OWLShuntGraph()
          Empty constructor.
 
Method Summary
 boolean addEdge(OWLShuntEdge e)
          Simply "add" an edge to the graph.
 boolean addNode(OWLShuntNode n)
          Simply "add" a node to the graph.
 boolean hasEdge(OWLShuntEdge e)
          Check to see if an edge is in the graph.
 boolean hasNode(OWLShuntNode n)
          Check to see if a node is in the graph.
 String toJSON()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

public String id

nodes

public Set<OWLShuntNode> nodes

edges

public Set<OWLShuntEdge> edges
Constructor Detail

OWLShuntGraph

public OWLShuntGraph()
Empty constructor.

Method Detail

hasNode

public boolean hasNode(OWLShuntNode n)
Check to see if a node is in the graph.

Parameters:
n -
Returns:
boolean

hasEdge

public boolean hasEdge(OWLShuntEdge e)
Check to see if an edge is in the graph.

Parameters:
e -
Returns:
boolean

addNode

public boolean addNode(OWLShuntNode n)
Simply "add" a node to the graph.

Parameters:
n -
Returns:
boolean, true if new elt added

addEdge

public boolean addEdge(OWLShuntEdge e)
Simply "add" an edge to the graph.

Parameters:
e -
Returns:
boolean, true if new elt added

toJSON

public String toJSON()
Returns:
JSON form of the shunt graph structure


Copyright © 2010-2012. All Rights Reserved.