|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.byu.deg.ontos.MappingHeuristic
edu.byu.deg.ontos.heuristic.FunctionalGroupHeuristic
A mapping heuristic that generates a relationship based on a relationship set connection that qualifies as a functional group in the traversal of the ontology structure.
Field Summary |
Fields inherited from class edu.byu.deg.ontos.MappingHeuristic |
ACCEPTED_MATCH, connComparer, ontIndex, PROPOSED_MATCH, REJECTED_MATCH |
Constructor Summary | |
FunctionalGroupHeuristic()
Creates a new instance of FunctionalGroupHeuristic |
|
FunctionalGroupHeuristic(ExtractionOntologyIndex idx)
Creates a new instance of FunctionalGroupHeuristic and initializes it with an indexed ontology. |
Method Summary | |
protected int |
compareRelSets(edu.byu.deg.osmx.OSMXRelSetConnectionType r1,
edu.byu.deg.osmx.OSMXRelSetConnectionType r2,
MatchingContext ctxt)
Defines a total order on a set of relationship set connections by determining, for a pair of such connections, which should precede the other in a sorted list. |
protected MatchingContext |
findBestSubContext(edu.byu.deg.osmx.OSMXRelSetConnectionType conn,
MatchingContext ctxt)
Determines the likely outer boundaries of the functional group from the given context and returns the result as a matching context. |
protected edu.byu.deg.osmx.OSMXRelationshipType |
inferRelationship(edu.byu.deg.osmx.OSMXRelSetConnectionType primaryConn,
MatchingContext ctxt,
Set visitedRelSets)
Generates a single relationship from the given context. |
Set |
inferRelationships(edu.byu.deg.osmx.OSMXRelSetConnectionType primaryConn,
MatchingContext ctxt,
Set visitedRelSets)
The main algorithm for this heuristic. |
protected MatchingContext[] |
subdivideContext(MatchingContext ctxt)
Divides the given context into multiple matching contexts whose boundaries should approximate the contextual boundaries of the individual objects to be generated for the functional group. |
Methods inherited from class edu.byu.deg.ontos.MappingHeuristic |
addObject, addRelationship, bindObject, getOntologyIndex, getOntologyIndex, setOntologyIndex |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FunctionalGroupHeuristic()
public FunctionalGroupHeuristic(ExtractionOntologyIndex idx)
idx
- The index for the ontology used by this heuristic.Method Detail |
public Set inferRelationships(edu.byu.deg.osmx.OSMXRelSetConnectionType primaryConn, MatchingContext ctxt, Set visitedRelSets)
ContextualHeuristic
recursively
until no more objects are produced. A relationship is created for each object
returned by ContextualHeuristic
, and the set of relationships is
returned.
primaryConn
- The relationship set connection from which the traversal is originating; in
other words, the "side" of the relationship set that the invoking code acted
upon to invoke this heuristic. This parameter identifies both the relationship
set for which the relationships should be generated, as well as in which
direction to continue the recursion.ctxt
- The matching context from which relationships should be generated.visitedRelSets
- A collection of relationship sets previously visited during the recursion;
allows us to avoid infinite recursion.
Set
of Relationship
elements.protected edu.byu.deg.osmx.OSMXRelationshipType inferRelationship(edu.byu.deg.osmx.OSMXRelSetConnectionType primaryConn, MatchingContext ctxt, Set visitedRelSets)
primaryConn
- The connection that identifies the relationship set for which the relationship
should be generated. It also indicates from which direction the ontology
traversal is proceeding, so that infinite recursion can be avoided.ctxt
- The matching context from which the relationship is to be derived.visitedRelSets
- A set of previously visited relationship sets, used to remember where the
traversal has already been performed so that infinite recursion can be avoided.
null
if none could be successfully
generated from the context.protected int compareRelSets(edu.byu.deg.osmx.OSMXRelSetConnectionType r1, edu.byu.deg.osmx.OSMXRelSetConnectionType r2, MatchingContext ctxt)
r1
- The first relationship set connection to compare.r2
- The second relationship set connection to compare.ctxt
- The current matching context, which provides information useful in assessing
which connection should precede the other.
r1 == r2
.
This method bases the order only on a dictionary ordering of the IDs of the
relationship sets being compared.protected MatchingContext findBestSubContext(edu.byu.deg.osmx.OSMXRelSetConnectionType conn, MatchingContext ctxt)
conn
- The connection that identifies the functional group.ctxt
- The context from which to derive the functional group context.
protected MatchingContext[] subdivideContext(MatchingContext ctxt)
ctxt
- The context to subdivide.
ContextualHeuristic
.
Currently this method is not implemented and will throw
UnsupportedOperationException
if called.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |