org.weblab_project.core.helper.impl
Class Filter

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

public class Filter
extends java.lang.Object


Field Summary
protected  java.util.List<Rule> rules
           
 
Constructor Summary
Filter()
          Creates a filter.
 
Method Summary
 void addPOFilter(java.lang.String predicat, java.lang.String object)
          Add a filter on an association predicat/object
 void addSOFilter(java.lang.String subject, java.lang.String object)
          Add a filter on an association subject/object
 void addSPFilter(java.lang.String subject, java.lang.String predicat)
          Add a filter on an association subject/predicat
protected  boolean matches(Rule rule, java.lang.String subject, java.lang.String predicate, java.lang.String object)
           
protected  boolean matches(Rule rule, com.hp.hpl.jena.graph.Triple t)
           
protected  boolean matches(Rule rule, WTriple wt)
           
 boolean matches(WTriple wt)
          Returns true if the WTriple matches at least 1 rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rules

protected java.util.List<Rule> rules
Constructor Detail

Filter

public Filter()
Creates a filter. This filter is an discard all filter. You must add rules to select which triples are interessting

Method Detail

addSPFilter

public void addSPFilter(java.lang.String subject,
                        java.lang.String predicat)
Add a filter on an association subject/predicat

Parameters:
subject -
predicat -

addSOFilter

public void addSOFilter(java.lang.String subject,
                        java.lang.String object)
Add a filter on an association subject/object

Parameters:
subject -
object -

addPOFilter

public void addPOFilter(java.lang.String predicat,
                        java.lang.String object)
Add a filter on an association predicat/object

Parameters:
predicat -
object -

matches

public boolean matches(WTriple wt)
Returns true if the WTriple matches at least 1 rule.

Parameters:
wt - a WTriple
Returns:
true if the WTriple matches at least 1 rule.

matches

protected boolean matches(Rule rule,
                          com.hp.hpl.jena.graph.Triple t)

matches

protected boolean matches(Rule rule,
                          WTriple wt)

matches

protected boolean matches(Rule rule,
                          java.lang.String subject,
                          java.lang.String predicate,
                          java.lang.String object)


Copyright © 2004-2009. All Rights Reserved.