Package org.metafacture.triples
Class TripleFilter
- java.lang.Object
-
- org.metafacture.framework.helpers.DefaultSender<R>
-
- org.metafacture.framework.helpers.DefaultObjectPipe<org.metafacture.framework.objects.Triple,org.metafacture.framework.ObjectReceiver<org.metafacture.framework.objects.Triple>>
-
- org.metafacture.triples.TripleFilter
-
- All Implemented Interfaces:
org.metafacture.framework.LifeCycle,org.metafacture.framework.ObjectPipe<org.metafacture.framework.objects.Triple,org.metafacture.framework.ObjectReceiver<org.metafacture.framework.objects.Triple>>,org.metafacture.framework.ObjectReceiver<org.metafacture.framework.objects.Triple>,org.metafacture.framework.Receiver,org.metafacture.framework.Sender<org.metafacture.framework.ObjectReceiver<org.metafacture.framework.objects.Triple>>
@Description("Filters triple. The patterns for subject, predicate and object are disjunctive.") @In(org.metafacture.framework.objects.Triple.class) @Out(org.metafacture.framework.objects.Triple.class) @FluxCommand("filter-triples") public final class TripleFilter extends org.metafacture.framework.helpers.DefaultObjectPipe<org.metafacture.framework.objects.Triple,org.metafacture.framework.ObjectReceiver<org.metafacture.framework.objects.Triple>>Filters triples. The patterns for subject, predicate and object are disjunctive.
-
-
Constructor Summary
Constructors Constructor Description TripleFilter()Creates an instance ofTripleFilter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetObjectPattern()Gets the pattern of the object filter.java.lang.StringgetPredicatePattern()Gets the pattern of the predicate filter.java.lang.StringgetSubjectPattern()Gets the pattern of the subject filter.booleanisPassMatches()Checks whether matches passes.voidprocess(org.metafacture.framework.objects.Triple obj)voidsetObjectPattern(java.lang.String pattern)Sets a pattern to filter objects.voidsetPassMatches(boolean passMatches)Flags whether matches should pass.voidsetPredicatePattern(java.lang.String pattern)Gets the pattern of the predicate filter.voidsetSubjectPattern(java.lang.String pattern)Gets the pattern of the subject filter.-
Methods inherited from class org.metafacture.framework.helpers.DefaultSender
closeStream, getReceiver, isClosed, onCloseStream, onResetStream, onSetReceiver, resetStream, setReceiver
-
-
-
-
Constructor Detail
-
TripleFilter
public TripleFilter()
Creates an instance ofTripleFilter.
-
-
Method Detail
-
getSubjectPattern
public java.lang.String getSubjectPattern()
Gets the pattern of the subject filter.- Returns:
- the pattern of the subject filter
-
setSubjectPattern
public void setSubjectPattern(java.lang.String pattern)
Gets the pattern of the subject filter.- Parameters:
pattern- the pattern of the subject filter
-
getPredicatePattern
public java.lang.String getPredicatePattern()
Gets the pattern of the predicate filter.- Returns:
- the pattern of the predicate filter
-
setPredicatePattern
public void setPredicatePattern(java.lang.String pattern)
Gets the pattern of the predicate filter.- Parameters:
pattern- the pattern of the predicate filter
-
getObjectPattern
public java.lang.String getObjectPattern()
Gets the pattern of the object filter.- Returns:
- the pattern of the object filter
-
setObjectPattern
public void setObjectPattern(java.lang.String pattern)
Sets a pattern to filter objects.- Parameters:
pattern- the pattern
-
isPassMatches
public boolean isPassMatches()
Checks whether matches passes.- Returns:
- true if matches should pass
-
setPassMatches
public void setPassMatches(boolean passMatches)
Flags whether matches should pass.- Parameters:
passMatches- true if matches should pass, otherwise matches don't pass
-
process
public void process(org.metafacture.framework.objects.Triple obj)
- Specified by:
processin interfaceorg.metafacture.framework.ObjectReceiver<org.metafacture.framework.objects.Triple>- Overrides:
processin classorg.metafacture.framework.helpers.DefaultObjectPipe<org.metafacture.framework.objects.Triple,org.metafacture.framework.ObjectReceiver<org.metafacture.framework.objects.Triple>>
-
-