Protege 4.1.0

uk.ac.man.cs.mig.coode.owlviz.model
Class AbstractOWLClassGraphModel

java.lang.Object
  extended by uk.ac.man.cs.mig.util.graph.model.impl.AbstractGraphModel
      extended by uk.ac.man.cs.mig.coode.owlviz.model.AbstractOWLClassGraphModel
All Implemented Interfaces:
GraphModel
Direct Known Subclasses:
OWLClassGraphAssertedModel, OWLClassGraphInferredModel

public class AbstractOWLClassGraphModel
extends AbstractGraphModel

Author: Matthew Horridge
The University Of Manchester
Medical Informatics Group
Date: 08-Jun-2006

matthew.horridge@cs.man.ac.uk
www.cs.man.ac.uk/~horridgm


Field Summary
 
Fields inherited from class uk.ac.man.cs.mig.util.graph.model.impl.AbstractGraphModel
listeners
 
Fields inherited from interface uk.ac.man.cs.mig.util.graph.model.GraphModel
DIRECTION_BACK, DIRECTION_BOTH, DIRECTION_FORWARD, DIRECTION_NONE
 
Constructor Summary
AbstractOWLClassGraphModel(OWLModelManager owlModelManager, OWLObjectHierarchyProvider provider)
           
 
Method Summary
 boolean contains(Object obj)
          Tests whether or not the specified object is contained within the graph model.
 void dispose()
          Disposed of the graph model.
 int getChildCount(Object obj)
          Retrives the number of children that the specified object has.
 Iterator getChildren(Object obj)
          Gets the children of the specified object
protected  Set<org.semanticweb.owlapi.model.OWLObject> getChildren(org.semanticweb.owlapi.model.OWLObject obj)
           
 int getParentCount(Object obj)
          Retrives the number of parents that the specified object has.
 Iterator getParents(Object obj)
          Retrieves the parents of the specified object
protected  Set<org.semanticweb.owlapi.model.OWLObject> getParents(org.semanticweb.owlapi.model.OWLObject obj)
           
 Iterator getRelatedObjectsToAdd(Object obj)
          In some situations when an object is displayed in a graph it is necessary to display other (related) objects automatically.
 Iterator getRelatedObjectsToRemove(Object obj)
          In some situations when an object displayed in a graph is made invisible it might be useful to make other related objects invisible.
 int getRelationshipDirection(Object parentObject, Object childObject)
          Gets the direction of the relationship.
 Object getRelationshipType(Object parentObject, Object childObject)
          Retrieves the type of relationship between the specified objects.
 
Methods inherited from class uk.ac.man.cs.mig.util.graph.model.impl.AbstractGraphModel
addGraphModelListener, fireChildAddedEvent, fireChildRemovedEvent, fireModelChangedEvent, fireObjectsAddedEvent, fireObjectsChangedEvent, fireObjectsRemovedEvent, fireParentAddedEvent, fireParentRemovedEvent, getListeners, objectChanged, removeGraphModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractOWLClassGraphModel

public AbstractOWLClassGraphModel(OWLModelManager owlModelManager,
                                  OWLObjectHierarchyProvider provider)
Method Detail

dispose

public void dispose()
Description copied from interface: GraphModel
Disposed of the graph model. This clears any cached information and removes listeners.


getChildren

protected Set<org.semanticweb.owlapi.model.OWLObject> getChildren(org.semanticweb.owlapi.model.OWLObject obj)

getParents

protected Set<org.semanticweb.owlapi.model.OWLObject> getParents(org.semanticweb.owlapi.model.OWLObject obj)

getChildCount

public int getChildCount(Object obj)
Description copied from interface: GraphModel
Retrives the number of children that the specified object has.

Parameters:
obj - The object
Returns:
The number of children.

getChildren

public Iterator getChildren(Object obj)
Description copied from interface: GraphModel
Gets the children of the specified object

Returns:
An iterator, which can be used to traverse the children.

getParentCount

public int getParentCount(Object obj)
Description copied from interface: GraphModel
Retrives the number of parents that the specified object has.

Parameters:
obj - The object
Returns:
The number of parents

getParents

public Iterator getParents(Object obj)
Description copied from interface: GraphModel
Retrieves the parents of the specified object

Parameters:
obj - The object
Returns:
The parents of the specified object.

contains

public boolean contains(Object obj)
Description copied from interface: GraphModel
Tests whether or not the specified object is contained within the graph model.

Parameters:
obj - The object to test for.
Returns:
true if the specified object is contained in the model, or false if the specified object is not contained in the model.

getRelationshipType

public Object getRelationshipType(Object parentObject,
                                  Object childObject)
Description copied from interface: GraphModel
Retrieves the type of relationship between the specified objects.

Parameters:
parentObject - The parent object.
childObject - The child object.
Returns:
An object representing the relationship between the child object and parent object. For example, this could be String that represents the name of the relationship, such as "is-a".

getRelationshipDirection

public int getRelationshipDirection(Object parentObject,
                                    Object childObject)
Description copied from interface: GraphModel
Gets the direction of the relationship. In some relationships the edge direction is in an opposite direction to the parent/child relationship. For example, a superclass/subclass relationship - the parent is the superclass and the child is the subclass, but the direction of the edge is from subclass to superclass - i.e. child to parent. This method allows the direction of the Edge between two objects to be customised.

Parameters:
parentObject - The parent object.
childObject - The child object.
Returns:
The direction of the edge that connects the objects. Directions are defined in this GraphModel interface. A forward direction represents and parent-to-child relationship. A back direction represents a child-to-parent relationship.

getRelatedObjectsToAdd

public Iterator getRelatedObjectsToAdd(Object obj)
Description copied from interface: GraphModel
In some situations when an object is displayed in a graph it is necessary to display other (related) objects automatically. This method will usually be called so that objects that are related to the specified object (but not necessarily parent/child objects) can be retrieved.

Parameters:
obj - The object for which related objects are to be retrieved.
Returns:
An iterator that can be used to traverse the related objects.

getRelatedObjectsToRemove

public Iterator getRelatedObjectsToRemove(Object obj)
Description copied from interface: GraphModel
In some situations when an object displayed in a graph is made invisible it might be useful to make other related objects invisible. This method will be called to determine if there are any other objects to be made invisible.

Parameters:
obj - The object being made invisible.
Returns:
Any objects that are related to obj that should also be made invisible.

Protege 4.1.0

Submit a bug report or feature request

For further API reference and developer documentation, see Protege 4 Developer Documentation.

Copyright © 2010 Stanford Center for Biomedical Informatics Research