public class URIMappingImpl extends Object implements URIMapping
Constructor and Description |
---|
URIMappingImpl()
Creates an URIMappingImpl instance with no preferred URIs.
|
URIMappingImpl(Set<String> preferredURIs)
Creates an URIMappingImpl instance with the selected preferred URIs.
|
Modifier and Type | Method and Description |
---|---|
void |
addLink(String subjectURI,
String objectURI)
Add an owl:sameAs mapping for two URIs given as strings.
|
void |
addLinks(Iterator<com.hp.hpl.jena.graph.Triple> sameAsLinks)
Adds owl:sameAs mappings as RDF triples.
|
String |
getCanonicalURI(String uri)
Returns the canonical URI for the given URI.
|
protected Set<String> |
getPreferredURIs()
Returns the set of URIs preferred as canonical URIs.
|
protected Map<String,String> |
getUriDFUParent()
Map representing the DFU data structure.
|
com.hp.hpl.jena.graph.Node |
mapURI(com.hp.hpl.jena.graph.Node uriNode)
Returns a mapping to a canonical URI for the selected URI.
|
public URIMappingImpl()
public void addLinks(Iterator<com.hp.hpl.jena.graph.Triple> sameAsLinks)
sameAsLinks
- iterator over triples with owl:sameAs as a predicatepublic void addLink(String subjectURI, String objectURI)
subjectURI
- subject of a triple with the owl:sameAs predicateobjectURI
- object of a triple with the owl:sameAs predicateaddLinks(Iterator)
public String getCanonicalURI(String uri)
URIMapping
getCanonicalURI
in interface URIMapping
uri
- the URI to mappublic com.hp.hpl.jena.graph.Node mapURI(com.hp.hpl.jena.graph.Node uriNode)
URIMapping
mapURI
in interface URIMapping
uriNode
- a Node_URI instance to mapprotected Set<String> getPreferredURIs()
protected Map<String,String> getUriDFUParent()
preferredURIs
,
it is either the root of a DFU subtree (and thus a canonical URI) or its
respective root is from preferredURIs.Copyright © 2013. All Rights Reserved.