public class PrefixMapWrapper extends Object implements PrefixMap
Constructor and Description |
---|
PrefixMapWrapper(PrefixMap other) |
Modifier and Type | Method and Description |
---|---|
Pair<String,String> |
abbrev(String uriStr)
Abbreviate an IRI and return a pair of prefix and local parts, or null.
|
String |
abbreviate(String uriStr)
Abbreviate an IRI or return null
|
void |
add(String prefix,
org.apache.jena.iri.IRI iri)
Add a prefix, overwrites any existing association
|
void |
add(String prefix,
String iriString)
Add a prefix, overwrites any existing association
|
boolean |
contains(String prefix)
Gets whether the map contains a given prefix
|
void |
delete(String prefix)
Delete a prefix
|
String |
expand(String prefixedName)
Expand a prefix named, return null if it can't be expanded
|
String |
expand(String prefix,
String localName)
Expand a prefix, return null if it can't be expanded
|
Map<String,org.apache.jena.iri.IRI> |
getMapping()
Return the underlying mapping, this is generally unsafe to modify and
implementations may opt to return an unmodifiable view of the mapping if
they wish
|
Map<String,org.apache.jena.iri.IRI> |
getMappingCopy()
Return a fresh copy of the underlying mapping, should be safe to modify
unlike the mapping returned from
PrefixMap.getMapping() |
Map<String,String> |
getMappingCopyStr()
Gets a fresh copy of the mapping with the IRIs translated into their
strings
|
boolean |
isEmpty()
return whether the
|
void |
putAll(Map<String,String> mapping)
Add a prefix, overwrites any existing association
|
void |
putAll(PrefixMap pmap)
Add a prefix, overwrites any existing association
|
void |
putAll(PrefixMapping pmap)
Add a prefix, overwrites any existing association
|
int |
size()
Return the number of entries in the prefix map.
|
public PrefixMapWrapper(PrefixMap other)
public Map<String,org.apache.jena.iri.IRI> getMapping()
PrefixMap
getMapping
in interface PrefixMap
public Map<String,org.apache.jena.iri.IRI> getMappingCopy()
PrefixMap
PrefixMap.getMapping()
getMappingCopy
in interface PrefixMap
public Map<String,String> getMappingCopyStr()
PrefixMap
getMappingCopyStr
in interface PrefixMap
public void add(String prefix, String iriString)
PrefixMap
public void add(String prefix, org.apache.jena.iri.IRI iri)
PrefixMap
public void putAll(PrefixMap pmap)
PrefixMap
public void putAll(PrefixMapping pmap)
PrefixMap
public void putAll(Map<String,String> mapping)
PrefixMap
public void delete(String prefix)
PrefixMap
public boolean contains(String prefix)
PrefixMap
public String abbreviate(String uriStr)
PrefixMap
abbreviate
in interface PrefixMap
uriStr
- URI to abbreviatepublic Pair<String,String> abbrev(String uriStr)
PrefixMap
abbrev
in interface PrefixMap
uriStr
- URI string to abbreviatePrefixMap.abbreviate(java.lang.String)
public String expand(String prefixedName)
PrefixMap
public String expand(String prefix, String localName)
PrefixMap
public boolean isEmpty()
PrefixMap
Licenced under the Apache License, Version 2.0