public class PrefixMapStd extends PrefixMapBase
PrefixMap.| Constructor and Description |
|---|
PrefixMapStd()
Creates a new empty prefix mapping
|
PrefixMapStd(PrefixMap prefixMap)
Creates a new prefix mapping copied from an existing map
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.jena.atlas.lib.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,
String iri)
Add a prefix, overwrites any existing association
|
void |
clear()
Clear all prefixes.
|
boolean |
containsPrefix(String prefix)
Gets whether the map contains a given prefix
|
void |
delete(String prefix)
Delete a prefix
|
String |
expand(String prefix,
String localName)
Expand a prefix, return null if it can't be expanded
|
Map<String,String> |
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.
|
boolean |
isEmpty()
Return whether the prefix map is empty or not.
|
int |
size()
Return the number of entries in the prefix map.
|
expand, forEach, getMappingCopy, putAll, putAll, putAll, toStringpublic PrefixMapStd()
public PrefixMapStd(PrefixMap prefixMap)
prefixMap - Prefix Mappublic Map<String,String> getMapping()
PrefixMapPrefixMap.getMappingCopy()public void add(String prefix, String iri)
PrefixMapprefix - Prefixiri - Namespace IRIpublic void delete(String prefix)
PrefixMapprefix - Prefix to deletepublic void clear()
PrefixMappublic boolean containsPrefix(String prefix)
PrefixMapprefix - Prefixpublic String abbreviate(String uriStr)
PrefixMapuriStr - URI to abbreviatepublic org.apache.jena.atlas.lib.Pair<String,String> abbrev(String uriStr)
PrefixMapuriStr - URI string to abbreviatePrefixMap.abbreviate(java.lang.String)public String expand(String prefix, String localName)
PrefixMapprefix - PrefixlocalName - Local namepublic boolean isEmpty()
PrefixMappublic int size()
PrefixMapLicenced under the Apache License, Version 2.0