TopoWeb Commons API

org.topoweb.net
Class OriTranslator.NewsSchemeHandler

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

public static class OriTranslator.NewsSchemeHandler
extends OriTranslator.SchemeHandler

Translates news URLs to Oris, and viceversa.

Implementation Note

news URLs come in both the opaque and hiearchical forms. We only handle the opaque form.


Constructor Summary
OriTranslator.NewsSchemeHandler()
          Creates a new instance with the news scheme.
 
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.NewsSchemeHandler

public OriTranslator.NewsSchemeHandler()
Creates a new instance with the news scheme.

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.