use of org.apache.jena.sparql.mgt.SystemInfo in project jena by apache.
the class TDB method initialization2.
private static void initialization2() {
// Set management information.
SystemInfo systemInfo = new SystemInfo(TDB.tdbIRI, TDB.PATH, TDB.VERSION, TDB.BUILD_DATE);
SystemARQ.registerSubSystem(systemInfo);
}
use of org.apache.jena.sparql.mgt.SystemInfo in project jena by apache.
the class TDBMgt method init.
public static void init() {
String NS = TDB.PATH;
SystemInfo sysInfo = new SystemInfo(TDB.tdbIRI, TDB.PATH, TDB.VERSION, TDB.BUILD_DATE);
// ARQMgt.register(NS+".system:type=SystemInfo", sysInfo) ;
// ARQMgt.register(NS+".system2:type=SystemInfo", new TDBSystemInfo()) ;
}
use of org.apache.jena.sparql.mgt.SystemInfo in project jena by apache.
the class version method execEvaluated.
@Override
public QueryIterator execEvaluated(Binding binding, PropFuncArg subject, Node predicate, PropFuncArg object, ExecutionContext execCxt) {
List<Binding> results = new ArrayList<>();
Node subj = subject.getArg();
Node obj = object.getArg();
Iterator<SystemInfo> iter = SystemARQ.registeredSubsystems();
for (; iter.hasNext(); ) {
SystemInfo info = iter.next();
if (!isSameOrVar(subj, info.getIRI()))
continue;
Node version = NodeFactory.createLiteral(info.getVersion());
if (!isSameOrVar(obj, version))
continue;
BindingMap b = BindingFactory.create(binding);
if (subj.isVariable())
b.add(Var.alloc(subj), info.getIRI());
if (subj.isVariable())
b.add(Var.alloc(obj), version);
results.add(b);
}
return new QueryIterPlainWrapper(results.iterator(), execCxt);
}
use of org.apache.jena.sparql.mgt.SystemInfo in project jena by apache.
the class ARQ method init.
public static void init() {
if (initialized) {
return;
}
synchronized (initLock) {
if (initialized) {
JenaSystem.logLifecycle("ARQ.init - skip");
return;
}
initialized = true;
JenaSystem.logLifecycle("ARQ.init - start");
// Force constants to be set. This should be independent of other initialization including jena core.
ARQConstants.getGlobalPrefixMap();
ResultSetLang.init();
globalContext = defaultSettings();
// After context and after PATH/NAME/VERSION/BUILD_DATE are set
ARQMgt.init();
MappingRegistry.addPrefixMapping(ARQ.arqSymbolPrefix, ARQ.arqParamNS);
// This is the pattern for any subsystem to register.
SystemInfo sysInfo = new SystemInfo(ARQ.arqIRI, ARQ.PATH, ARQ.VERSION, ARQ.BUILD_DATE);
SystemARQ.registerSubSystem(sysInfo);
AssemblerUtils.init();
// Register RIOT details here, not earlier, to avoid
// initialization loops with RIOT.init() called directly.
RIOT.register();
// Initialise the standard library.
FunctionRegistry.init();
AggregateRegistry.init();
PropertyFunctionRegistry.init();
JenaSystem.logLifecycle("ARQ.init - finish");
}
}
Aggregations