|
TopoWeb Commons API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.topoweb.net.OriTranslator
Translates some standard URIs to Ori instances and viceversa.
The following relation is supposed to hold:
For any OriTranslator trans and any Ori
ori, the statement
ori.equals(trans.toOri(trans.toUri(ori)))
true or throws an
IllegalArgumentException.
| Nested Class Summary | |
static class |
OriTranslator.HierarchicalSchemeHandler
Translates hierarchical URIs to Oris, and viceversa. |
static class |
OriTranslator.MailtoSchemeHandler
Translates mailto URLs to Oris, and viceversa. |
static class |
OriTranslator.NewsSchemeHandler
Translates news URLs to Oris, and viceversa. |
static class |
OriTranslator.SchemeHandler
ORI / URI translator that handles a specific URI scheme. |
| Constructor Summary | |
OriTranslator()
|
|
| Method Summary | |
protected OriTranslator.SchemeHandler |
getSchemeHandler(java.lang.String scheme)
Returns the scheme handler for the given scheme. |
Ori |
toOri(java.net.URI uri)
Converts and returns the given URI as an Ori instance. |
Ori |
toOri(java.net.URI uri,
java.lang.StringBuffer work)
Converts and returns the given URI as an Ori instance. |
java.net.URI |
toUri(Ori ori)
Converts and returns the given Ori as a URI instance. |
java.net.URI |
toUri(Ori ori,
java.lang.StringBuffer work)
Converts 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 |
public OriTranslator()
| Method Detail |
public Ori toOri(java.net.URI uri)
throws java.lang.IllegalArgumentException
Ori instance.
uri - the URI
java.lang.IllegalArgumentException - if the URI scheme is not handled by this
translator; if uri is relative
public Ori toOri(java.net.URI uri,
java.lang.StringBuffer work)
throws java.lang.IllegalArgumentException
Ori instance.
uri - the URIwork - the work buffer (may be null)
java.lang.IllegalArgumentException - if the URI scheme is not handled by this
translator; if uri is relative
public java.net.URI toUri(Ori ori)
throws java.lang.IllegalArgumentException
Ori as a URI instance.
ori - the Ori
java.lang.IllegalArgumentException - if ori's scheme is not handled by this
translator; if uri is relative
public java.net.URI toUri(Ori ori,
java.lang.StringBuffer work)
throws java.lang.IllegalArgumentException
Ori as a URI instance.
ori - the Oriwork - the work buffer (may be null)
java.lang.IllegalArgumentException - if ori's scheme is not handled by this
translator; if uri is relativeprotected OriTranslator.SchemeHandler getSchemeHandler(java.lang.String scheme)
scheme.
The string representation of a URI's and Ori's scheme is taken
to be the same.
scheme - the scheme
|
TopoWeb Commons API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||