- All Implemented Interfaces:
- public class DAMLSelector
- extends SelectorImpl
An extension to the standard Jena selector for querying models, which respects the
equivalence that DAML can assert between values. That is, for example, this selector will
match a statement:
with a selector:
myns:ian isCalled "ian".
if it is known that
new DAMLSelector( resIan, model.getProperty( myns + "sAppel" );
myns:ian daml:samePropertyAs myns:sAppel.
Equivalences between classes, properties, instances (individuals) and arbitrary
daml:equivalentTo) are respected. This does inevitably add a significant
overhead to accessing the values from the model, but is necessary for correctly
processing DAML models.
Note that the current release of Jena does not permit us to correctly process
equivalence among resources efficiently. Therefore, as a performance hack,
DAMLModel.setUseEquivalence(boolean) has been added to the
model to allow this behaviour to be turned off under user control. By default,
equivalence will be tested.
- CVS info: $Id: DAMLSelector.java,v 1.1 2001/09/24 17:02:43 ijd Exp $
- Ian Dickinson, HP Labs (email)
Answer true if a statement should be included in a selection.
|Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public DAMLSelector(Resource subject,
- Create a DAML selector. Note due to problems with the underlying store.listProperties()
implementation, this selector iterates over all statements in the model,
by setting the normal selector subject, predicate and object to null. This
is ridiculously inefficient, but necessary. TODO: fix this, once Jena has
subject - The subject of the statement, or null.
predicate - The predicate of the statement, or null.
object - The object of the statement, or null.
public boolean test(Statement stmt)
- Answer true if a statement should be included in a selection. This method
tests whether the supplied statement satisfies the subject, predicate and
object constraints of the selector, including testing whether other members
of known equivalence classes of the subject, predicate or object will
satisfy the constraints.
test in class
stmt - the statement to be tested
- true if the statement satisfies the subject, object
and predicate constraints and the selects constraint.
Copyright © 2001 Hewlett-Packard. All Rights Reserved.