|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RDFSelector
Selection functions for triples retrieval and WebLab model association.
Method Summary | |
---|---|
java.util.List<WTriple> |
findInResource(org.weblab_project.core.model.Resource resource,
Filter filter)
Find Triplets Subject, Predicate, Object) in the resource according to a filter. |
java.util.List<WTriple> |
findInResource(org.weblab_project.core.model.Resource resource,
java.lang.String subject,
java.lang.String predicate,
java.lang.String object)
Find Triplet (Subject, Predicate, Object) in the resource and its sub elements (Segments, Annotations, sub-MediaUnit ...). |
java.util.List<WTriple> |
findInResource(org.weblab_project.core.model.Resource resource,
java.lang.String subject,
java.lang.String predicate,
java.lang.String object,
boolean reif)
Use this function to avoid to aggregate reified annotations If the resource is null, then a NullPointerException is thrown. |
void |
limitToFirstLevelAnnotation(boolean limit)
If limit is true, then all the searches made with this RDFSelector will stop after the first level of annotation. |
WTripleMap |
searchFor(org.weblab_project.core.model.Resource resource,
java.lang.String... predicates)
Build a collection of objects with given properties. |
Method Detail |
---|
java.util.List<WTriple> findInResource(org.weblab_project.core.model.Resource resource, Filter filter)
resource
- a resourcegc
- a filter (can be null)
java.util.List<WTriple> findInResource(org.weblab_project.core.model.Resource resource, java.lang.String subject, java.lang.String predicate, java.lang.String object)
List<WTriple> results: findInResource(myResource, null, "http://www.weblab-project.org/gld-country", null);
If the resource is null, then a NullPointerException is thrown.
subject
- the subject that should match in the triplet (can be null)predicate
- the predicate that should match in the triplet (can be null)object
- the object that should match in the triplet (can be null)
java.util.List<WTriple> findInResource(org.weblab_project.core.model.Resource resource, java.lang.String subject, java.lang.String predicate, java.lang.String object, boolean reif)
resource
- a resourcesubject
- the subject that should match in the triplet (can be null)predicate
- the predicate that should match in the triplet (can be null)object
- the object that should match in the triplet (can be null)reif
- if true, reified triple will not be aggregated
WTripleMap searchFor(org.weblab_project.core.model.Resource resource, java.lang.String... predicates)
{
subject0uri => { NAME => nameObject0, DATE => dateObject0, LOCATION => locationObject0 },
subject1uri => { NAME => nameObject1, DATE => dateObject1, LOCATION => locationObject1 },
subject2uri => { NAME => nameObject2, DATE => dateObject2, LOCATION => locationObject2 }
}
It can access any EVENT in O(1) and any predicate value in O(1).
resource
- an annotated Resourcepredicates
- the list of searched predicates
void limitToFirstLevelAnnotation(boolean limit)
limit
- if true, it will only search annotation on resource else it will search until the leaf annotations
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |