notio
Class Concept

java.lang.Object
  |
  +--notio.Node
        |
        +--notio.Concept

public class Concept
extends Node
implements java.io.Serializable

The concept node class. A concept consists primarily of a type and a referent, either or both of which can be null. Concepts can also be members of coreference sets, linking them to other concepts.

See Also:
Serialized Form

Constructor Summary
Concept()
          Constructs a concept neither type nor referent.
Concept(ConceptType newType)
          Constructs a concept with the specified type and no referent.
Concept(ConceptType newType, Referent newReferent)
          Constructs a concept with the specified type and referent.
Concept(Referent newReferent)
          Constructs a concept with the specified referent and no type.
 
Method Summary
 Concept copy(CopyingScheme copyScheme)
          Performs a copy operation on this concept according to the the specified CopyingScheme.
 Concept copy(CopyingScheme copyScheme, java.util.Hashtable substitutionTable)
          Performs a copy operation on this concept according to the the specified CopyingScheme.
 CoreferenceSet[] getCoreferenceSets()
          Returns the coreferences sets of which this concept is a member.
 Concept[] getCoreferentConcepts()
          Returns all of the concepts coreferent to this concept.
 Referent getReferent()
          Returns this concept's referent.
 Relation[] getRelators()
          Returns an array (possibly empty) of the relations in the enclosing graph that relate this concept.
 ConceptType getType()
          Returns this concept's type.
 boolean isContext()
          Returns true if this concept is a context.
 boolean isDefiningConcept()
          Returns true if this concept is the defining concept of a coreference set.
 boolean isDominantConcept()
          Returns true if this concept is a dominant node of a coreference set.
 boolean isEnclosedBy(Concept concept)
          Returns true if this concept is enclosed by the specified concept.
 boolean isEnclosedBy(Graph graph)
          Returns true if this concept is enclosed by the specified graph.
 boolean isGeneric()
          Returns true if this concept is generic; false if the concept is specific.
 void isolate()
          Isolates this concept by removing it from all coreference sets to which it belongs and by isolating any and all concepts that may be nested within it.
static MatchResult matchConcepts(Concept first, Concept second, MatchingScheme matchingScheme)
          Compares two concepts to decide if they match.
 Concept restrictTo(ConceptType subType)
          Returns a new concept identical to this but restricted to the new type.
 Concept restrictTo(ConceptType subType, Referent newReferent)
          Returns a new concept identical to this but restricted to the given referent and subtype.
 Concept restrictTo(Referent newReferent)
          Returns a new concept identical to this but restricted to the given referent.
 void setReferent(Referent newReferent)
          Sets this concept's referent.
 void setType(ConceptType newType)
          Sets this concept's type.
static boolean testCoreference(Concept first, Concept second)
          Returns true if the two concepts specified are coreferent.
 
Methods inherited from class notio.Node
getComment, getEnclosingGraph, setComment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Concept

public Concept(ConceptType newType,
               Referent newReferent)
Constructs a concept with the specified type and referent. A null value may be used for either or both. A null referent indicates a generic concept.
Parameters:
newType - the concept type for this concept.
newReferent - the referent for this concept.

Concept

public Concept(ConceptType newType)
Constructs a concept with the specified type and no referent. The referent in this case is set to null, indicating a generic concept.
Parameters:
newType - the concept type for this concept.

Concept

public Concept(Referent newReferent)
Constructs a concept with the specified referent and no type. A null referent indicates a generic concept.
Parameters:
newReferent - the referent for this concept.

Concept

public Concept()
Constructs a concept neither type nor referent. Both type and referent are initialized to null. A null referent indicates a generic concept.
Method Detail

getType

public ConceptType getType()
Returns this concept's type. Null indicates an untyped concept.
Returns:
this concept's type

getReferent

public Referent getReferent()
Returns this concept's referent. Null indicates a generic concept.
Returns:
this concept's referent.

setType

public void setType(ConceptType newType)
Sets this concept's type. If a type has already been set, it is replaced.
Parameters:
newType - the new type for this concept.

setReferent

public void setReferent(Referent newReferent)
Sets this concept's referent. If a referent has already been set, it is replaced. The referent may be set to null, indicating a generic concept.
Parameters:
newReferent - the new referent for this concept.

getCoreferenceSets

public CoreferenceSet[] getCoreferenceSets()
Returns the coreferences sets of which this concept is a member.
Returns:
an array containing all of the coreference sets of which this concept is a member, possibly empty.

getCoreferentConcepts

public Concept[] getCoreferentConcepts()
Returns all of the concepts coreferent to this concept. This is essentially the union of all the coreferent sets to which this concept belongs. Note that every concept is coreferent to itself so this method will always return at least one element.
Returns:
an array containing of the concepts coreferent to this concept.

isDominantConcept

public boolean isDominantConcept()
Returns true if this concept is a dominant node of a coreference set.
Returns:
true if this concept is a dominant node of a coreference set.

isDefiningConcept

public boolean isDefiningConcept()
Returns true if this concept is the defining concept of a coreference set.
Returns:
true if this concept is the defining concept of a coreference set.

isEnclosedBy

public boolean isEnclosedBy(Concept concept)
Returns true if this concept is enclosed by the specified concept.
Parameters:
concept - the concept being checked for as enclosing this concept.
Returns:
true if this concept is enclosed by the specified concept.

isEnclosedBy

public boolean isEnclosedBy(Graph graph)
Returns true if this concept is enclosed by the specified graph.
Parameters:
graph - the graph being checked for as enclosing this concept.
Returns:
true if this concept is enclosed by the specified graph.

isolate

public void isolate()
             throws CorefRemoveException
Isolates this concept by removing it from all coreference sets to which it belongs and by isolating any and all concepts that may be nested within it.

getRelators

public Relation[] getRelators()
Returns an array (possibly empty) of the relations in the enclosing graph that relate this concept. This method will return null if the concept does not belong to any graph (getEnclosingGraph() returns null).
Returns:
an array containing of the relations that relate this concept.

copy

public Concept copy(CopyingScheme copyScheme)
Performs a copy operation on this concept according to the the specified CopyingScheme. The result may be a new object of exactly the same class as the original or simply a reference to this concept depending on the copying scheme. Coreference sets will be copied as needed depending on the copying scheme.
Parameters:
copyScheme - the copying scheme used to control the copy operation.
Returns:
the result of the copy operation.

copy

public Concept copy(CopyingScheme copyScheme,
                    java.util.Hashtable substitutionTable)
Performs a copy operation on this concept according to the the specified CopyingScheme. The result may be a new object of exactly the same class as the original or simply a reference to this concept depending on the copying scheme. Coreference sets will be copied as needed depending on the copying scheme.
Parameters:
copyScheme - the copying scheme used to control the copy operation.
substitutionTable - a hashtable containing copied objects available due to earlier copy operations.
Returns:
the result of the copy operation.

restrictTo

public Concept restrictTo(ConceptType subType)
                   throws RestrictionException
Returns a new concept identical to this but restricted to the new type.
Parameters:
subType - the type to be restricted to.
Returns:
the new restricted concept.
Throws:
RestrictionException - if subType is not a real subtype of the current type

restrictTo

public Concept restrictTo(Referent newReferent)
                   throws RestrictionException
Returns a new concept identical to this but restricted to the given referent.
Parameters:
newReferent - the referent to be restricted to.
Returns:
the new restricted concept.
Throws:
RestrictionException - if there is already an equally specific referent

restrictTo

public Concept restrictTo(ConceptType subType,
                          Referent newReferent)
                   throws RestrictionException
Returns a new concept identical to this but restricted to the given referent and subtype.
Parameters:
subType - the type to be restricted to.
newReferent - the referent to be restricted to.
Returns:
the new restricted concept.
Throws:
RestrictionException - if subType is not a real sub-type of the current type and/or if there is already an equally specific referent.

isContext

public boolean isContext()
Returns true if this concept is a context. A context is a concept whose designator is a non-blank conceptual graph. This method will return true if this concept has a referent which returns true when its isContext() method is called.
Returns:
true if this concept is a context.
See Also:
Referent.isContext()

isGeneric

public boolean isGeneric()
Returns true if this concept is generic; false if the concept is specific. A generic concept either has a referent of null, or a referent in which both the quantifier and designator are null.
Returns:
true if this concept is generic; false if specific.

testCoreference

public static boolean testCoreference(Concept first,
                                      Concept second)
Returns true if the two concepts specified are coreferent.
Parameters:
first - the first concept.
second - the second concept.
Returns:
true if the two concepts specified are coreferent.

matchConcepts

public static MatchResult matchConcepts(Concept first,
                                        Concept second,
                                        MatchingScheme matchingScheme)
Compares two concepts to decide if they match. The exact semantics of matching are determined by the matching scheme. This method may compare more than two concepts depending on the setting of the coreference matching flags.
Parameters:
first - the first concept being matched.
second - the second concept being matched.
matchingScheme - the matching scheme that determines how the match is performed.
Returns:
true if the two concepts match according to the scheme's criteria.


Copyright 1998-1999 Finnegan Southey