public abstract class Link extends Object
| Modifier and Type | Method and Description |
|---|---|
protected List<Proposition> |
createResults(List<Proposition> propositions)
Filters out propositions by applying the property constraint and index
constraints.
|
boolean |
equals(Object obj) |
Comparator<Proposition> |
getComparator()
A comparator for ordering the propositions at the end of the traversal.
|
PropertyConstraint[] |
getConstraints()
Constraints on properties of the propositions at the end of the
traversal.
|
int |
getFromIndex()
The start index of the propositions of interest at the end of the
traversal step, after applying the proposition id constraints, property
constraints and a comparator.
|
abstract String[] |
getInferredPropositionIds(KnowledgeSource knowledgeSource,
String[] inPropIds)
Aggregates and returns the possible proposition ids on the right-hand
side of the link.
|
String[] |
getPropositionIds()
The ids of the propositions to traverse to.
|
int |
getToIndex()
The last index of the propositions of interest at the end of the
traversal step exclusive, after applying the proposition id constraints,
property constraints and a comparator.
|
int |
hashCode() |
protected boolean |
isMatch(Proposition proposition)
Returns whether a proposition has one of the proposition ids specified
by the link.
|
String |
toString() |
public final String[] getPropositionIds()
String[] Guaranteed not
null.public abstract String[] getInferredPropositionIds(KnowledgeSource knowledgeSource, String[] inPropIds) throws KnowledgeSourceReadException
inPropIds - the proposition ids inferred from the previous link,
or the row proposition id if this is the first link.Strings.KnowledgeSourceReadExceptionprotected boolean isMatch(Proposition proposition)
proposition - a Proposition. Cannot be null.true or false.public final PropertyConstraint[] getConstraints()
PropertyConstraint[]. Guaranteed not null.public final Comparator<Proposition> getComparator()
null, the propositions will not be provided in any
particular order.Comparator.public final int getFromIndex()
int, with zero or a negative number indicating
the beginning of the list.public final int getToIndex()
int, with a negative number indicating the end of
the list. Must be greater than the fromIndex.protected final List<Proposition> createResults(List<Proposition> propositions)
propositions in-place!propositions - a Collection. If null, an
empty list is returned.List. Not guaranteed to be modifiable.Copyright © 2012–2017 Emory University. All rights reserved.