net.ontopia.infoset.impl.basic
Class URIFragmentLocator

java.lang.Object
  extended by net.ontopia.infoset.impl.basic.AbstractLocator
      extended by net.ontopia.infoset.impl.basic.URIFragmentLocator
All Implemented Interfaces:
java.io.Serializable, LocatorIF

public class URIFragmentLocator
extends AbstractLocator

INTERNAL.

See Also:
Serialized Form

Field Summary
protected  java.lang.String address
           
protected  short authorityEnd
           
protected  java.lang.String fragment
           
protected  short lastSlash
           
protected  short schemeEnd
           
 
Constructor Summary
protected URIFragmentLocator(java.lang.String address, java.lang.String fragment, short schemeEnd, short authorityEnd, short lastSlash)
           
 
Method Summary
 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.
 LocatorIF resolveAbsolute(java.lang.String rel)
          PUBLIC: Given a locator address string that is relative to this locator, return an absolute locator.
 
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

address

protected java.lang.String address

fragment

protected java.lang.String fragment

schemeEnd

protected short schemeEnd

authorityEnd

protected short authorityEnd

lastSlash

protected short lastSlash
Constructor Detail

URIFragmentLocator

protected URIFragmentLocator(java.lang.String address,
                             java.lang.String fragment,
                             short schemeEnd,
                             short authorityEnd,
                             short lastSlash)
Method Detail

getURL

public java.net.URL getURL()
                    throws java.net.MalformedURLException
Deprecated. Because not all URIs can be represented as URL objects.

INTERNAL: Returns the URI as a URL object.

Throws:
java.net.MalformedURLException

getNotation

public java.lang.String getNotation()
Description copied from interface: LocatorIF
PUBLIC: Gets the locator notation. The default notation is URI. Ontopia will never use notation names which begin with 'x-'. Notation names are case-insensitive.

Note that only the URI notation is supported in release OKS 4.0 and newer.


getAddress

public java.lang.String getAddress()
Description copied from interface: LocatorIF
PUBLIC: Returns the locator address in absolute and normalized form. Whether addresses are case-sensitive or not depends on the locator notation.


resolveAbsolute

public LocatorIF resolveAbsolute(java.lang.String rel)
Description copied from interface: LocatorIF
PUBLIC: Given a locator address string that is relative to this locator, return an absolute locator. If the input locator address is absolute the returned locator object will simply contain that absolute locator address.


getExternalForm

public java.lang.String getExternalForm()
Description copied from interface: LocatorIF
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.


hashCode

public int hashCode()
Description copied from class: AbstractLocator
PUBLIC: Returns the hashcode of the address property. All subclasses of AbstractLocator must use the same hashCode implementation in order to guarantee interoperability. E.g. when looking up LocatorIFs in Maps.

Overrides:
hashCode in class AbstractLocator

equals

public boolean equals(java.lang.Object object)
Description copied from class: AbstractLocator
PUBLIC: Two LocatorIFs are considered equal if they have the same address and notation properties.

Overrides:
equals in class AbstractLocator


Copyright © 2000-2012 Ontopia.