org.semanticdesktop.aperture.datasource.config
Class UrlPattern

java.lang.Object
  extended by org.semanticdesktop.aperture.datasource.config.UrlPattern
Direct Known Subclasses:
RegExpPattern, SubstringPattern

public abstract class UrlPattern
extends Object

A UrlPattern defines a boolean pattern test on a URL.


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

Constructor Detail

UrlPattern

public UrlPattern()
Method Detail

matches

public abstract boolean matches(String url)
Apply the pattern matching test on a URL.

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

getStatements

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

Parameters:
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.


Copyright © 2010 Aperture Development Team. All Rights Reserved.