Class GenericLocator

java.lang.Object
net.ontopia.infoset.impl.basic.AbstractLocator
net.ontopia.infoset.impl.basic.GenericLocator
All Implemented Interfaces:
Externalizable, Serializable, LocatorIF

public class GenericLocator extends AbstractLocator implements Externalizable
INTERNAL: A generic locator class. Addresses of any notation can be used with this locator class. No normalization or absolutization is done.
See Also:
  • Field Details

    • notation

      protected String notation
    • address

      protected String address
  • Constructor Details

  • Method Details

    • getNotation

      public 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.

      Specified by:
      getNotation in interface LocatorIF
    • getAddress

      public 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.
      Specified by:
      getAddress in interface LocatorIF
    • resolveAbsolute

      public LocatorIF resolveAbsolute(String address)
      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.
      Specified by:
      resolveAbsolute in interface LocatorIF
    • getExternalForm

      public 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.
      Specified by:
      getExternalForm in interface LocatorIF
    • 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(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
    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Specified by:
      writeExternal in interface Externalizable
      Throws:
      IOException
    • readExternal

      public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
      Specified by:
      readExternal in interface Externalizable
      Throws:
      IOException
      ClassNotFoundException