org.openxri.urimapper.impl
Class SingleNamespaceURIMapper
java.lang.Object
org.openxri.config.impl.AbstractComponent
org.openxri.urimapper.impl.RegexURIMapper
org.openxri.urimapper.impl.SingleNamespaceURIMapper
- All Implemented Interfaces:
- java.io.Serializable, Component, URIMapper
public class SingleNamespaceURIMapper
- extends RegexURIMapper
An URI mapper assuming a fixed namespace (root authority). Useful for a resolver whose
store handles only a single namespace. In that case it is not necessary to have it in the URI.
This URI mapper expects a parameter with key "namespace" in the server configuration.
- Author:
- =peacekeeper
- See Also:
- Serialized Form
Method Summary |
void |
completeURI(java.lang.StringBuffer uri,
java.lang.String namespace)
Appends the needed namespace to the provided URI for
resolution to this server |
java.lang.String |
getNamespace()
|
void |
init()
A server component is constructed by the ComponentRegistry by passing a Properties object
to its constructor and then calling this init() method. |
URIMapperResult |
parseRequest(URIMapperRequest request)
Parses an incoming request (containing of path and query part of a URI) |
void |
setNamespace(java.lang.String namespace)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONFIG_NAMESPACE_KEY
public static final java.lang.String CONFIG_NAMESPACE_KEY
- See Also:
- Constant Field Values
namespacePattern
public static final java.util.regex.Pattern namespacePattern
queryPattern
public static final java.util.regex.Pattern queryPattern
SingleNamespaceURIMapper
public SingleNamespaceURIMapper(java.util.Properties properties)
init
public void init()
- Description copied from interface:
Component
- A server component is constructed by the ComponentRegistry by passing a Properties object
to its constructor and then calling this init() method.
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
- Overrides:
parseRequest
in class RegexURIMapper
- Parameters:
request
- The path and query of the HTTP request.
completeURI
public void completeURI(java.lang.StringBuffer uri,
java.lang.String namespace)
- Description copied from interface:
URIMapper
- Appends the needed namespace to the provided URI for
resolution to this server
setNamespace
public void setNamespace(java.lang.String namespace)
getNamespace
public java.lang.String getNamespace()
Copyright © 2005-2012. All Rights Reserved.