public class PrefixUtils extends Object
| Constructor and Description |
|---|
PrefixUtils() |
| Modifier and Type | Method and Description |
|---|---|
static com.hp.hpl.jena.shared.PrefixMapping |
asPrefixes(String... declarations)
Utility for easily declaring a prefix mapping in code.
|
static String |
asPrefixString(com.hp.hpl.jena.shared.PrefixMapping pm,
boolean turtle) |
static String |
asSparqlPrefixes(com.hp.hpl.jena.shared.PrefixMapping pm)
Return the contents of the given prefix mapping, formatted for prepending
onto a SPARQL query.
|
static String |
asTurtlePrefixes(com.hp.hpl.jena.shared.PrefixMapping pm)
Return the contents of the given prefix mapping, formatted for prepending
onto Turtle content.
|
static com.hp.hpl.jena.shared.PrefixMapping |
commonPrefixes()
Return a set of commonly used RDF prefixes.
|
static com.hp.hpl.jena.shared.PrefixMapping |
commonPrefixes(com.hp.hpl.jena.shared.PrefixMapping additional)
Return a set of commonly used RDF prefixes.
|
static com.hp.hpl.jena.shared.PrefixMapping |
commonPrefixes(String... additional)
Return a set of commonly used RDF prefixes.
|
static String |
expandQuery(String query,
com.hp.hpl.jena.shared.PrefixMapping pm)
Expand a SPARQL query by prefixing it will all possibly relevant
mappings from the given prefix mapping
|
static com.hp.hpl.jena.shared.PrefixMapping |
merge(com.hp.hpl.jena.shared.PrefixMapping pm1,
com.hp.hpl.jena.shared.PrefixMapping pm2)
Return a read-only merge of two prefix mappings
|
public static com.hp.hpl.jena.shared.PrefixMapping merge(com.hp.hpl.jena.shared.PrefixMapping pm1,
com.hp.hpl.jena.shared.PrefixMapping pm2)
public static String expandQuery(String query, com.hp.hpl.jena.shared.PrefixMapping pm)
public static com.hp.hpl.jena.shared.PrefixMapping commonPrefixes()
rdf:, owl:, etc) and prefixes for all of the
vocabularies defined in epimorphics-lib.commonPrefixes(PrefixMapping)public static com.hp.hpl.jena.shared.PrefixMapping asPrefixes(String... declarations)
declarations - Alternating prefix and URI stringsPrefixMapping containing only the prefixes declaredEpiException - if the declarations are not in pairspublic static com.hp.hpl.jena.shared.PrefixMapping commonPrefixes(String... additional)
rdf:, owl:, etc) and prefixes for all of the
vocabularies defined in epimorphics-lib. This variant also allows additional
prefixes to be declared in code as alternating prefix and uri strings.additional - Array of String objects denoting, alternately, a prefix
and a URIcommonPrefixes(PrefixMapping)public static com.hp.hpl.jena.shared.PrefixMapping commonPrefixes(com.hp.hpl.jena.shared.PrefixMapping additional)
rdf:, owl:, etc) and prefixes for all of the
vocabularies defined in epimorphics-lib.additional - Optional additional prefixes to merge into the common core, or nullpublic static String asTurtlePrefixes(com.hp.hpl.jena.shared.PrefixMapping pm)
pm - public static String asSparqlPrefixes(com.hp.hpl.jena.shared.PrefixMapping pm)
pm - public static String asPrefixString(com.hp.hpl.jena.shared.PrefixMapping pm, boolean turtle)
Copyright © 2015. All rights reserved.