org.weblab_project.core.helper.impl
Class RDFSelectorFactory

java.lang.Object
  extended by org.weblab_project.core.helper.impl.RDFSelectorFactory

public final class RDFSelectorFactory
extends java.lang.Object


Method Summary
static RDFRulesSelector getRuleSelector()
          Get a searcher in triples in RDF for literals.
static RDFRulesSelector getRuleSelector(boolean supportNullData, java.lang.String... uris)
           
static RDFSelector getSelector()
          Get a searcher in triples in RDF for literals.
static RDFSelector getSelector(boolean supportNullData, java.lang.String... uris)
          Create a rdf selector with robustness to bad or null annotations with a list of uris.
static RDFSelector getSelector(java.lang.String... uris)
          Create a rdf selector with a list of uris.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSelector

public static RDFSelector getSelector(java.lang.String... uris)
Create a rdf selector with a list of uris. If you construct an RDFSelector with the uri http://www.example.com in parameter, then if you search for "http://www.example.com#Object" as the object of the triple It will seek for the object as an URI istance of a literal

Parameters:
uris - a list of uri
Returns:
a RDFSelector

getSelector

public static RDFSelector getSelector(boolean supportNullData,
                                      java.lang.String... uris)
Create a rdf selector with robustness to bad or null annotations with a list of uris. Robustness to bad annotation is desactivated by default. If you construct an RDFSelector with the uri http://www.example.com in parameter, then if you search for "http://www.example.com#Object" as the object of the triple It will seek for the object as an URI istance of a literal

Parameters:
supportNullData - if true null data annotation are ignored else an error is thrown.
uris - a list of uri
Returns:
a RDFSelector

getSelector

public static RDFSelector getSelector()
Get a searcher in triples in RDF for literals. If you want to select objects as uri, see getSelector(boolean supportNullData, String... uris).

Returns:
a RDFSelector searching on literals

getRuleSelector

public static RDFRulesSelector getRuleSelector(boolean supportNullData,
                                               java.lang.String... uris)

getRuleSelector

public static RDFRulesSelector getRuleSelector()
Get a searcher in triples in RDF for literals.
You can add rules on tuples:

You can also use regular expression in rules. For instance:
RDFRulesSelector rrs = RDFSelectorFactory.getRuleSelector();
rss.addPORule("http://www.weblab-project.org/entity/.*","(.|\\s)*");
List results = rss.findIn(myResource);

If you want to select objects as uri, see getRuleSelector(boolean supportNullData, String... uris).

Returns:
a RDFSelector searching on literals


Copyright © 2004-2009. All Rights Reserved.