notio
Class MatchingScheme

java.lang.Object
  |
  +--notio.MatchingScheme

public class MatchingScheme
extends java.lang.Object

A class used to specify how matching of graph elements should be performed. When matching graphs or graph components, a MatchingScheme instance is used to describe exactly how matching should be performed. Not all matching schemes need be implemented by a given implementation and many schemes would not make sense. The exact behaviour of an implementation under these circumstances is undefined but it is recommended that the implementation throw notio.UnimplementedFeatureException either when an invalid scheme is constructed or when it is used in a matching method. MatchingScheme instances may be reused as they are not altered by the matching process.

See Also:
UnimplementedFeatureException

Field Summary
static int ARC_MATCH_ANYTHING
          Arc matching control flag: arguments will always match.
static int ARC_MATCH_CONCEPT
          Arc matching control flag: arguments will be matched according to scheme's concept flag.
static int ARC_MATCH_INSTANCE
          Arc matching control flag: arguments must be same Concept instances.
static int ARC_MATCH_VALENCE
          Arc matching control flag: arguments must have the same number of arcs.
static int CN_MATCH_ALL
          Concept matching control flag: arguments will be matched using coreference, quantifier, designator, and type flags.
static int CN_MATCH_ANYTHING
          Concept matching control flag: arguments will always match.
static int CN_MATCH_COREFERENTS
          Concept matching control flag: arguments will be matched using coreference flag only.
static int CN_MATCH_INSTANCE
          Concept matching control flag: arguments must be the same Concept instance.
static int CN_MATCH_REFERENTS
          Concept matching control flag: arguments will be matched according to the coreference, designator and quantifier match flags.
static int CN_MATCH_TYPES
          Concept matching control flag: arguments will be matched according to the concept type match flag.
static int CONN_MATCH_OFF
          Connected graph matching control flag: disconnected matches are allowed.
static int CONN_MATCH_ON
          Connected graph matching control flag: disconnected matches are not allowed.
static int COREF_AGREE_OFF
          Coreference matching control flag: when matching a concept, all coreferent concepts must match as well.
static int COREF_AGREE_ON
          Coreference matching control flag: when matching a concept, coreferent concepts will not be considered.
static int COREF_AUTOMATCH_OFF
          Coreference matching control flag: coreferent concepts will be treated as normal concepts.
static int COREF_AUTOMATCH_ON
          Coreference matching control flag: coreferent concepts will match regardless of types and referents.
static int CT_MATCH_ANYTHING
          ConceptType matching control flag: arguments will always match.
static int CT_MATCH_EQUIVALENT
          ConceptType matching control flag: arguments must have a sub/supertype relationship.
static int CT_MATCH_INSTANCE
          ConceptType matching control flag: arguments must be the same ConceptType instance.
static int CT_MATCH_LABEL
          ConceptType matching control flag: arguments must have the exact same type label.
static int CT_MATCH_SUBTYPE
          ConceptType matching control flag: first argument must be a subtype of the second.
static int CT_MATCH_SUPERTYPE
          ConceptType matching control flag: first argument must be a supertype of the second.
static int DG_MATCH_ANYTHING
          Designator matching control flag: arguments will always match.
static int DG_MATCH_EQUIVALENT
          Designator matching control flag: arguments may have a generic/generic or generic/specific relationship.
static int DG_MATCH_GENERALIZATION
          Designator matching control flag: the first argument may be a generalization of the second.
static int DG_MATCH_INDIVIDUAL
          Designator matching control flag: arguments refer to the same individual.
static int DG_MATCH_INSTANCE
          Designator matching control flag: arguments must be the same Designator instance.
static int DG_MATCH_PROPER_GENERALIZATION
          Designator matching control flag: the first argument must be a generalization of the second.
static int DG_MATCH_PROPER_RESTRICTION
          Designator matching control flag: the first argument must be a restriction of the second.
static int DG_MATCH_RESTRICTION
          Designator matching control flag: the first argument may be a restriction of the second.
static int FOLD_MATCH_OFF
          Folding matching control flag: folds will not be matched.
static int FOLD_MATCH_ON
          Folding matching control flag: folds will be matched.
static int GR_MATCH_ANYTHING
          Graph matching control flag: arguments will always match.
static int GR_MATCH_COMMON_SUBGRAPH
          Graph matching control flag: graphs must share one or more common subgraphs.
static int GR_MATCH_COMPLETE
          Graph matching control flag: arguments completely match.
static int GR_MATCH_EITHER_PROPER_SUBGRAPH
          Graph matching control flag: one argument must be a proper subgraph of the other.
static int GR_MATCH_EITHER_SUBGRAPH
          Graph matching control flag: one argument must be a subgraph of the other.
static int GR_MATCH_INSTANCE
          Graph matching control flag: arguments must be the same Graph instance.
static int GR_MATCH_PROPER_SUBGRAPH
          Graph matching control flag: first argument must be a subgraph of the second.
static int GR_MATCH_SUBGRAPH
          Graph matching control flag: first argument must be a subgraph of the second.
static int MARKER_MATCH_ANYTHING
          Marker matching control flag: markers always match.
static int MARKER_MATCH_COMPARATOR
          Marker matching control flag: markers are matched using the marker comparator specified in this scheme.
static int MARKER_MATCH_ID
          Marker matching control flag: markers match only if their ID's are the same.
static int QF_MATCH_ANYTHING
          Quantifier matching control flag: arguments will always match.
static int RN_MATCH_ALL
          Relation matching control flag: arguments will be matched according to all other match flags.
static int RN_MATCH_ANYTHING
          Relation matching control flag: arguments will always match.
static int RN_MATCH_ARCS
          Relation matching control flag: arguments will be matched according to the arc match flag.
static int RN_MATCH_INSTANCE
          Relation matching control flag: arguments must be the same Relation instance.
static int RN_MATCH_TYPES
          Relation matching control flag: arguments will be matched according to the relation type match flag.
static int RT_MATCH_ANYTHING
          RelationType matching control flag: arguments will always match.
static int RT_MATCH_EQUIVALENT
          RelationType matching control flag: arguments must have a sub/supertype relationship.
static int RT_MATCH_INSTANCE
          RelationType matching control flag: arguments must be the same RelationType instance.
static int RT_MATCH_LABEL
          RelationType matching control flag: arguments must have the exact same type label.
static int RT_MATCH_SUBTYPE
          RelationType matching control flag: first argument must be a subtype of the second.
static int RT_MATCH_SUPERTYPE
          RelationType matching control flag: first argument must be a supertype of the second.
 
Constructor Summary
MatchingScheme(int newGraphFlag, int newConceptFlag, int newRelationFlag, int newConceptTypeFlag, int newRelationTypeFlag, int newQuantifierFlag, int newDesignatorFlag, int newMarkerFlag, int newArcFlag, int newCorefAutoMatchFlag, int newCorefAgreementFlag, int newFoldingFlag, int newConnectedFlag, int newMaxMatches, MarkerComparator newMarkerComparator, MatchingScheme newNestedScheme)
          Constructs a matching scheme with the specified control flags.
 
Method Summary
 int getArcFlag()
          Returns the arc matching control flag for this scheme.
 int getConceptFlag()
          Returns the concept matching control flag for this scheme.
 int getConceptTypeFlag()
          Returns the concept type matching control flag for this scheme.
 int getConnectedFlag()
          Returns the connected graph matching control flag for this scheme.
 int getCoreferenceAgreementFlag()
          Returns the coreference agreement control flag for this scheme.
 int getCoreferenceAutoMatchFlag()
          Returns the coreference auto-matching control flag for this scheme.
 int getDesignatorFlag()
          Returns the designator matching control flag for this scheme.
 int getFoldingFlag()
          Returns the folding matching control flag for this scheme.
 int getGraphFlag()
          Returns the graph matching control flag for this scheme.
 MarkerComparator getMarkerComparator()
          Returns the MarkerComparator to be used in this scheme, if any.
 int getMarkerFlag()
          Returns the marker matching control flag for this scheme.
 int getMaxMatches()
          Returns the maximum number of graph matches to be generated this scheme.
 MatchingScheme getNestedMatchingScheme()
          Returns the nested matching scheme or null.
 int getQuantifierFlag()
          Returns the quantifier matching control flag for this scheme.
 int getRelationFlag()
          Returns the relation matching control flag for this scheme.
 int getRelationTypeFlag()
          Returns the relation type matching control flag for this scheme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GR_MATCH_INSTANCE

public static final int GR_MATCH_INSTANCE
Graph matching control flag: arguments must be the same Graph instance.

GR_MATCH_COMPLETE

public static final int GR_MATCH_COMPLETE
Graph matching control flag: arguments completely match.

GR_MATCH_SUBGRAPH

public static final int GR_MATCH_SUBGRAPH
Graph matching control flag: first argument must be a subgraph of the second.

GR_MATCH_PROPER_SUBGRAPH

public static final int GR_MATCH_PROPER_SUBGRAPH
Graph matching control flag: first argument must be a subgraph of the second.

GR_MATCH_EITHER_SUBGRAPH

public static final int GR_MATCH_EITHER_SUBGRAPH
Graph matching control flag: one argument must be a subgraph of the other.

GR_MATCH_EITHER_PROPER_SUBGRAPH

public static final int GR_MATCH_EITHER_PROPER_SUBGRAPH
Graph matching control flag: one argument must be a proper subgraph of the other.

GR_MATCH_COMMON_SUBGRAPH

public static final int GR_MATCH_COMMON_SUBGRAPH
Graph matching control flag: graphs must share one or more common subgraphs.

GR_MATCH_ANYTHING

public static final int GR_MATCH_ANYTHING
Graph matching control flag: arguments will always match.

CN_MATCH_INSTANCE

public static final int CN_MATCH_INSTANCE
Concept matching control flag: arguments must be the same Concept instance.

CN_MATCH_TYPES

public static final int CN_MATCH_TYPES
Concept matching control flag: arguments will be matched according to the concept type match flag.

CN_MATCH_REFERENTS

public static final int CN_MATCH_REFERENTS
Concept matching control flag: arguments will be matched according to the coreference, designator and quantifier match flags.

CN_MATCH_COREFERENTS

public static final int CN_MATCH_COREFERENTS
Concept matching control flag: arguments will be matched using coreference flag only.

CN_MATCH_ALL

public static final int CN_MATCH_ALL
Concept matching control flag: arguments will be matched using coreference, quantifier, designator, and type flags.

CN_MATCH_ANYTHING

public static final int CN_MATCH_ANYTHING
Concept matching control flag: arguments will always match.

RN_MATCH_INSTANCE

public static final int RN_MATCH_INSTANCE
Relation matching control flag: arguments must be the same Relation instance.

RN_MATCH_TYPES

public static final int RN_MATCH_TYPES
Relation matching control flag: arguments will be matched according to the relation type match flag.

RN_MATCH_ARCS

public static final int RN_MATCH_ARCS
Relation matching control flag: arguments will be matched according to the arc match flag.

RN_MATCH_ALL

public static final int RN_MATCH_ALL
Relation matching control flag: arguments will be matched according to all other match flags.

RN_MATCH_ANYTHING

public static final int RN_MATCH_ANYTHING
Relation matching control flag: arguments will always match.

CT_MATCH_INSTANCE

public static final int CT_MATCH_INSTANCE
ConceptType matching control flag: arguments must be the same ConceptType instance.

CT_MATCH_LABEL

public static final int CT_MATCH_LABEL
ConceptType matching control flag: arguments must have the exact same type label.

CT_MATCH_SUBTYPE

public static final int CT_MATCH_SUBTYPE
ConceptType matching control flag: first argument must be a subtype of the second.

CT_MATCH_SUPERTYPE

public static final int CT_MATCH_SUPERTYPE
ConceptType matching control flag: first argument must be a supertype of the second.

CT_MATCH_EQUIVALENT

public static final int CT_MATCH_EQUIVALENT
ConceptType matching control flag: arguments must have a sub/supertype relationship.

CT_MATCH_ANYTHING

public static final int CT_MATCH_ANYTHING
ConceptType matching control flag: arguments will always match.

RT_MATCH_INSTANCE

public static final int RT_MATCH_INSTANCE
RelationType matching control flag: arguments must be the same RelationType instance.

RT_MATCH_LABEL

public static final int RT_MATCH_LABEL
RelationType matching control flag: arguments must have the exact same type label.

RT_MATCH_SUBTYPE

public static final int RT_MATCH_SUBTYPE
RelationType matching control flag: first argument must be a subtype of the second.

RT_MATCH_SUPERTYPE

public static final int RT_MATCH_SUPERTYPE
RelationType matching control flag: first argument must be a supertype of the second.

RT_MATCH_EQUIVALENT

public static final int RT_MATCH_EQUIVALENT
RelationType matching control flag: arguments must have a sub/supertype relationship.

RT_MATCH_ANYTHING

public static final int RT_MATCH_ANYTHING
RelationType matching control flag: arguments will always match.

QF_MATCH_ANYTHING

public static final int QF_MATCH_ANYTHING
Quantifier matching control flag: arguments will always match.

DG_MATCH_INSTANCE

public static final int DG_MATCH_INSTANCE
Designator matching control flag: arguments must be the same Designator instance.

DG_MATCH_INDIVIDUAL

public static final int DG_MATCH_INDIVIDUAL
Designator matching control flag: arguments refer to the same individual.

DG_MATCH_EQUIVALENT

public static final int DG_MATCH_EQUIVALENT
Designator matching control flag: arguments may have a generic/generic or generic/specific relationship.

DG_MATCH_RESTRICTION

public static final int DG_MATCH_RESTRICTION
Designator matching control flag: the first argument may be a restriction of the second.

DG_MATCH_GENERALIZATION

public static final int DG_MATCH_GENERALIZATION
Designator matching control flag: the first argument may be a generalization of the second.

DG_MATCH_PROPER_RESTRICTION

public static final int DG_MATCH_PROPER_RESTRICTION
Designator matching control flag: the first argument must be a restriction of the second.

DG_MATCH_PROPER_GENERALIZATION

public static final int DG_MATCH_PROPER_GENERALIZATION
Designator matching control flag: the first argument must be a generalization of the second.

DG_MATCH_ANYTHING

public static final int DG_MATCH_ANYTHING
Designator matching control flag: arguments will always match.

ARC_MATCH_INSTANCE

public static final int ARC_MATCH_INSTANCE
Arc matching control flag: arguments must be same Concept instances.

ARC_MATCH_CONCEPT

public static final int ARC_MATCH_CONCEPT
Arc matching control flag: arguments will be matched according to scheme's concept flag.

ARC_MATCH_VALENCE

public static final int ARC_MATCH_VALENCE
Arc matching control flag: arguments must have the same number of arcs.

ARC_MATCH_ANYTHING

public static final int ARC_MATCH_ANYTHING
Arc matching control flag: arguments will always match.

COREF_AUTOMATCH_OFF

public static final int COREF_AUTOMATCH_OFF
Coreference matching control flag: coreferent concepts will be treated as normal concepts.

COREF_AUTOMATCH_ON

public static final int COREF_AUTOMATCH_ON
Coreference matching control flag: coreferent concepts will match regardless of types and referents.

COREF_AGREE_OFF

public static final int COREF_AGREE_OFF
Coreference matching control flag: when matching a concept, all coreferent concepts must match as well.

COREF_AGREE_ON

public static final int COREF_AGREE_ON
Coreference matching control flag: when matching a concept, coreferent concepts will not be considered.

FOLD_MATCH_OFF

public static final int FOLD_MATCH_OFF
Folding matching control flag: folds will not be matched.

FOLD_MATCH_ON

public static final int FOLD_MATCH_ON
Folding matching control flag: folds will be matched.

CONN_MATCH_OFF

public static final int CONN_MATCH_OFF
Connected graph matching control flag: disconnected matches are allowed.

CONN_MATCH_ON

public static final int CONN_MATCH_ON
Connected graph matching control flag: disconnected matches are not allowed.

MARKER_MATCH_ID

public static final int MARKER_MATCH_ID
Marker matching control flag: markers match only if their ID's are the same.

MARKER_MATCH_COMPARATOR

public static final int MARKER_MATCH_COMPARATOR
Marker matching control flag: markers are matched using the marker comparator specified in this scheme.

MARKER_MATCH_ANYTHING

public static final int MARKER_MATCH_ANYTHING
Marker matching control flag: markers always match.
Constructor Detail

MatchingScheme

public MatchingScheme(int newGraphFlag,
                      int newConceptFlag,
                      int newRelationFlag,
                      int newConceptTypeFlag,
                      int newRelationTypeFlag,
                      int newQuantifierFlag,
                      int newDesignatorFlag,
                      int newMarkerFlag,
                      int newArcFlag,
                      int newCorefAutoMatchFlag,
                      int newCorefAgreementFlag,
                      int newFoldingFlag,
                      int newConnectedFlag,
                      int newMaxMatches,
                      MarkerComparator newMarkerComparator,
                      MatchingScheme newNestedScheme)
Constructs a matching scheme with the specified control flags.
Parameters:
newGraphFlag - Matching flag for graphs.
newConceptFlag - Matching flag for concepts.
newRelationFlag - Matching flag for relations.
newConceptTypeFlag - Matching flag for concept types.
newRelationTypeFlag - Matching flag for relation types.
newQuantifierFlag - Matching flag for quantifiers.
newDesignatorFlag - Matching flag for designators.
newMarkerFlag - Matching flag for markers.
newArcFlag - Matching flag for arcs.
newCorefAutoMatchFlag - Flag for automatching coreference concepts.
newCorefAgreementFlag - Flag for forcing agreement with corefernt concepts.
newFoldingFlag - Matching flag for folding.
newConnectedFlag - Matching flag for connected graphs.
newMaxMatches - The maximum number of graph matches to generate in this context. A zero indicates that all possible matches should be generated.
newMarkerComparator - a MarkerComparator to be used for matching Markers (must be null if the marker matching flag does not call for a comparator).
newNestedScheme - A nested matching scheme to be used for matching nested graphs (null means use present scheme).
Method Detail

getGraphFlag

public int getGraphFlag()
Returns the graph matching control flag for this scheme.
Returns:
the graph matching control flag for this scheme.

getConceptFlag

public int getConceptFlag()
Returns the concept matching control flag for this scheme.
Returns:
the concept matching control flag for this scheme.

getRelationFlag

public int getRelationFlag()
Returns the relation matching control flag for this scheme.
Returns:
the relation matching control flag for this scheme.

getConceptTypeFlag

public int getConceptTypeFlag()
Returns the concept type matching control flag for this scheme.
Returns:
the concept type matching control flag for this scheme.

getRelationTypeFlag

public int getRelationTypeFlag()
Returns the relation type matching control flag for this scheme.
Returns:
the relation type matching control flag for this scheme.

getQuantifierFlag

public int getQuantifierFlag()
Returns the quantifier matching control flag for this scheme.
Returns:
the quantifier matching control flag for this scheme.

getDesignatorFlag

public int getDesignatorFlag()
Returns the designator matching control flag for this scheme.
Returns:
the designator matching control flag for this scheme.

getArcFlag

public int getArcFlag()
Returns the arc matching control flag for this scheme.
Returns:
the arc matching control flag for this scheme.

getMarkerFlag

public int getMarkerFlag()
Returns the marker matching control flag for this scheme.
Returns:
the marker matching control flag for this scheme.

getCoreferenceAutoMatchFlag

public int getCoreferenceAutoMatchFlag()
Returns the coreference auto-matching control flag for this scheme.
Returns:
the coreference auto-matching control flag for this scheme.

getCoreferenceAgreementFlag

public int getCoreferenceAgreementFlag()
Returns the coreference agreement control flag for this scheme.
Returns:
the coreference agreement control flag for this scheme.

getFoldingFlag

public int getFoldingFlag()
Returns the folding matching control flag for this scheme.
Returns:
the folding matching control flag for this scheme.

getConnectedFlag

public int getConnectedFlag()
Returns the connected graph matching control flag for this scheme.
Returns:
the connected graph matching control flag for this scheme.

getMaxMatches

public int getMaxMatches()
Returns the maximum number of graph matches to be generated this scheme.
Returns:
the maximum number of graph matches to be generated this scheme.

getNestedMatchingScheme

public MatchingScheme getNestedMatchingScheme()
Returns the nested matching scheme or null. The nested matching scheme is used for matching nested graphs. If it is set to null, the current scheme is used.
Returns:
the nested matching scheme or null.

getMarkerComparator

public MarkerComparator getMarkerComparator()
Returns the MarkerComparator to be used in this scheme, if any.
Returns:
the MarkerComparator to be used in this scheme, if any.


Copyright 1998-2001 Finnegan Southey