Package org.apache.any23.rdf
Class Prefixes
- java.lang.Object
-
- org.apache.any23.rdf.Prefixes
-
public class Prefixes extends Object
A mapping from prefixes to namespace IRIs. Supports "volatile mappings", which will be overwritten without notice when mappings are merged, while for normal mappings this causes an exception. This allows combining "hard" mappings (which must be retained or something breaks) and "soft" mappings (which might be read from input RDF files and should be retained only if they are not in conflict with the hard ones).- Author:
- Richard Cyganiak (richard@cyganiak.de)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
abbreviate(String uri)
void
add(String prefix, String namespaceIRI)
void
add(Prefixes other)
void
addVolatile(String prefix, String namespaceIRI)
void
addVolatile(Prefixes other)
Set<String>
allPrefixes()
Map<String,String>
asMap()
boolean
canAbbreviate(String uri)
boolean
canExpand(String curie)
static Prefixes
create1(String prefix, String namespaceIRI)
static Prefixes
createFromMap(Map<String,String> prefixesToNamespaceIRIs, boolean areVolatile)
Prefixes
createSubset(String... prefixes)
org.eclipse.rdf4j.model.IRI
expand(String curie)
String
getNamespaceIRIFor(String prefix)
boolean
hasNamespaceIRI(String uri)
boolean
hasPrefix(String prefix)
boolean
isEmpty()
boolean
isVolatile(String prefix)
void
removePrefix(String prefix)
-
-
-
Field Detail
-
EMPTY
public static Prefixes EMPTY
-
-
Constructor Detail
-
Prefixes
public Prefixes()
-
Prefixes
public Prefixes(Prefixes initial)
-
-
Method Detail
-
createFromMap
public static Prefixes createFromMap(Map<String,String> prefixesToNamespaceIRIs, boolean areVolatile)
-
expand
public org.eclipse.rdf4j.model.IRI expand(String curie)
-
canExpand
public boolean canExpand(String curie)
-
canAbbreviate
public boolean canAbbreviate(String uri)
-
hasNamespaceIRI
public boolean hasNamespaceIRI(String uri)
-
hasPrefix
public boolean hasPrefix(String prefix)
-
isEmpty
public boolean isEmpty()
-
add
public void add(Prefixes other)
-
removePrefix
public void removePrefix(String prefix)
-
addVolatile
public void addVolatile(Prefixes other)
-
isVolatile
public boolean isVolatile(String prefix)
-
-