public class PrefixMapStd extends PrefixMapBase
PrefixMap
, this implementation
is best suited to use for input.
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 |
---|---|
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 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
|
boolean |
isEmpty()
return whether the
|
int |
size()
Return the number of entries in the prefix map.
|
expand, getMappingCopy, getMappingCopyStr, putAll, putAll, putAll, toString
public PrefixMapStd()
public PrefixMapStd(PrefixMap prefixMap)
prefixMap
- Prefix Mappublic Map<String,org.apache.jena.iri.IRI> getMapping()
PrefixMap
public void add(String prefix, String iriString)
PrefixMap
add
in interface PrefixMap
add
in class PrefixMapBase
prefix
- PrefixiriString
- Namespace IRIpublic void add(String prefix, org.apache.jena.iri.IRI iri)
PrefixMap
prefix
- Prefixiri
- Namespace IRIpublic void delete(String prefix)
PrefixMap
prefix
- Prefix to deletepublic boolean contains(String prefix)
PrefixMap
prefix
- Prefixpublic String abbreviate(String uriStr)
PrefixMap
uriStr
- URI to abbreviatepublic Pair<String,String> abbrev(String uriStr)
PrefixMap
uriStr
- URI string to abbreviatePrefixMap.abbreviate(java.lang.String)
public String expand(String prefix, String localName)
PrefixMap
prefix
- PrefixlocalName
- Local namepublic boolean isEmpty()
PrefixMap
public int size()
PrefixMap
Licenced under the Apache License, Version 2.0