/** Set the context for the writer when built. * * @param context * @return this */ public RDFWriterBuilder context(Context context) { if ( context != null ) context = context.copy(); this.context = context; return this; }
/** Set the {@link Context}. This defaults to the global settings of {@code ARQ.getContext()}. */ public Builder context(Context context) { if ( context != null ) context = context.copy(); this.context = context; return this; }
public RDFParserBuilder context(Context context) { if ( context != null ) context = context.copy(); this.context = context; return this; }
/** Set the {@link Context}. This defaults to the global settings of {@code ARQ.getContext()}. */ public Builder context(Context context) { if ( context != null ) context = context.copy(); this.context = context; return this; }
/** * Create a new generator * @param context Context */ public AlgebraGenerator(Context context) { this (context != null ? context : ARQ.getContext().copy(), 0) ; }
public static DatasetGraphSDB createDatasetStoreGraph(Store store) { return new DatasetGraphSDB(store, SDB.getContext().copy()) ; } }
/** * Connect to the store as a DatasetGraph * @param store * @return DatasetGraph */ public static DatasetGraph connectDatasetGraph(Store store) { return new DatasetGraphSDB(store, SDB.getContext().copy()) ; }
/** Merge an outer (global) and local context to produce a new context * The new context is always a separate copy. */ public static Context mergeCopy(Context contextGlobal, Context contextLocal) { if ( contextGlobal == null ) contextGlobal = ARQ.getContext(); Context context = contextGlobal.copy(); if ( contextLocal != null ) // Copy per-dataset settings. context.putAll(contextLocal); return context ; }
public GraphSDB(Store store, Node graphNode) { if ( graphNode == null ) graphNode = Quad.defaultGraphNodeGenerated; this.store = store; this.graphNode = graphNode; // Avoid looping here : DatasetStoreGraph can make GraphSDB's datasetStore = new DatasetGraphSDB(store, this, SDB.getContext().copy()); // readPrefixMapping() ; }
/** Create a {@link ParserProfile}. */ public static ParserProfile createParserProfile(FactoryRDF factory, ErrorHandler errorHandler, IRIResolver resolver, boolean checking) { return new ParserProfileStd(factory, errorHandler, resolver, PrefixMapFactory.createForInput(), RIOT.getContext().copy(), checking, false); }
public RDFWriter build() { if ( context == null ) context = RIOT.getContext().copy(); if ( dataset == null && graph == null ) throw new RiotException("No source to be written"); return new RDFWriter(dataset, graph, format, lang, baseURI, context); }
private Context setup() { Context cxt = ARQ.getContext().copy(); setStylesheetURL(cxt, stylesheetURL); setXMLinstruction(cxt, includeXMLinst); return cxt; } }
static public QueryIterator execRef(Op op, DatasetGraph dsg) { QueryEngineRef qe = new QueryEngineRef(op, dsg, ARQ.getContext().copy()) ; return qe.getPlan().iterator() ; }
/** Create a {@link ParserProfile} with default settings, and a specific error handler. */ public static ParserProfile createParserProfile(FactoryRDF factory, ErrorHandler errorHandler, boolean checking) { return new ParserProfileStd(factory, errorHandler, IRIResolver.create(), PrefixMapFactory.createForInput(), RIOT.getContext().copy(), checking, false); }
public static NodeValue eval(Expr expr, Binding binding) { Context context = ARQ.getContext().copy() ; context.set(ARQConstants.sysCurrentTime, NodeFactoryExtra.nowAsDateTime()) ; FunctionEnv env = new ExecutionContext(context, null, null, null) ; NodeValue r = expr.eval(binding, env) ; return r ; }
private static Context setupContext(Context context, DatasetGraph dataset) { // To many copies? if ( context == null ) // Copy of global context to protect against change. context = ARQ.getContext() ; context = context.copy() ; if ( dataset.getContext() != null ) context.putAll(dataset.getContext()) ; context.set(ARQConstants.sysCurrentTime, NodeFactoryExtra.nowAsDateTime()) ; return context ; } }
private static EnvJavaScript setupJS() { Context cxt = ARQ.getContext().copy(); cxt.set(EnvJavaScript.symJavaScriptFunctions, CamelCaseJS); cxt.set(EnvJavaScript.symJavaScriptLibFile, JS_LIB_FILE); return EnvJavaScript.create(cxt); }
private ParserProfile makeParserProfile(IRIResolver resolver, ErrorHandler errorHandler, boolean checking) { if ( errorHandler == null ) errorHandler = ErrorHandlerFactory.errorHandlerStd; return new ParserProfileStd(RiotLib.factoryRDF(), errorHandler, resolver, PrefixMapFactory.createForInput(), RIOT.getContext().copy(), checking, false) ; }
/** Create an execution environment suitable for testing functions and expressions */ public static FunctionEnv createTest() { Context cxt = ARQ.getContext().copy(); cxt.set(ARQConstants.sysCurrentTime, NodeFactoryExtra.nowAsDateTime()) ; return new FunctionEnvBase(cxt) ; }
/** Create a {@link ParserProfile}, no resolving, no prefix map. */ static ParserProfile parserProfile(ErrorHandler errorHandler) { return new ParserProfileStd(RiotLib.factoryRDF(), errorHandler, IRIResolver.createNoResolve(), PrefixMapFactory.emptyPrefixMap(), RIOT.getContext().copy(), true, false) ; }