|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.infoset.impl.basic.AbstractLocator net.ontopia.infoset.impl.basic.URILocator
public class URILocator
PUBLIC: A Uniform Resource Identifier locator. Only URI locators should be used with this locator class. The notation is 'URI'.
The address is always normalized by the constructor. The address given to the constructor must be absolute.
Field Summary | |
---|---|
protected java.lang.String |
address
|
protected short |
authorityEnd
|
protected short |
fragmentStart
|
protected short |
lastSlash
|
protected short |
schemeEnd
|
Constructor Summary | |
---|---|
|
URILocator()
INTERNAL: No-argument constructor used by serialization. |
|
URILocator(java.io.File file)
PUBLIC: Creates a URILocator containing a file URL referring to the file represented by the File object. |
|
URILocator(java.lang.String address)
PUBLIC: Creates a URILocator representing the URI given. |
protected |
URILocator(java.lang.String normalized,
short schemeEnd,
short authorityEnd,
short lastSlash,
short fragmentStart)
INTERNAL: Special constructor used when resolving a URI relative to a base URI. |
|
URILocator(java.net.URL url)
PUBLIC: Creates a URILocator representing the URL given. |
Method Summary | |
---|---|
static URILocator |
create(java.lang.String uriAddress)
INTERNAL: Parses the URI and returns an instance of URILocator if the URI is valid. |
boolean |
equals(java.lang.Object object)
PUBLIC: Two LocatorIFs are considered equal if they have the same address and notation properties. |
java.lang.String |
getAddress()
PUBLIC: Returns the locator address in absolute and normalized form. |
java.lang.String |
getExternalForm()
PUBLIC: Returns the address of the locator in external form; that is, with special characters that need to be escaped escaped using the escape syntax of the locator notation. |
java.lang.String |
getNotation()
PUBLIC: Gets the locator notation. |
java.net.URL |
getURL()
Deprecated. Because not all URIs can be represented as URL objects. |
int |
hashCode()
PUBLIC: Returns the hashcode of the address property. |
protected java.lang.String |
normalize(java.lang.String address)
|
int |
parseDirectoryPart(char[] uri,
int ix,
int length)
|
void |
readExternal(java.io.ObjectInput in)
|
LocatorIF |
resolveAbsolute(java.lang.String rel)
PUBLIC: Given a locator address string that is relative to this locator, return an absolute locator. |
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class net.ontopia.infoset.impl.basic.AbstractLocator |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String address
protected short schemeEnd
protected short authorityEnd
protected short lastSlash
protected short fragmentStart
Constructor Detail |
---|
public URILocator()
public URILocator(java.lang.String address) throws java.net.MalformedURLException
java.net.MalformedURLException
public URILocator(java.net.URL url) throws java.net.MalformedURLException
java.net.MalformedURLException
public URILocator(java.io.File file)
protected URILocator(java.lang.String normalized, short schemeEnd, short authorityEnd, short lastSlash, short fragmentStart)
Method Detail |
---|
protected java.lang.String normalize(java.lang.String address) throws java.net.MalformedURLException
java.net.MalformedURLException
public java.net.URL getURL() throws java.net.MalformedURLException
java.net.MalformedURLException
public java.lang.String getNotation()
LocatorIF
Note that only the URI notation is supported in release OKS 4.0 and newer.
getNotation
in interface LocatorIF
public java.lang.String getAddress()
LocatorIF
getAddress
in interface LocatorIF
public LocatorIF resolveAbsolute(java.lang.String rel)
LocatorIF
resolveAbsolute
in interface LocatorIF
public java.lang.String getExternalForm()
LocatorIF
getExternalForm
in interface LocatorIF
public int parseDirectoryPart(char[] uri, int ix, int length) throws java.net.MalformedURLException
java.net.MalformedURLException
public int hashCode()
AbstractLocator
hashCode
in class AbstractLocator
public boolean equals(java.lang.Object object)
AbstractLocator
equals
in class AbstractLocator
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public static URILocator create(java.lang.String uriAddress)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |