|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hp.hpl.jena.shared.impl.PrefixMappingImpl com.hp.hpl.jena.graph.compose.PolyadicPrefixMappingImpl
public class PolyadicPrefixMappingImpl
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.hp.hpl.jena.shared.PrefixMapping |
---|
PrefixMapping.Factory, PrefixMapping.IllegalPrefixException, PrefixMapping.JenaLockedException |
Field Summary |
---|
Fields inherited from interface com.hp.hpl.jena.shared.PrefixMapping |
---|
Extended, Standard |
Constructor Summary | |
---|---|
PolyadicPrefixMappingImpl(Polyadic p)
|
Method Summary | |
---|---|
java.lang.String |
expandPrefix(java.lang.String prefixed)
Expand a prefixed URI. |
java.util.Map |
getNsPrefixMap()
Return a copy of the internal mapping from names to URI strings. |
java.lang.String |
getNsPrefixURI(java.lang.String prefix)
Get the URI bound to a specific prefix, null if there isn't one. |
java.lang.String |
getNsURIPrefix(java.lang.String uri)
Answer the prefix for the given URI, or null if there isn't one. |
java.lang.String |
qnameFor(java.lang.String uri)
Answer the qname for uri which uses a prefix from this
mapping, or null if there isn't one. |
PrefixMapping |
removeNsPrefix(java.lang.String prefix)
Remove any existing maplet with the given prefix name and answer this mapping. |
PrefixMapping |
setNsPrefix(java.lang.String prefix,
java.lang.String uri)
Specify the prefix name for a URI prefix string. |
PrefixMapping |
setNsPrefixes(java.util.Map other)
Add the bindings in the map to our own. |
PrefixMapping |
setNsPrefixes(PrefixMapping other)
Add the bindings of other to our own. |
java.lang.String |
shortForm(java.lang.String uri)
Compress the URI using the prefix mapping. |
java.lang.String |
toString()
Answer a readable (we hope) representation of this prefix mapping. |
Methods inherited from class com.hp.hpl.jena.shared.impl.PrefixMappingImpl |
---|
isNiceURI, lock, samePrefixMappingAs, withDefaultMappings |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.hp.hpl.jena.shared.PrefixMapping |
---|
lock, samePrefixMappingAs, withDefaultMappings |
Constructor Detail |
---|
public PolyadicPrefixMappingImpl(Polyadic p)
Method Detail |
---|
public PrefixMapping setNsPrefix(java.lang.String prefix, java.lang.String uri)
PrefixMapping
A prefix name must be a valid NCName, or the empty string. The empty string is reserved to mean "the default namespace".
Need not check the RFC2396 validity of the URI. Bad URIs are either silently ignored or behave as if they were good. The earlier restriction that the URI should end with a non-NCName character has been removed.
setNsPrefix
in interface PrefixMapping
setNsPrefix
in class com.hp.hpl.jena.shared.impl.PrefixMappingImpl
prefix
- the string to be used for the prefix.uri
- the URI prefix to be named
public PrefixMapping removeNsPrefix(java.lang.String prefix)
PrefixMapping
The reverse URI-to-prefix mapping is updated, but if there are multiple prefixes for the removed URI it is unspecified which of them will be chosen.
removeNsPrefix
in interface PrefixMapping
removeNsPrefix
in class com.hp.hpl.jena.shared.impl.PrefixMappingImpl
prefix
- the prefix string to remove
public PrefixMapping setNsPrefixes(PrefixMapping other)
setNsPrefixes
in interface PrefixMapping
setNsPrefixes
in class com.hp.hpl.jena.shared.impl.PrefixMappingImpl
other
- the PrefixMapping whose bindings we are to add to this.
public PrefixMapping setNsPrefixes(java.util.Map other)
setNsPrefixes
in interface PrefixMapping
setNsPrefixes
in class com.hp.hpl.jena.shared.impl.PrefixMappingImpl
other
- the Map whose bindings we are to add to this.
public java.lang.String getNsPrefixURI(java.lang.String prefix)
PrefixMapping
getNsPrefixURI
in interface PrefixMapping
getNsPrefixURI
in class com.hp.hpl.jena.shared.impl.PrefixMappingImpl
prefix
- the prefix name to be looked up
public java.util.Map getNsPrefixMap()
PrefixMapping
getNsPrefixMap
in interface PrefixMapping
getNsPrefixMap
in class com.hp.hpl.jena.shared.impl.PrefixMappingImpl
public java.lang.String getNsURIPrefix(java.lang.String uri)
PrefixMapping
getNsURIPrefix
in interface PrefixMapping
getNsURIPrefix
in class com.hp.hpl.jena.shared.impl.PrefixMappingImpl
uri
- the uri whose prefix is to be found
public java.lang.String expandPrefix(java.lang.String prefixed)
expandPrefix
in interface PrefixMapping
expandPrefix
in class com.hp.hpl.jena.shared.impl.PrefixMappingImpl
prefixed
- a QName or URI
public java.lang.String toString()
toString
in class com.hp.hpl.jena.shared.impl.PrefixMappingImpl
public java.lang.String shortForm(java.lang.String uri)
shortForm
in interface PrefixMapping
shortForm
in class com.hp.hpl.jena.shared.impl.PrefixMappingImpl
uri
- the URI string to try and prefix-compress
public java.lang.String qnameFor(java.lang.String uri)
com.hp.hpl.jena.shared.impl.PrefixMappingImpl
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.
qnameFor
in interface PrefixMapping
qnameFor
in class com.hp.hpl.jena.shared.impl.PrefixMappingImpl
PrefixMapping.qnameFor(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |