Quick links: Examples - Files.
Classes: Hierarchy - Index - List - Members.
Packages: Index - base - jni.

Public Member Functions | List of all members
cogitant.base.Graph Interface Reference

Graph. More...

+ Inheritance diagram for cogitant.base.Graph:

Public Member Functions

Collection< GraphObjectnodes ()
 Nodes of the graph. More...
 
int size ()
 Size of the graph. More...
 
GraphObject root ()
 Root of the graph. More...
 
GraphObject findByIdentifier (String id)
 Return a node with this identifier. More...
 
void clear ()
 Clear the graph. More...
 
void deleteObjects (GraphSubset nodes, boolean pendingvertices)
 Delete nodes. More...
 
void removeProperty (int prop)
 Remove the prop property from the GraphObjects of the Graph. More...
 
GraphSubset newSubset ()
 Create an empty subset of nodes. More...
 
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. More...
 
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. More...
 
- Public Member Functions inherited from cogitant.base.EnvironmentObject
Environment environment ()
 Environment of the graph. More...
 
String name ()
 Name of the object. More...
 
Type objectType ()
 Type of the object. More...
 
Graph asGraph () throws ExceptionIncorrectType
 Returns a Graph reference. More...
 
Rule asRule () throws ExceptionIncorrectType
 Returns a Rule reference. More...
 
Constraint asConstraint () throws ExceptionIncorrectType
 Returns a Constraint reference. More...
 
- Public Member Functions inherited from cogitant.base.ObservableObject
void attachObserver (Observer obs) throws ExceptionObserver
 Adds a new Observer. More...
 
void detachObserver (Observer obs) throws ExceptionObserver
 Detachs an Observer. More...
 
void lock ()
 Locks the object. More...
 
void unlock ()
 Unlocks the object. More...
 
boolean isLocked ()
 Is the object locked. More...
 

Detailed Description

Graph.

Member Function Documentation

◆ clear()

void cogitant.base.Graph.clear ( )

Clear the graph.

After the call, the graph is empty.

◆ deleteObjects()

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.

◆ findByIdentifier()

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).

◆ newSubset()

GraphSubset cogitant.base.Graph.newSubset ( )

Create an empty subset of nodes.

◆ nodes()

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

Nodes of the graph.

◆ removeProperty()

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

Remove the prop property from the GraphObjects of the Graph.

◆ root()

GraphObject cogitant.base.Graph.root ( )

Root of the graph.

◆ size()

int cogitant.base.Graph.size ( )

Size of the graph.

i.e. number of nodes.

◆ subsetAddConceptsByIndividualMarkers()

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.

◆ subsetAddRelationsByNeighbourhood()

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.