public class Prefixer extends Object
| Constructor and Description |
|---|
Prefixer() |
Prefixer(Map<String,String> prefixToNamespace,
boolean appendPopularPrefixes) |
| Modifier and Type | Method and Description |
|---|---|
String |
nicen(String uri)
http://dbpedia.org/resource/J%C3%BCrgen_Prochnow
will be rendered as:
Jürgen Prochnow by the following operations:
- strip namespace
- urldecode
- replace _ by whitespace
|
String |
prefixUri(String uri)
http://dbpedia.org/resource/London -> dbpedia:London
|
void |
setPrefixToNamespace(Map<String,String> prefixToNamespace)
resets everything
|
String |
stripNamespace(String uri)
this function calls stripNamespace(uri, true);
|
String |
stripNamespace(String uri,
boolean useHeuristic)
strips the namespace, either by base or known prefix or a heuristic
|
static String |
stripNamespaceHeuristic(String uri)
currently implemented to cut after the last # or if not available after the last /
|
Map<String,String> |
theMostPopulars() |
String |
toSparqlPrefix()
NOTE base recognition is not implemented
|
public void setPrefixToNamespace(Map<String,String> prefixToNamespace)
prefixToNamespace - public String toSparqlPrefix()
public String nicen(String uri)
uri - public String stripNamespace(String uri)
uri - public String stripNamespace(String uri, boolean useHeuristic)
uri - e.g. http://dbpedia.org/resource/LondonuseHeuristic - if truepublic static String stripNamespaceHeuristic(String uri)
uri - e.g. http://dbpedia.org/resource/Copyright © 2013. All Rights Reserved.