org.semanticdesktop.aperture.datasource.config
Class RegExpPattern

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

public class RegExpPattern
extends UrlPattern

A UrlPattern implementation using a regular expression evaluation strategy.


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

Constructor Detail

RegExpPattern

public RegExpPattern(Pattern pattern)

RegExpPattern

public RegExpPattern(String pattern)
Method Detail

getPattern

public Pattern getPattern()

getPatternString

public String getPatternString()

setPattern

public void setPattern(Pattern pattern)

setPattern

public void setPattern(String pattern)

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.