public final class Reference extends Link
| Constructor and Description |
|---|
Reference(String referenceName)
Creates an instance that specifies traversals using the specified
reference from a proposition to all referred-to propositions.
|
Reference(String[] referenceNames)
Creates an instance that specifies traversals using the specified
references from a proposition to all referred-to propositions.
|
Reference(String[] referenceNames,
String[] propositionIds)
Creates an instance that specifies traversals using the specified
references from a proposition only to propositions with the given ids.
|
Reference(String[] referenceNames,
String[] propositionIds,
PropertyConstraint[] constraints)
Creates an instance that specifies traversals using the specified
references from a proposition only to propositions with the given ids and
that satisfy the specified constraints.
|
Reference(String[] referenceNames,
String[] propositionIds,
PropertyConstraint[] constraints,
Comparator<Proposition> comparator,
int index)
Creates an instance that specifies traversals using the specified
references from a proposition only to propositions with the given ids and
that satisfy the specified constraints.
|
Reference(String[] referenceNames,
String[] propositionIds,
PropertyConstraint[] constraints,
Comparator<Proposition> comparator,
int fromIndex,
int toIndex)
Creates an instance that specifies traversals using the specified
references from a proposition only to propositions with the given ids and
that satisfy the specified constraints.
|
Reference(String referenceName,
String[] propositionIds)
Creates an instance that specifies traversals using the specified
reference from a proposition only to propositions with the given ids.
|
Reference(String referenceName,
String[] propositionIds,
PropertyConstraint[] constraints)
Creates an instance that specifies traversals using the specified
references from a proposition only to propositions with the given ids and
that satisfy the specified property constraints.
|
Reference(String referenceName,
String[] propositionIds,
PropertyConstraint[] constraints,
Comparator<Proposition> comparator,
int index)
Creates an instance that specifies traversals using the specified
reference from a proposition only to propositions with the given ids and
that satisfy the specified property constraints.
|
Reference(String referenceName,
String[] propositionIds,
PropertyConstraint[] constraints,
Comparator<Proposition> comparator,
int fromIndex,
int toIndex)
Creates an instance that specifies traversals using the specified
reference from a proposition only to propositions with the given ids and
that satisfy the specified constraints.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String[] |
getInferredPropositionIds(KnowledgeSource knowledgeSource,
String[] inPropIds)
Aggregates and returns the possible proposition ids on the right-hand
side of the link.
|
String[] |
getReferenceNames()
Gets the names of the reference(s) to be traversed.
|
int |
hashCode() |
String |
toString() |
createResults, getComparator, getConstraints, getFromIndex, getPropositionIds, getToIndex, isMatchpublic Reference(String[] referenceNames)
referenceNames - a String[] of reference names. An empty *
or null array specifies that all references should be
traversed.public Reference(String[] referenceNames, String[] propositionIds)
referenceNames - a String[] of reference names. An empty *
or null array specifies that all references should be
traversed.propositionIds - a String[] of proposition ids. An empty *
or null array specifies that all propositions on the
right-hand-side of the reference should be used.public Reference(String[] referenceNames, String[] propositionIds, PropertyConstraint[] constraints)
referenceNames - a String[] of reference names. An empty *
or null array specifies that all references should be
traversed.propositionIds - a String[] of proposition ids. An empty *
or null array specifies that all propositions on the
right-hand-side of a reference should be used.constraints - a PropertyConstraint[] of property constraints
on the propositions on the right-hand-side of a reference. An empty or
null array specifies that no constraints should be applied.public Reference(String[] referenceNames, String[] propositionIds, PropertyConstraint[] constraints, Comparator<Proposition> comparator, int index)
referenceNames - a String[] of reference names. An empty *
or null array specifies that all references should be
traversed.propositionIds - a String[] of proposition ids. An empty *
or null array specifies that all propositions on the
right-hand-side of a reference should be used.constraints - a PropertyConstraint[] of property constraints
on the propositions on the right-hand-side of a reference. An empty * or null array specifies that no constraints should be
applied.comparator - a comparison function representing the total order to
apply to propositions on the right-hand-side of the reference when using
the index parameter. If null and an
index is specified, the total order is unspecified.index - the position of the proposition on the right-hand-side of
the reference to traverse to, using the total order specified by the
comparator argument. An index of -1 means that
all propositions on the right-hand-side will be traversed to.public Reference(String[] referenceNames, String[] propositionIds, PropertyConstraint[] constraints, Comparator<Proposition> comparator, int fromIndex, int toIndex)
referenceNames - a String[] of reference names. An empty *
or null array specifies that all references should be
traversed.propositionIds - a String[] of proposition ids. An empty *
or null array specifies that all propositions on the
right-hand-side of a reference should be used.constraints - a PropertyConstraint[] of property constraints
on the propositions on the right-hand-side of a reference. An empty * or null array specifies that no constraints should be
applied.comparator - a comparison function representing the total order to
apply to propositions on the right-hand-side of the reference when using
the index parameter. If null and an
index is specified, the total order is unspecified.fromIndex - the lower-bound on the positions of the propositions on
the right-hand-side of the reference to traverse to, inclusive, using the
total order specified by the comparator argument. An index
of -1 means that all propositions on the right-hand-side
will be traversed to.toIndex - the upper-bound on the positions of the propositions on
the right-hand-side of the reference to traverse to, exclusive, using the
total order specified by the comparator argument. An index
of -1 means that all propositions on the right-hand-side
will be traversed to.public Reference(String referenceName)
referenceName - a reference name String A value of
null specifies that all references should be traversed.public Reference(String referenceName, String[] propositionIds)
referenceName - a reference name String A value of
null specifies that all references should be traversed.propositionIds - a String[] of proposition ids. An empty *
or null array specifies that all propositions on the
right-hand-side of the reference should be used.public Reference(String referenceName, String[] propositionIds, PropertyConstraint[] constraints)
referenceName - a reference name String A value of
null specifies that all references should be traversed.propositionIds - a String[] of proposition ids. An empty *
or null array specifies that all propositions on the
right-hand-side of a reference should be used.constraints - a PropertyConstraint[] of property constraints
on the propositions on the right-hand-side of a reference. An empty or
null array specifies that no constraints should be applied.public Reference(String referenceName, String[] propositionIds, PropertyConstraint[] constraints, Comparator<Proposition> comparator, int index)
referenceName - a reference name String A value of
null specifies that all references should be traversed.propositionIds - a String[] of proposition ids. An empty *
or null array specifies that all propositions on the
right-hand-side of a reference should be used.constraints - a PropertyConstraint[] of property constraints
on the propositions on the right-hand-side of a reference. An empty * or null array specifies that no constraints should be
applied.comparator - a comparison function representing the total order to
apply to propositions on the right-hand-side of the reference when using
the index parameter. If null and an
index is specified, the total order is unspecified.index - the position of the proposition on the right-hand-side of
the reference to traverse to, using the total order specified by the
comparator argument. An index of -1 means that
all propositions on the right-hand-side will be traversed to.public Reference(String referenceName, String[] propositionIds, PropertyConstraint[] constraints, Comparator<Proposition> comparator, int fromIndex, int toIndex)
referenceName - a reference name String A value of
null specifies that all references should be traversed.propositionIds - a String[] of proposition ids. An empty *
or null array specifies that all propositions on the
right-hand-side of a reference should be used.constraints - a PropertyConstraint[] of property constraints
on the propositions on the right-hand-side of a reference. An empty * or null array specifies that no constraints should be
applied.comparator - a comparison function representing the total order to
apply to propositions on the right-hand-side of the reference when using
the index parameter. If null and an
index is specified, the total order is unspecified.fromIndex - the lower-bound on the positions of the propositions on
the right-hand-side of the reference to traverse to, inclusive, using the
ordering specified by the comparator argument. An index * of -1 means that all propositions on the
right-hand-side will be traversed to.toIndex - the upper-bound on the positions of the propositions on
the right-hand-side of the reference to traverse to, exclusive, using the
ordering specified by the comparator argument. An index * of -1 means that all propositions on the
right-hand-side will be traversed to.public String[] getReferenceNames()
String[] of reference names.public String[] getInferredPropositionIds(KnowledgeSource knowledgeSource, String[] inPropIds) throws KnowledgeSourceReadException
LinkgetInferredPropositionIds in class LinkinPropIds - the proposition ids inferred from the previous link, or
the row proposition id if this is the first link.Strings.KnowledgeSourceReadExceptionCopyright © 2012–2018 Emory University. All rights reserved.