TopoWeb Commons API

org.topoweb.net
Class OriTranslator.SchemeHandler

java.lang.Object
  |
  +--org.topoweb.net.OriTranslator.SchemeHandler
Direct Known Subclasses:
OriTranslator.HierarchicalSchemeHandler, OriTranslator.MailtoSchemeHandler, OriTranslator.NewsSchemeHandler
Enclosing class:
OriTranslator

public abstract static class OriTranslator.SchemeHandler
extends java.lang.Object

ORI / URI translator that handles a specific URI scheme.


Constructor Summary
protected OriTranslator.SchemeHandler(java.lang.String scheme)
          Constructs a new instance with the specified scheme.
 
Method Summary
 java.lang.String getScheme()
          Returns the scheme passed in at construction time.
abstract  Ori toOri(java.net.URI uri, java.lang.StringBuffer work)
          Translates and returns the given URI to an Ori instance.
abstract  java.net.URI toUri(Ori ori, java.lang.StringBuffer work)
          Translates and returns the given Ori as a URI instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OriTranslator.SchemeHandler

protected OriTranslator.SchemeHandler(java.lang.String scheme)
Constructs a new instance with the specified scheme.

Parameters:
scheme - the scheme
See Also:
getScheme()
Method Detail

getScheme

public java.lang.String getScheme()
Returns the scheme passed in at construction time.

Returns:
the scheme

toOri

public abstract Ori toOri(java.net.URI uri,
                          java.lang.StringBuffer work)
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.

Parameters:
uri - the URI to be translated
work - the work buffer
Returns:
an Ori instance

toUri

public abstract java.net.URI toUri(Ori ori,
                                   java.lang.StringBuffer work)
Translates and returns the given Ori as a URI instance. The work buffer is assumed to be non-null and with zero length.

Parameters:
ori - the Ori to be translated
work - the work buffer
Returns:
a URI instance

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.