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
- Alphabetic
- By Inheritance
- PrefixMapping
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new PrefixMapping()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
var
URItoPrefix: Map[String, String]
- Attributes
- protected
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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.
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def get(prefix: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getNsPrefixMap: Map[String, String]
- def getNsPrefixURI(prefix: String): String
- def getNsURIPrefix(uri: String): String
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrefixed(uri: String): Boolean
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
var
prefixToURI: Map[String, String]
- Attributes
- protected
-
def
qnameFor(uri: String): String
Answer the qname for
uriwhich uses a prefix from this mapping, or null if there isn't one.Answer the qname for
uriwhich uses a prefix from this mapping, or null if there isn't one.Relies on
splitNamespaceto 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)
-
def
regenerateReverseMapping(): Unit
- Attributes
- protected
- def removeNsPrefix(prefix: String): PrefixMapping
- def samePrefixMappingAs(other: PrefixMapping): Boolean
-
def
set(prefix: String, uri: String): Unit
- Attributes
- protected
- def setNsPrefix(prefix: String, uri: String): PrefixMapping
-
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.
-
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.
-
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.
- def sparql: String
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
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
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
withDefaultMappings(other: PrefixMapping): PrefixMapping
Answer this PrefixMapping after updating it with the
(p, u)mappings inotherwhere neitherpnoruappear in this mapping.