org.topbraidcomposer.gef.graph.parts
Class ResourceEditPart

java.lang.Object
  extended by org.eclipse.gef.editparts.AbstractEditPart
      extended by org.eclipse.gef.editparts.AbstractGraphicalEditPart
          extended by org.topbraidcomposer.gef.graph.parts.ResourceEditPart
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.gef.EditPart, org.eclipse.gef.GraphicalEditPart, org.eclipse.gef.NodeEditPart, org.eclipse.gef.RequestConstants
Direct Known Subclasses:
BNodeEditPart, URIResourceEditPart

public abstract class ResourceEditPart
extends org.eclipse.gef.editparts.AbstractGraphicalEditPart
implements org.eclipse.gef.NodeEditPart


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
org.eclipse.gef.editparts.AbstractGraphicalEditPart.AccessibleGraphicalEditPart, org.eclipse.gef.editparts.AbstractGraphicalEditPart.DefaultAccessibleAnchorProvider
 
Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractEditPart
org.eclipse.gef.editparts.AbstractEditPart.EditPolicyIterator
 
Field Summary
 java.util.List<com.hp.hpl.jena.rdf.model.Statement> sourceStatementList
           
 java.util.List<com.hp.hpl.jena.rdf.model.Statement> targetStatementList
           
 
Fields inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
figure, sourceConnections, targetConnections
 
Fields inherited from class org.eclipse.gef.editparts.AbstractEditPart
children, FLAG_ACTIVE, FLAG_FOCUS, MAX_FLAG
 
Fields inherited from interface org.eclipse.gef.EditPart
SELECTED, SELECTED_NONE, SELECTED_PRIMARY
 
Fields inherited from interface org.eclipse.gef.RequestConstants
REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILDREN, REQ_CLONE, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILDREN, REQ_OPEN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_SOURCE, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER
 
Constructor Summary
ResourceEditPart(com.hp.hpl.jena.rdf.model.Resource resource, GraphEditPart graphEditPart)
           
 
Method Summary
protected  void addChildVisual(org.eclipse.gef.EditPart childEditPart, int index)
           
 void addSourceStatement(com.hp.hpl.jena.rdf.model.Statement s)
           
 void addTargetStatement(com.hp.hpl.jena.rdf.model.Statement s)
           
protected  void createEditPolicies()
           
protected  org.eclipse.draw2d.IFigure createFigure()
           
 void expandConnectionsToExistingNodes()
           
 void expandSourceConnections()
           
 void expandSourceConnections(com.hp.hpl.jena.rdf.model.Property predicate, boolean transitively)
           
 void expandTargetConnections()
           
 void expandTargetConnections(com.hp.hpl.jena.rdf.model.Property predicate, boolean transitively)
           
 java.util.List<com.hp.hpl.jena.rdf.model.Property> getExpandSourceProperties()
           
 java.util.List<com.hp.hpl.jena.rdf.model.Property> getExpandTargetProperties()
           
protected  java.util.List getModelChildren()
           
 java.util.List<com.hp.hpl.jena.rdf.model.Statement> getModelSourceConnections()
           
 java.util.List<com.hp.hpl.jena.rdf.model.Statement> getModelTargetConnections()
           
 com.hp.hpl.jena.rdf.model.Resource getRDFType()
           
 com.hp.hpl.jena.rdf.model.Resource getResource()
           
 org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
           
 org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.Request request)
           
 org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
           
 org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.Request request)
           
 void performRequest(org.eclipse.gef.Request req)
           
 void refreshAll()
           
protected  void removeChildVisual(org.eclipse.gef.EditPart childEditPart)
           
 boolean removeDeletedEdges(java.util.Collection<com.hp.hpl.jena.graph.Triple> deletedTriples)
           
 void removeInvalidEdges(java.util.List<com.hp.hpl.jena.rdf.model.Resource> resources)
           
 boolean setResource(com.hp.hpl.jena.rdf.model.Resource oldResource, com.hp.hpl.jena.rdf.model.Resource newResource)
          Probably replaces the Resource in this and the edges.
 
Methods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
activate, addNodeListener, addNotify, addSourceConnection, addTargetConnection, createConnection, createOrFindConnection, deactivate, fireRemovingSourceConnection, fireRemovingTargetConnection, fireSourceConnectionAdded, fireTargetConnectionAdded, getAdapter, getContentPane, getDragTracker, getFigure, getLayer, getSourceConnections, getTargetConnections, primAddSourceConnection, primAddTargetConnection, primRemoveSourceConnection, primRemoveTargetConnection, refresh, refreshSourceConnections, refreshTargetConnections, registerVisuals, removeNodeListener, removeNotify, removeSourceConnection, removeTargetConnection, reorderChild, reorderSourceConnection, reorderTargetConnection, setFigure, setLayoutConstraint, unregisterVisuals
 
Methods inherited from class org.eclipse.gef.editparts.AbstractEditPart
activateEditPolicies, addChild, addEditPartListener, createChild, deactivateEditPolicies, debug, debugFeedback, eraseSourceFeedback, eraseTargetFeedback, fireActivated, fireChildAdded, fireDeactivated, fireRemovingChild, fireSelectionChanged, getAccessibleEditPart, getChildren, getCommand, getEditPolicy, getEditPolicyIterator, getEventListeners, getFlag, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, refreshChildren, refreshVisuals, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, toString, understandsRequest, unregister, unregisterAccessibility, unregisterModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.gef.GraphicalEditPart
addNodeListener, getContentPane, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, setLayoutConstraint
 
Methods inherited from interface org.eclipse.gef.EditPart
activate, addEditPartListener, addNotify, deactivate, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getDragTracker, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, refresh, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

sourceStatementList

public java.util.List<com.hp.hpl.jena.rdf.model.Statement> sourceStatementList

targetStatementList

public java.util.List<com.hp.hpl.jena.rdf.model.Statement> targetStatementList
Constructor Detail

ResourceEditPart

public ResourceEditPart(com.hp.hpl.jena.rdf.model.Resource resource,
                        GraphEditPart graphEditPart)
Method Detail

addChildVisual

protected void addChildVisual(org.eclipse.gef.EditPart childEditPart,
                              int index)
Overrides:
addChildVisual in class org.eclipse.gef.editparts.AbstractGraphicalEditPart

addSourceStatement

public void addSourceStatement(com.hp.hpl.jena.rdf.model.Statement s)

addTargetStatement

public void addTargetStatement(com.hp.hpl.jena.rdf.model.Statement s)

createEditPolicies

protected void createEditPolicies()
Specified by:
createEditPolicies in class org.eclipse.gef.editparts.AbstractEditPart

createFigure

protected org.eclipse.draw2d.IFigure createFigure()
Specified by:
createFigure in class org.eclipse.gef.editparts.AbstractGraphicalEditPart

expandConnectionsToExistingNodes

public void expandConnectionsToExistingNodes()

expandSourceConnections

public void expandSourceConnections()

expandSourceConnections

public void expandSourceConnections(com.hp.hpl.jena.rdf.model.Property predicate,
                                    boolean transitively)

expandTargetConnections

public void expandTargetConnections()

expandTargetConnections

public void expandTargetConnections(com.hp.hpl.jena.rdf.model.Property predicate,
                                    boolean transitively)

getExpandSourceProperties

public java.util.List<com.hp.hpl.jena.rdf.model.Property> getExpandSourceProperties()

getExpandTargetProperties

public java.util.List<com.hp.hpl.jena.rdf.model.Property> getExpandTargetProperties()

getModelChildren

protected java.util.List getModelChildren()
Overrides:
getModelChildren in class org.eclipse.gef.editparts.AbstractEditPart

getModelSourceConnections

public java.util.List<com.hp.hpl.jena.rdf.model.Statement> getModelSourceConnections()
Overrides:
getModelSourceConnections in class org.eclipse.gef.editparts.AbstractGraphicalEditPart

getModelTargetConnections

public java.util.List<com.hp.hpl.jena.rdf.model.Statement> getModelTargetConnections()
Overrides:
getModelTargetConnections in class org.eclipse.gef.editparts.AbstractGraphicalEditPart

getRDFType

public com.hp.hpl.jena.rdf.model.Resource getRDFType()

getResource

public com.hp.hpl.jena.rdf.model.Resource getResource()

performRequest

public void performRequest(org.eclipse.gef.Request req)
Specified by:
performRequest in interface org.eclipse.gef.EditPart
Overrides:
performRequest in class org.eclipse.gef.editparts.AbstractEditPart

refreshAll

public void refreshAll()

removeChildVisual

protected void removeChildVisual(org.eclipse.gef.EditPart childEditPart)
Overrides:
removeChildVisual in class org.eclipse.gef.editparts.AbstractGraphicalEditPart

removeDeletedEdges

public boolean removeDeletedEdges(java.util.Collection<com.hp.hpl.jena.graph.Triple> deletedTriples)

removeInvalidEdges

public void removeInvalidEdges(java.util.List<com.hp.hpl.jena.rdf.model.Resource> resources)

setResource

public boolean setResource(com.hp.hpl.jena.rdf.model.Resource oldResource,
                           com.hp.hpl.jena.rdf.model.Resource newResource)
Probably replaces the Resource in this and the edges.

Parameters:
newResource - the new resource
Returns:
true if this has been changed

getSourceConnectionAnchor

public org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
Specified by:
getSourceConnectionAnchor in interface org.eclipse.gef.NodeEditPart

getSourceConnectionAnchor

public org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.Request request)
Specified by:
getSourceConnectionAnchor in interface org.eclipse.gef.NodeEditPart

getTargetConnectionAnchor

public org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
Specified by:
getTargetConnectionAnchor in interface org.eclipse.gef.NodeEditPart

getTargetConnectionAnchor

public org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.Request request)
Specified by:
getTargetConnectionAnchor in interface org.eclipse.gef.NodeEditPart