class PrefixMapping extends AnyRef

Inspired by Jena's PrefixMappingImpl class, this class does more or les the same.

See http://svn.apache.org/repos/asf/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/shared/impl/PrefixMappingImpl.java

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PrefixMapping
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PrefixMapping()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. var URItoPrefix: Map[String, String]
    Attributes
    protected
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def expandPrefix(prefixed: String): String

    Expand a prefixed URI.

    Expand a prefixed URI. There's an assumption that any URI of the form Head:Tail is subject to mapping if Head is in the prefix mapping. So, if someone takes it into their heads to define eg "http" or "ftp" we have problems.

  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def get(prefix: String): String
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def getNsPrefixMap: Map[String, String]
  14. def getNsPrefixURI(prefix: String): String
  15. def getNsURIPrefix(uri: String): String
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def isPrefixed(uri: String): Boolean
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. var prefixToURI: Map[String, String]
    Attributes
    protected
  23. def qnameFor(uri: String): String

    Answer the qname for uri which uses a prefix from this mapping, or null if there isn't one.

    Answer the qname for uri which uses a prefix from this mapping, or null if there isn't one.

    Relies on splitNamespace to carve uri into namespace and localname components; this ensures that the localname is legal and we just have to (reverse-)lookup the namespace in the prefix table.

    See also

    com.hp.hpl.jena.shared.PrefixMapping#qnameFor(java.lang.String)

  24. def regenerateReverseMapping(): Unit
    Attributes
    protected
  25. def removeNsPrefix(prefix: String): PrefixMapping
  26. def samePrefixMappingAs(other: PrefixMapping): Boolean
  27. def set(prefix: String, uri: String): Unit
    Attributes
    protected
  28. def setNsPrefix(prefix: String, uri: String): PrefixMapping
  29. def setNsPrefixes(other: PrefixMapping): PrefixMapping

    Add the bindings of other to our own.

    Add the bindings of other to our own. We defer to the general case because we have to ensure the URIs are checked.

    other

    the PrefixMapping whose bindings we are to add to this.

  30. def setNsPrefixes(other: Map[String, String]): PrefixMapping

    Add the bindings in the prefixToURI to our own.

    Add the bindings in the prefixToURI to our own. This will fail with a ClassCastException if any key or value is not a String; we make no guarantees about order or completeness if this happens. It will fail with an IllegalPrefixException if any prefix is illegal; similar provisos apply.

    other

    the Map whose bindings we are to add to this.

  31. def shortForm(uri: String): String

    Compress the URI using the prefix mapping.

    Compress the URI using the prefix mapping. This version of the code looks through all the maplets and checks each candidate prefix URI for being a leading substring of the argument URI. There's probably a much more efficient algorithm available, pre-processing the prefix strings into some kind of search table, but for the moment we don't need it.

  32. def sparql: String
  33. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String

    Answer a readable (we hope) representation of this prefix mapping.

    Answer a readable (we hope) representation of this prefix mapping.

    Definition Classes
    PrefixMapping → AnyRef → Any
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  38. def withDefaultMappings(other: PrefixMapping): PrefixMapping

    Answer this PrefixMapping after updating it with the (p, u) mappings in other where neither p nor u appear in this mapping.

Inherited from AnyRef

Inherited from Any

Ungrouped