|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--notio.Graph
The basic conceptual graph class.
Constructor Summary | |
Graph()
Constructs an empty graph. |
Method Summary | |
void |
addComment(java.lang.String newComment)
Adds a comment to this graph. |
void |
addConcept(Concept newConcept)
Adds a concept to this graph. |
void |
addConcepts(Concept[] newConcepts)
Adds one or more concepts to this graph. |
void |
addRelation(Relation newRelation)
Adds a relation to this graph and adds any related concepts that are not already in this graph at the same time. |
void |
addRelations(Relation[] newRelations)
Adds one or more relations to this graph and adds any related concepts that are not already in this graph at the same time. |
Graph |
copy(CopyingScheme copyScheme)
Performs a copy operation on this graph according to the the specified CopyingScheme. |
Graph |
copy(CopyingScheme copyScheme,
java.util.Hashtable substitutionTable)
Performs a copy operation on this graph according to the the specified CopyingScheme. |
void |
expandConceptType(Concept concept)
Performs minimal type expansion on the specified concept if a type definition is available for that type. |
void |
expandConceptType(Concept[] concepts)
Performs minimal type expansion on the specified concepts if type definitions is available for their types. |
void |
expandConceptType(ConceptType conceptType)
Performs minimal type expansion on all concepts in this graph of the specified type, if a type definition is available for that type. |
void |
expandRelationType(Relation relation)
Performs minimal type expansion on the specified relation if a type definition is available for that type. |
void |
expandRelationType(Relation[] relations)
Performs minimal type expansion on the specified relations if type definitions is available for their types. |
void |
expandRelationType(RelationType relationType)
Performs minimal type expansion on all relations in this graph of the specified type, if a type definition is available for that type. |
void |
expandSetDesignator(Concept concept)
Performs set expansion on the specified concept, assuming it has a collective set designator. |
Actor[] |
getActorRelations()
Returns a list of the those relations in this graph that are actors. |
boolean |
getAllowIncompleteRelations()
Returns the flag setting for this graph indicating whether or not incomplete relations and actors may be added to this graph. |
java.lang.String[] |
getComments()
Returns an array of all comments associated with this graph. |
Concept[] |
getConcepts()
Returns a list of the concepts in this graph. |
Concept[] |
getConceptsWithExactType(ConceptType conType)
Returns all concepts in the graph with exactly the type specified. |
Concept[] |
getConceptsWithSubType(ConceptType conType)
Returns all concepts in the graph that are supertypes of the specified type (which includes the type itself). |
Concept[] |
getConceptsWithSuperType(ConceptType conType)
Returns all concepts in the graph that are subtypes of the specified type (which includes the type itself). |
Concept |
getContext()
Returns the context of this graph or null if this graph is in the outermost context. |
int |
getContextDepth()
Returns the context depth (level of nesting) of this graph. |
Graph |
getContextGraph()
Returns the graph containing the context of this graph or null if this graph is not enclosed by a graph. |
DescriptorDesignator |
getEnclosingDesignator()
Return the enclosing descriptor for this graph if it is nested or null otherwise. |
static Concept[] |
getMatchingConcepts(Graph first,
Graph second,
MatchingScheme matchingScheme)
For each concept the first graph, this method finds what concepts match it from the second graph. |
static Relation[] |
getMatchingRelations(Graph first,
Graph second,
MatchingScheme matchingScheme)
For each relation the first graph, this method finds what relations match it from the second graph. |
Relation[] |
getNormalRelations()
Returns a list of the those relations in this graph that are NOT actors. |
int |
getNumberOfConcepts()
Returns the number of concepts in this graph. |
int |
getNumberOfRelations()
Returns the number of relations in this graph. |
Relation[] |
getRelations()
Returns a list of the relations in this graph. |
Relation[] |
getRelationsWithExactType(RelationType relType)
Returns all relations in the graph with exactly the type specified. |
Relation[] |
getRelationsWithSubType(RelationType relType)
Returns all relations in the graph that are supertypes of the specified type (which includes the type itself). |
Relation[] |
getRelationsWithSuperType(RelationType relType)
Returns all relations in the graph that are subtypes of the specified type (which includes the type itself). |
boolean |
hasConcept(Concept concept)
Returns true if the graph contains the specified concept. |
boolean |
hasConcepts(Concept[] conceptArr)
Returns true if the graph contains the specified concepts. |
boolean |
hasRelation(Relation relation)
Returns true if the graph contains the specified relation. |
boolean |
hasRelations(Relation[] relationArr)
Returns true if the graph reltains the specified relations. |
boolean |
isBlank()
Returns true if this graph is blank. |
boolean |
isComplete()
Returns true if this graph is complete. |
boolean |
isEnclosedBy(Concept concept)
Returns true if this graph is enclosed by the specified concept. |
boolean |
isEnclosedBy(Graph graph)
Returns true if this graph is enclosed by the specified graph. |
static Graph |
join(Graph firstGraph,
Concept[] firstConcepts,
Graph secondGraph,
Concept[] secondConcepts,
MatchingScheme matchingScheme,
CopyingScheme copyScheme)
Joins two graphs on the specified concept nodes using the specified matching scheme to determine if the nodes form a valid join point. |
static Graph |
join(Graph firstGraph,
Concept firstConcept,
Graph secondGraph,
Concept secondConcept,
MatchingScheme matchingScheme,
CopyingScheme copyScheme)
Joins two graphs on the specified concept nodes using the specified matching scheme to determine if the nodes form a valid join point. |
static MatchResult |
matchGraphs(Graph first,
Graph second,
MatchingScheme matchingScheme)
Attempts to matches between the two specified graphs and returns the results in a MatchResult object. |
static Graph[] |
maximalJoin(Graph firstGraph,
Graph secondGraph,
MatchingScheme matchingScheme,
CopyingScheme copyScheme)
Maximally joins two graphs using all possible mappings. |
static Graph[] |
maximalJoin(Graph firstGraph,
Graph secondGraph,
MatchingScheme matchingScheme,
CopyingScheme copyScheme,
int N)
Maximally joins two graphs, using N or fewer node mappings, depending on what is possible. |
void |
removeComment(java.lang.String deadComment)
Removes a comment from this graph. |
void |
removeConcept(Concept deadConcept)
Removes the specified concept from this graph. |
void |
removeConcepts(Concept[] deadConcepts)
Removes the specified concepts from this graph. |
void |
removeRelation(Relation deadRelation)
Removes the specified relation from this graph. |
void |
removeRelations(Relation[] deadRelations)
Removes the specified relations from this graph. |
void |
replaceConcept(Concept oldConcept,
Concept newConcept)
Replaces one concept with another in a graph. |
void |
setAllowIncompleteRelations(boolean flag)
Sets a flag for this graph indicating whether or not incomplete relations and actors may be added to this graph. |
void |
simplify()
Simplifies all relations in this graph. |
void |
simplify(Relation relation)
Simplifies the specified relation node by removing any duplicates of that relation in this graph. |
void |
simplify(RelationType relType)
Simplifies all instances of the specified relation type in this graph. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Graph()
Method Detail |
public void addConcept(Concept newConcept) throws ConceptAddError
newConcept
- the concept to be added.public void addConcepts(Concept[] newConcepts) throws ConceptAddError
newConcepts
- the array of concepts to be added.public void addRelation(Relation newRelation) throws RelationAddError, ConceptAddError
newRelation
- the relation to be added.getAllowIncompleteRelations()
public void addRelations(Relation[] newRelations) throws RelationAddError, ConceptAddError
newRelations
- the array of relations to be added.public void replaceConcept(Concept oldConcept, Concept newConcept) throws ConceptReplaceException
oldConcept
- the old concept being replaced.newConcept
- the new concept that replaces the old.public void removeConcept(Concept deadConcept) throws ConceptRemoveException
deadConcept
- the concept to be removed.public void removeConcepts(Concept[] deadConcepts) throws ConceptRemoveException
deadConcepts
- the array of concepts to be removed.public void removeRelation(Relation deadRelation)
deadRelation
- the relation to be removed.public void removeRelations(Relation[] deadRelations)
deadRelations
- the array of relations to be removed.public Concept getContext()
public Graph getContextGraph()
public DescriptorDesignator getEnclosingDesignator()
public int getContextDepth()
public boolean isEnclosedBy(Concept concept)
concept
- the concept being checked for as enclosing this graph.public boolean isEnclosedBy(Graph graph)
graph
- the graph being checked for as enclosing this graph.public Concept[] getConcepts()
public int getNumberOfConcepts()
public Relation[] getRelations()
public int getNumberOfRelations()
public Actor[] getActorRelations()
public Relation[] getNormalRelations()
public boolean hasConcept(Concept concept)
concept
- the concept being checked for.public boolean hasConcepts(Concept[] conceptArr)
conceptArr
- the array of concepts being checked for.public boolean hasRelation(Relation relation)
relation
- the relation being checked for.public boolean hasRelations(Relation[] relationArr)
relationArr
- the array of relations being checked for.public Concept[] getConceptsWithExactType(ConceptType conType)
conType
- the concept type to be matched exactly.public Concept[] getConceptsWithSuperType(ConceptType conType)
conType
- the concept type whose subtypes will be matched.public Concept[] getConceptsWithSubType(ConceptType conType)
conType
- the concept type whose supertypes will be matched.public Relation[] getRelationsWithExactType(RelationType relType)
relType
- the relation type to be matched exactly.public Relation[] getRelationsWithSuperType(RelationType relType)
relType
- the relation type whose subtypes will be matched.public Relation[] getRelationsWithSubType(RelationType relType)
relType
- the relation type whose supertypes will be matched.public void expandConceptType(Concept concept) throws TypeExpansionException
concept
- the concept which is to undergo type expansion.public void expandConceptType(Concept[] concepts) throws TypeExpansionException
concepts
- the array of concepts to undergo type expansion.public void expandConceptType(ConceptType conceptType) throws TypeExpansionException
conceptType
- the concept type to expand.public void expandRelationType(Relation relation) throws TypeExpansionException
relation
- the relation which is to undergo type expansion.public void expandRelationType(Relation[] relations) throws TypeExpansionException
relations
- the array of relations to undergo type expansion.public void expandRelationType(RelationType relationType) throws TypeExpansionException
relationType
- the relation type to expand.public void expandSetDesignator(Concept concept)
concept
- the concept which is to undergo set expansion.public boolean isBlank()
public boolean isComplete()
Relation.isComplete()
public Graph copy(CopyingScheme copyScheme)
copyScheme
- the copying scheme used to control the copy operation.public Graph copy(CopyingScheme copyScheme, java.util.Hashtable substitutionTable)
copyScheme
- the copying scheme used to control the copy operation.substitutionTable
- a hashtable containing copied objects available due to
earlier copy operations.getAllowIncompleteRelations()
public static Graph join(Graph firstGraph, Concept firstConcept, Graph secondGraph, Concept secondConcept, MatchingScheme matchingScheme, CopyingScheme copyScheme) throws JoinException
firstGraph
- the first graph to be joined.firstConcept
- the joining concept in the first graph.secondGraph
- the second graph to be joined.secondConcept
- the joining concept in the second graph.matchingScheme
- the matching scheme used to determine if the specified concepts
are a valid join point.copyScheme
- the copying scheme used to create the new graph from the two being
joined.public static Graph join(Graph firstGraph, Concept[] firstConcepts, Graph secondGraph, Concept[] secondConcepts, MatchingScheme matchingScheme, CopyingScheme copyScheme) throws JoinException
firstGraph
- the first graph to be joined.firstConcepts
- the joining concepts in the first graph.secondGraph
- the second graph to be joined.secondConcepts
- the joining concepts in the second graph.matchingScheme
- the matching scheme used to determine if the specified concepts
form valid join points.copyScheme
- the copying scheme used to create the new graph from the two being
joined.public static Graph[] maximalJoin(Graph firstGraph, Graph secondGraph, MatchingScheme matchingScheme, CopyingScheme copyScheme) throws JoinException
firstGraph
- the first graph to be joined.secondGraph
- the second graph to be joined.matchingScheme
- the matching scheme used to determine if the specified concepts
form valid join points.copyScheme
- the copying scheme used to create the new graph from the two being
joined.public static Graph[] maximalJoin(Graph firstGraph, Graph secondGraph, MatchingScheme matchingScheme, CopyingScheme copyScheme, int N) throws JoinException
firstGraph
- the first graph to be joined.secondGraph
- the second graph to be joined.matchingScheme
- the matching scheme used to determine if the specified concepts
form valid join points.copyScheme
- the copying scheme used to create the new graph from the two being
joined.N
- the maximum number of graphs that will be produced.public void simplify(Relation relation)
relation
- the relation node to simplify.public void simplify(RelationType relType)
relType
- the relation type whose instances are to be simplified.public void simplify()
public static MatchResult matchGraphs(Graph first, Graph second, MatchingScheme matchingScheme)
first
- the first graph being matched.second
- the second graph being matched.matchingScheme
- the matching scheme that determines how the match is performed.public static Concept[] getMatchingConcepts(Graph first, Graph second, MatchingScheme matchingScheme)
first
- the first graph from which concepts are to be matched.second
- the second graph from which concepts are to be matched.matchingScheme
- the matching scheme that determines how the match is performed.public static Relation[] getMatchingRelations(Graph first, Graph second, MatchingScheme matchingScheme)
first
- the first graph from which relations are to be matched.second
- the second graph from which relations are to be matched.matchingScheme
- the matching scheme that determines how the match is performed.public void addComment(java.lang.String newComment)
newComment
- the comment to be added to this graph.public void removeComment(java.lang.String deadComment)
deadComment
- the comment to be removed from this graph.public java.lang.String[] getComments()
public void setAllowIncompleteRelations(boolean flag)
flag
- the new setting for this flag.Relation.isComplete()
,
Relation.isComplete()
,
isComplete()
public boolean getAllowIncompleteRelations()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |