Public Member Functions

cogitant.base.Graph Interface Reference

Graph. More...

Inheritance diagram for cogitant.base.Graph:

List of all members.

Public Member Functions

Collection< GraphObjectnodes ()
 Nodes of the graph.
int size ()
 Size of the graph.
GraphObject root ()
 Root of the graph.
GraphObject findByIdentifier (String id)
 Return a node with this identifier.
void clear ()
 Clear the graph.
void deleteObjects (GraphSubset nodes, boolean pendingvertices)
 Delete nodes.
void removeProperty (int prop)
 Remove the prop property from the GraphObjects of the Graph.
GraphSubset newSubset ()
 Create an empty subset of nodes.
void subsetAddConceptsByIndividualMarkers (GraphSubset gs, Collection< String > indm, boolean identifiers, GraphObject parent)
 Add to a GraphSubset the set of concept nodes with the given individual markers.
void subsetAddRelationsByNeighbourhood (GraphSubset gs, GraphObject parent)
 Add to a GraphSubset the relation nodes such that the neighbourhood of these nodes is already in the subset.

Detailed Description

Graph.


Member Function Documentation

void cogitant.base.Graph.clear ( )

Clear the graph.

After the call, the graph is empty.

Implemented in cogitant.jni.Graph.

void cogitant.base.Graph.deleteObjects ( GraphSubset  nodes,
boolean  pendingvertices 
)

Delete nodes.

This method deletes the nodes of the given subset.

Parameters:
nodesSubset of nodes.
pendingverticesIf true, when a concept node is deleted, relation nodes of the neighbourhood have pending vertices. If false, relation nodes of the neighbourhood are deleted.
GraphObject cogitant.base.Graph.findByIdentifier ( String  id)

Return a node with this identifier.

Parameters:
idan identifier (from a file).
Returns:
a node such as the value of Property.IDENTIFIER is id (or null).

Implemented in cogitant.jni.Graph.

GraphSubset cogitant.base.Graph.newSubset ( )

Create an empty subset of nodes.

Implemented in cogitant.jni.Graph.

Collection<GraphObject> cogitant.base.Graph.nodes ( )

Nodes of the graph.

Implemented in cogitant.jni.Graph.

void cogitant.base.Graph.removeProperty ( int  prop)

Remove the prop property from the GraphObjects of the Graph.

Implemented in cogitant.jni.Graph.

GraphObject cogitant.base.Graph.root ( )

Root of the graph.

Implemented in cogitant.jni.Graph.

int cogitant.base.Graph.size ( )

Size of the graph.

i.e. number of nodes.

Implemented in cogitant.jni.Graph.

void cogitant.base.Graph.subsetAddConceptsByIndividualMarkers ( GraphSubset  gs,
Collection< String >  indm,
boolean  identifiers,
GraphObject  parent 
)

Add to a GraphSubset the set of concept nodes with the given individual markers.

Parameters:
gsThis method adds to gs the set of concept nodes that have one of the individual markers of indm.
indmindividual markers identified by their label or their (CoGXML) identifier.
identifiersif true, indm contains (CoGXML) identifiers ; if false, indm contains labels.
parentparent of the concept nodes.
void cogitant.base.Graph.subsetAddRelationsByNeighbourhood ( GraphSubset  gs,
GraphObject  parent 
)

Add to a GraphSubset the relation nodes such that the neighbourhood of these nodes is already in the subset.

Parameters:
gsThis method adds to gs the set of relation nodes that have all of their neighbours in the subset.
parentparent of the relation nodes.