org.semanticdesktop.aperture.datasource.config
Class SubstringCondition

java.lang.Object
  extended by org.semanticdesktop.aperture.datasource.config.SubstringCondition
Direct Known Subclasses:
SubstringCondition.Contains, SubstringCondition.DoesNotContain, SubstringCondition.EndsWith, SubstringCondition.StartsWith

public abstract class SubstringCondition
extends Object

Instances of this class indicate how a substring test needs to be performed and are able to evaluate the test. Subclasses embody a particular kind of substring test, e.g. "starts with", "ends with" or "contains".


Nested Class Summary
static class SubstringCondition.Contains
           
static class SubstringCondition.DoesNotContain
           
static class SubstringCondition.EndsWith
           
static class SubstringCondition.StartsWith
           
 
Field Summary
static SubstringCondition.Contains CONTAINS
           
static SubstringCondition.DoesNotContain DOES_NOT_CONTAIN
           
static SubstringCondition.EndsWith ENDS_WITH
           
static SubstringCondition.StartsWith STARTS_WITH
           
 
Constructor Summary
SubstringCondition()
           
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
abstract  boolean test(String string, String substring)
          Tests the substring condition embodied by the implementing class on a String.
abstract  Node toNode()
          Return the Value used to encode this SubstringCondition in an RDF model.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STARTS_WITH

public static final SubstringCondition.StartsWith STARTS_WITH

ENDS_WITH

public static final SubstringCondition.EndsWith ENDS_WITH

CONTAINS

public static final SubstringCondition.Contains CONTAINS

DOES_NOT_CONTAIN

public static final SubstringCondition.DoesNotContain DOES_NOT_CONTAIN
Constructor Detail

SubstringCondition

public SubstringCondition()
Method Detail

test

public abstract boolean test(String string,
                             String substring)
Tests the substring condition embodied by the implementing class on a String.

Parameters:
string - The String to test the substring condition on.
substring - The String to test the substring condition with.
Returns:
'true' when the string contains the substring in the way embodied by the implementing class, 'false' otherwise.

toNode

public abstract Node toNode()
Return the Value used to encode this SubstringCondition in an RDF model.


equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2010 Aperture Development Team. All Rights Reserved.