Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`protected java.util.regex.Pattern` | `namespacePattern`
`protected java.util.regex.Pattern` | `queryPattern`

Fields inherited from class org.openxri.config.impl.AbstractComponent
`properties`

Constructor Summary
`protected` | `RegexURIMapper(java.util.Properties properties, java.util.regex.Pattern namespacePattern, java.util.regex.Pattern queryPattern)`

Method Summary
`java.util.regex.Pattern` | `getNamespacePattern()`
`java.util.regex.Pattern` | `getQueryPattern()`
`URIMapperResult` | `parseRequest(URIMapperRequest request)` Parses an incoming request (containing of path and query part of a URI)
`void` | `setNamespacePattern(java.util.regex.Pattern nsPattern)`
`void` | `setQueryPattern(java.util.regex.Pattern queryPattern)`

Methods inherited from class org.openxri.config.impl.AbstractComponent
`getProperties`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.openxri.urimapper.URIMapper
`completeURI`

Methods inherited from interface org.openxri.config.Component
`getProperties, init`

Field Detail

### namespacePattern

    protected java.util.regex.Pattern namespacePattern

### queryPattern

    protected java.util.regex.Pattern queryPattern

Constructor Detail

### RegexURIMapper

    protected RegexURIMapper(java.util.Properties properties,
                             java.util.regex.Pattern namespacePattern,
                             java.util.regex.Pattern queryPattern)

Method Detail

### 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2009. All Rights Reserved.