TopoWeb Commons API

org.topoweb.net
Class OriTranslator.HierarchicalSchemeHandler

java.lang.Object
  |
  +--org.topoweb.net.OriTranslator.SchemeHandler
        |
        +--org.topoweb.net.OriTranslator.HierarchicalSchemeHandler
Enclosing class:
OriTranslator

public static class OriTranslator.HierarchicalSchemeHandler
extends OriTranslator.SchemeHandler

Translates hierarchical URIs to Oris, and viceversa.


Constructor Summary
OriTranslator.HierarchicalSchemeHandler(java.lang.String scheme, int defaultPort)
          Creates an instance for the specified scheme and default port.
 
Method Summary
 Ori toOri(java.net.URI uri, java.lang.StringBuffer work)
          Translates and returns the given URI to an Ori instance.
 java.net.URI toUri(Ori ori, java.lang.StringBuffer work)
          Translates and returns the given Ori as a URI instance.
 
Methods inherited from class org.topoweb.net.OriTranslator.SchemeHandler
getScheme
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OriTranslator.HierarchicalSchemeHandler

public OriTranslator.HierarchicalSchemeHandler(java.lang.String scheme,
                                               int defaultPort)
Creates an instance for the specified scheme and default port.

Parameters:
scheme - the scheme for the class of URIs the instance handles
defaultPort - the default port for the class of URIs the instance handles
Method Detail

toOri

public Ori toOri(java.net.URI uri,
                 java.lang.StringBuffer work)
          throws java.lang.IllegalArgumentException
Description copied from class: OriTranslator.SchemeHandler
Translates and returns the given URI to an Ori instance. The URI is assumed to be in normal form, and the work buffer is assumed to be non-null and with zero length.

Specified by:
toOri in class OriTranslator.SchemeHandler
Parameters:
uri - the URI to be translated
work - the work buffer
Returns:
an Ori instance
java.lang.IllegalArgumentException

toUri

public java.net.URI toUri(Ori ori,
                          java.lang.StringBuffer work)
                   throws java.lang.IllegalArgumentException
Description copied from class: OriTranslator.SchemeHandler
Translates and returns the given Ori as a URI instance. The work buffer is assumed to be non-null and with zero length.

Specified by:
toUri in class OriTranslator.SchemeHandler
Parameters:
ori - the Ori to be translated
work - the work buffer
Returns:
a URI instance
java.lang.IllegalArgumentException

TopoWeb Commons API

Copyright (C) 2002 Babak Farhang

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.