Package org.apache.jena.sparql.util
Class PrefixMapping2
- java.lang.Object
-
- org.apache.jena.sparql.util.PrefixMapping2
-
- All Implemented Interfaces:
PrefixMapping
public class PrefixMapping2 extends java.lang.Object implements PrefixMapping
A prefix mapping based on global and local mappings. Updates go to the local (second) copy only. Lookup looks in the local copy before the global copy.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jena.shared.PrefixMapping
PrefixMapping.Factory, PrefixMapping.IllegalPrefixException, PrefixMapping.JenaLockedException
-
-
Field Summary
-
Fields inherited from interface org.apache.jena.shared.PrefixMapping
Extended, Standard
-
-
Constructor Summary
Constructors Constructor Description PrefixMapping2(PrefixMapping globalMapping)
PrefixMapping2(PrefixMapping globalMapping, PrefixMapping localMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrefixMapping
clearNsPrefixMap()
Clear the local prefix map, but leave the immutable global one alonejava.lang.String
expandPrefix(java.lang.String prefixed)
PrefixMapping
getGlobalPrefixMapping()
PrefixMapping
getLocalPrefixMapping()
java.util.Map<java.lang.String,java.lang.String>
getNsPrefixMap()
java.util.Map<java.lang.String,java.lang.String>
getNsPrefixMap(boolean includeGlobalMap)
java.lang.String
getNsPrefixURI(java.lang.String prefix)
java.lang.String
getNsURIPrefix(java.lang.String uri)
boolean
hasNoMappings()
PrefixMapping
lock()
int
numPrefixes()
java.lang.String
qnameFor(java.lang.String uri)
PrefixMapping
removeNsPrefix(java.lang.String prefix)
boolean
samePrefixMappingAs(PrefixMapping other)
void
setGlobalPrefixMapping(PrefixMapping x)
void
setLocalPrefixMapping(PrefixMapping x)
PrefixMapping
setNsPrefix(java.lang.String prefix, java.lang.String uri)
PrefixMapping
setNsPrefixes(java.util.Map<java.lang.String,java.lang.String> map)
PrefixMapping
setNsPrefixes(PrefixMapping other)
java.lang.String
shortForm(java.lang.String uri)
PrefixMapping
withDefaultMappings(PrefixMapping map)
-
-
-
Constructor Detail
-
PrefixMapping2
public PrefixMapping2(PrefixMapping globalMapping, PrefixMapping localMapping)
-
PrefixMapping2
public PrefixMapping2(PrefixMapping globalMapping)
-
-
Method Detail
-
getLocalPrefixMapping
public PrefixMapping getLocalPrefixMapping()
-
getGlobalPrefixMapping
public PrefixMapping getGlobalPrefixMapping()
-
setLocalPrefixMapping
public void setLocalPrefixMapping(PrefixMapping x)
-
setGlobalPrefixMapping
public void setGlobalPrefixMapping(PrefixMapping x)
-
setNsPrefix
public PrefixMapping setNsPrefix(java.lang.String prefix, java.lang.String uri)
- Specified by:
setNsPrefix
in interfacePrefixMapping
- See Also:
PrefixMapping.setNsPrefix(java.lang.String, java.lang.String)
-
removeNsPrefix
public PrefixMapping removeNsPrefix(java.lang.String prefix)
- Specified by:
removeNsPrefix
in interfacePrefixMapping
- See Also:
PrefixMapping.removeNsPrefix(java.lang.String)
-
clearNsPrefixMap
public PrefixMapping clearNsPrefixMap()
Clear the local prefix map, but leave the immutable global one alone- Specified by:
clearNsPrefixMap
in interfacePrefixMapping
-
setNsPrefixes
public PrefixMapping setNsPrefixes(PrefixMapping other)
- Specified by:
setNsPrefixes
in interfacePrefixMapping
- See Also:
PrefixMapping.setNsPrefixes(org.apache.jena.shared.PrefixMapping)
-
setNsPrefixes
public PrefixMapping setNsPrefixes(java.util.Map<java.lang.String,java.lang.String> map)
- Specified by:
setNsPrefixes
in interfacePrefixMapping
- See Also:
PrefixMapping.setNsPrefixes(java.util.Map)
-
getNsPrefixURI
public java.lang.String getNsPrefixURI(java.lang.String prefix)
- Specified by:
getNsPrefixURI
in interfacePrefixMapping
- See Also:
PrefixMapping.getNsPrefixURI(java.lang.String)
-
getNsURIPrefix
public java.lang.String getNsURIPrefix(java.lang.String uri)
- Specified by:
getNsURIPrefix
in interfacePrefixMapping
- See Also:
PrefixMapping.getNsURIPrefix(java.lang.String)
-
getNsPrefixMap
public java.util.Map<java.lang.String,java.lang.String> getNsPrefixMap()
- Specified by:
getNsPrefixMap
in interfacePrefixMapping
- See Also:
PrefixMapping.getNsPrefixMap()
-
getNsPrefixMap
public java.util.Map<java.lang.String,java.lang.String> getNsPrefixMap(boolean includeGlobalMap)
-
expandPrefix
public java.lang.String expandPrefix(java.lang.String prefixed)
- Specified by:
expandPrefix
in interfacePrefixMapping
- See Also:
PrefixMapping.expandPrefix(java.lang.String)
-
shortForm
public java.lang.String shortForm(java.lang.String uri)
- Specified by:
shortForm
in interfacePrefixMapping
- See Also:
PrefixMapping.shortForm(java.lang.String)
-
qnameFor
public java.lang.String qnameFor(java.lang.String uri)
- Specified by:
qnameFor
in interfacePrefixMapping
- See Also:
PrefixMapping.qnameFor(java.lang.String)
-
hasNoMappings
public boolean hasNoMappings()
- Specified by:
hasNoMappings
in interfacePrefixMapping
-
numPrefixes
public int numPrefixes()
- Specified by:
numPrefixes
in interfacePrefixMapping
-
lock
public PrefixMapping lock()
- Specified by:
lock
in interfacePrefixMapping
- See Also:
PrefixMapping.lock()
-
withDefaultMappings
public PrefixMapping withDefaultMappings(PrefixMapping map)
- Specified by:
withDefaultMappings
in interfacePrefixMapping
-
samePrefixMappingAs
public boolean samePrefixMappingAs(PrefixMapping other)
- Specified by:
samePrefixMappingAs
in interfacePrefixMapping
-
-