org.openanzo.model.impl
Class AnzoUriImpl

java.lang.Object
  extended by org.openrdf.model.impl.URIImpl
      extended by org.openanzo.model.impl.AnzoUriImpl
All Implemented Interfaces:
java.io.Serializable, org.openrdf.model.Resource, org.openrdf.model.URI, org.openrdf.model.Value

public class AnzoUriImpl
extends org.openrdf.model.impl.URIImpl

Anzo extension of URI object.

  • HashCode is stored in order to save compute time on multiple calls.
  • Slight memory tweak used to make sure URI string is not bloated.
    Somewhere in one of the parsers, strings are created with very large buffers, and due to a java implementation choice, when a string is substringed, the substring is merely a pointer to the char array of the parent string, with offset and length parameters set. This means that if a string has a 40k char buffer, even if the substring of that buffer is only 4 chars, the char array is still 40k long.

    Author:
    Matthew Roy ( mroy@cambridgesemantics.com )
    See Also:
    Serialized Form

    Constructor Summary
    AnzoUriImpl(java.lang.String uri)
              Create new AnzoUriImpl
     
    Method Summary
     int hashCode()
               
     
    Methods inherited from class org.openrdf.model.impl.URIImpl
    equals, getLocalName, getNamespace, toString
     
    Methods inherited from class java.lang.Object
    getClass, notify, notifyAll, wait, wait, wait
     

    Constructor Detail

    AnzoUriImpl

    public AnzoUriImpl(java.lang.String uri)
    Create new AnzoUriImpl

    Parameters:
    uri - String representation of URI to create
    Method Detail

    hashCode

    public int hashCode()
    Specified by:
    hashCode in interface org.openrdf.model.URI
    Overrides:
    hashCode in class org.openrdf.model.impl.URIImpl


    Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.