org.semanticdesktop.aperture.datasource.config
Class SubstringPattern

java.lang.Object
  extended by org.semanticdesktop.aperture.datasource.config.UrlPattern
      extended by org.semanticdesktop.aperture.datasource.config.SubstringPattern

public class SubstringPattern
extends UrlPattern

A UrlPattern implementation using a substring test evaluation strategy.


Constructor Summary
SubstringPattern(String substring, SubstringCondition condition)
           
 
Method Summary
 boolean equals(Object obj)
           
 SubstringCondition getCondition()
           
 Collection<Statement> getStatements(Model model, Resource subject)
          Return a Collection of RDF Statements modeling the contents of this UrlPattern.
 String getSubstring()
           
 int hashCode()
           
 boolean matches(String url)
          Apply the pattern matching test on a URL.
 void setCondition(SubstringCondition condition)
           
 void setSubstring(String substring)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubstringPattern

public SubstringPattern(String substring,
                        SubstringCondition condition)
Method Detail

getSubstring

public String getSubstring()

setSubstring

public void setSubstring(String substring)

getCondition

public SubstringCondition getCondition()

setCondition

public void setCondition(SubstringCondition condition)

matches

public boolean matches(String url)
Description copied from class: UrlPattern
Apply the pattern matching test on a URL.

Specified by:
matches in class UrlPattern
Parameters:
url - The URL to test the pattern on.
Returns:
'true' when the URL matches this UrlPattern, 'false' otherwise.

getStatements

public Collection<Statement> getStatements(Model model,
                                           Resource subject)
Description copied from class: UrlPattern
Return a Collection of RDF Statements modeling the contents of this UrlPattern.

Specified by:
getStatements in class UrlPattern
subject - The resource to use as the subject of the statements, as a UrlPattern has no kind of ID of its own.
Returns:
A Collection of Statement instances.

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.