/** Minimum initialization using just a dataset. * <p> * the HTTP Action will change its transactional state and * {@link Transactional} instance according to its base dataset graph. * </p> * <p>There is no associated DataAccessPoint or DataService set by this operation.</p> * * @param dsg DatasetGraph */ private void setDataset(DatasetGraph dsg) { this.dsg = dsg ; this.context = Context.mergeCopy(Fuseki.getContext(), dsg.getContext()); if ( dsg == null ) return ; setTransactionalPolicy(dsg) ; }
/** Minimum initialization using just a dataset. * <p> * the HTTP Action will change its transactional state and * {@link Transactional} instance according to its base dataset graph. * </p> * <p>There is no associated DataAccessPoint or DataService set by this operation.</p> * * @param dsg DatasetGraph */ private void setDataset(DatasetGraph dsg) { this.dsg = dsg ; this.context = Context.mergeCopy(Fuseki.getContext(), dsg.getContext()); if ( dsg == null ) return ; setTransactionalPolicy(dsg) ; }
/** Setup a context using another context and a dataset. * This adds the current time. */ public static Context setupContextExec(Context globalContext, DatasetGraph dataset) { if ( globalContext == null ) globalContext = ARQ.getContext(); // Copy per-dataset settings. Context dsgCxt = ( dataset != null && dataset.getContext() != null ) ? dataset.getContext() : null; Context context = mergeCopy(globalContext, dsgCxt); context.set(ARQConstants.sysCurrentTime, NodeFactoryExtra.nowAsDateTime()) ; // Allocators. // context.set(ARQConstants.sysVarAllocNamed, new VarAlloc(ARQConstants.allocVarMarkerExec)) ; // context.set(ARQConstants.sysVarAllocAnon, new VarAlloc(ARQConstants.allocVarAnonMarkerExec)) ; // Add VarAlloc for variables and bNodes (this is not the parse name). // More added later e.g. query (if there is a query), algebra form (in setOp) return context; }