org.openxri.urimapper.impl
Class RegexURIMapper
java.lang.Object
org.openxri.config.impl.AbstractComponent
org.openxri.urimapper.impl.RegexURIMapper
- All Implemented Interfaces:
- java.io.Serializable, Component, URIMapper
- Direct Known Subclasses:
- FolderURIMapper, SingleNamespaceURIMapper
public abstract class RegexURIMapper
- extends AbstractComponent
- implements URIMapper
This abstract class can parse an URI using regular expressions for the root namespace (e.g. @free)
and the query (*earth*moon). Subclasses need to provide those regular expressions in the constructor
and implement the completeURI method of the URIMapper interface.
- Author:
- =peacekeeper
- See Also:
- Serialized Form
Constructor Summary |
protected |
RegexURIMapper(java.util.Properties properties,
java.util.regex.Pattern namespacePattern,
java.util.regex.Pattern queryPattern)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
namespacePattern
protected java.util.regex.Pattern namespacePattern
queryPattern
protected java.util.regex.Pattern queryPattern
RegexURIMapper
protected RegexURIMapper(java.util.Properties properties,
java.util.regex.Pattern namespacePattern,
java.util.regex.Pattern queryPattern)
parseRequest
public URIMapperResult parseRequest(URIMapperRequest request)
- Description copied from interface:
URIMapper
- Parses an incoming request (containing of path and query part of a URI)
- Specified by:
parseRequest
in interface URIMapper
- Parameters:
request
- The path and query of the HTTP request.
getNamespacePattern
public java.util.regex.Pattern getNamespacePattern()
setNamespacePattern
public void setNamespacePattern(java.util.regex.Pattern nsPattern)
getQueryPattern
public java.util.regex.Pattern getQueryPattern()
setQueryPattern
public void setQueryPattern(java.util.regex.Pattern queryPattern)
Copyright © 2005-2012. All Rights Reserved.