org.apache.jena.sparql.util.Symbol Java Examples

The following examples show how to use org.apache.jena.sparql.util.Symbol. 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: DB2QueryExecutionImpl.java    From quetzal with Eclipse Public License 2.0 6 votes vote down vote up
private com.ibm.research.rdf.store.Context getNativeContext()
{

// if this context was never exercised, return the store's context
if (jenaContext == null)
   {
   return getStore().getContext();
   }

// convert the jenaContext back to native context
com.ibm.research.rdf.store.Context nativeCtx = new com.ibm.research.rdf.store.Context();
Iterator<Symbol> jkeys = jenaContext.keys().iterator();
while (jkeys.hasNext())
   {
   Symbol b = jkeys.next();
   // jenaContext.put(b,getStore().getContext().get(b) );
   nativeCtx.set(b, jenaContext.get(b));
   }

return nativeCtx;
}
 
Example #2
Source File: SPARQLExt.java    From sparql-generate with Apache License 2.0 5 votes vote down vote up
/**
 * Creates and registers a new syntax with this symbol.
 *
 * @param uri the name of the syntax
 * @return the syntax
 */
public static Syntax make(final String uri) {
    if (uri == null) {
        return null;
    }
    Symbol sym = Symbol.create(uri);
    if (sym.equals(SYNTAX)) {
        return SYNTAX;
    }
    return Syntax.make(uri);
}
 
Example #3
Source File: Context.java    From quetzal with Eclipse Public License 2.0 4 votes vote down vote up
public Object get(Symbol uri) {
	return context.get(uri);
}
 
Example #4
Source File: Context.java    From quetzal with Eclipse Public License 2.0 4 votes vote down vote up
public void set(Symbol uri, Object object) {
	context.put(uri, object);
}
 
Example #5
Source File: Context.java    From quetzal with Eclipse Public License 2.0 4 votes vote down vote up
public void putAll(Map<Symbol, Object> all) {
	context.putAll(all);
}
 
Example #6
Source File: Context.java    From quetzal with Eclipse Public License 2.0 4 votes vote down vote up
public Set<Symbol> getSymbols() {
	return context.keySet();
}