Java Code Examples for org.apache.jena.shared.impl.PrefixMappingImpl#setNsPrefixes()
The following examples show how to use
org.apache.jena.shared.impl.PrefixMappingImpl#setNsPrefixes() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BdbTypeNameStore.java From timbuctoo with GNU General Public License v3.0 | 5 votes |
public BdbTypeNameStore(DataStorage dataStore, String dataStoreRdfPrefix) throws IOException { this.dataStoreRdfPrefix = dataStoreRdfPrefix; prefixMapping = new PrefixMappingImpl(); final String storedValue = dataStore.getValue(); if (storedValue == null) { data = new TypeNames(); addStandardPrefixes(); } else { data = objectMapper.readValue(storedValue, new TypeReference<TypeNames>() {}); } prefixMapping.setNsPrefixes(data.prefixes); this.dataStore = dataStore; }
Example 2
Source File: TarqlQueryExecution.java From tarql with BSD 2-Clause "Simplified" License | 5 votes |
private QueryExecution createQueryExecution(Query query, Model model) { QueryExecution result = QueryExecutionFactory.create(query, model); PrefixMappingImpl prefixes = new PrefixMappingImpl(); prefixes.setNsPrefixes(tq.getPrologue().getPrefixMapping()); prefixes.setNsPrefix("tarql", tarql.NS); result.getContext().set(ExpandPrefixFunction.PREFIX_MAPPING, prefixes); return result; }