/** Process password file, auth and realm settings on the server description. **/ private void processAuthentication(Resource server) { String passwdFile = GraphUtils.getAsStringValue(server, FusekiVocab.pPasswordFile); if ( passwdFile != null ) passwordFile(passwdFile); String realmStr = GraphUtils.getAsStringValue(server, FusekiVocab.pRealm); if ( realmStr != null ) realm(realmStr); }
/** Process password file, auth and realm settings on the server description. **/ private void processAuthentication(Resource server) { String passwdFile = GraphUtils.getAsStringValue(server, FusekiVocab.pPasswordFile); if ( passwdFile != null ) passwordFile(passwdFile); String realmStr = GraphUtils.getAsStringValue(server, FusekiVocab.pRealm); if ( realmStr != null ) realm(realmStr); }
public Object open(Assembler a, Resource root, Mode mode) { Resource r = getResourceValue(root, pSetting ) ; String k = getAsStringValue(r, pName) ; String v = getAsStringValue(r, pValue) ; Symbol symbol = Symbol.create(k) ; ARQ.getContext().set(symbol, v) ; return r ; } }
/** * Server level setting specific to Fuseki main. * General settings done by {@link FusekiConfig#processServerConfiguration}. */ private void processServerLevel(Resource server) { if ( server == null ) return; withPing = argBoolean(server, FusekiVocab.pServerPing, false); withStats = argBoolean(server, FusekiVocab.pServerStats, false); // Extract settings - the server building is done in buildSecurityHandler, // buildAccessControl. Dataset and graph level happen in assemblers. String passwdFile = GraphUtils.getAsStringValue(server, FusekiVocab.pPasswordFile); if ( passwdFile != null ) passwordFile(passwdFile); String realmStr = GraphUtils.getAsStringValue(server, FusekiVocab.pRealm); if ( realmStr != null ) realm(realmStr); String authStr = GraphUtils.getAsStringValue(server, FusekiVocab.pAuth); if ( authStr != null ) auth(AuthScheme.scheme(authStr)); serverAuth = FusekiBuilder.allowedUsers(server); }
@Override public TextIndex open(Assembler a, Resource root, Mode mode) { try { String listOfHostsAndPorts = GraphUtils.getAsStringValue(root, pServerList) ; if(listOfHostsAndPorts == null || listOfHostsAndPorts.isEmpty()) { throw new TextIndexException("Mandatory property text:serverList (containing the comma-separated list of host:port) property is not specified. " + String clusterName = GraphUtils.getAsStringValue(root, pClusterName); if(clusterName == null || clusterName.isEmpty()) { LOGGER.warn("ClusterName property is not specified. Defaulting to 'elasticsearch'"); String numberOfShards = GraphUtils.getAsStringValue(root, pShards); if(numberOfShards == null || numberOfShards.isEmpty()) { LOGGER.warn("shards property is not specified. Defaulting to '1'"); String replicationFactor = GraphUtils.getAsStringValue(root, pReplicas); if(replicationFactor == null || replicationFactor.isEmpty()) { LOGGER.warn("replicas property is not specified. Defaulting to '1'"); String indexName = GraphUtils.getAsStringValue(root, pIndexName); if(indexName == null || indexName.isEmpty()) { LOGGER.warn("index Name property is not specified. Defaulting to 'jena-text'");
/** * Server level setting specific to Fuseki main. * General settings done by {@link FusekiConfig#processServerConfiguration}. */ private void processServerLevel(Resource server) { if ( server == null ) return; withPing = argBoolean(server, FusekiVocab.pServerPing, false); withStats = argBoolean(server, FusekiVocab.pServerStats, false); // Extract settings - the server building is done in buildSecurityHandler, // buildAccessControl. Dataset and graph level happen in assemblers. String passwdFile = GraphUtils.getAsStringValue(server, FusekiVocab.pPasswordFile); if ( passwdFile != null ) passwordFile(passwdFile); String realmStr = GraphUtils.getAsStringValue(server, FusekiVocab.pRealm); if ( realmStr != null ) realm(realmStr); String authStr = GraphUtils.getAsStringValue(server, FusekiVocab.pAuth); if ( authStr != null ) auth(AuthScheme.scheme(authStr)); serverAuth = FusekiBuilder.allowedUsers(server); }
@Override public Model open(Assembler a, Resource root, Mode mode) { // Make a model. // [] rdf:type sdb:Model ; // sdb:dataset <dataset> ; // sdb:graphName <someURI> . // A model (graph) is a (dataset, name) pair where the name can be absent // meaning the default graph of the dataset. Resource dataset = GraphUtils.getResourceValue(root, AssemblerVocab.pDataset) ; if ( dataset == null ) throw new MissingException(root, "No dataset for model or graph") ; StoreDesc storeDesc = datasetAssem.openStore(a, dataset, mode) ; // Attempt to find a graph name - may be absent. // Two names : "namedGraph" and "graphName" String x = GraphUtils.getAsStringValue(root, AssemblerVocab.pNamedGraph1) ; if ( x == null ) x = GraphUtils.getAsStringValue(root, AssemblerVocab.pNamedGraph2) ; // No name - default model. Graph g = null ; if ( x == null ) return SDBFactory.connectDefaultModel(storeDesc) ; else return SDBFactory.connectNamedModel(storeDesc, x) ; } }
String desc = getAsStringValue(root, pDescription).toUpperCase(Locale.ENGLISH) ; exactlyOneProperty(root, pFile) ; String filename = getAsStringValue(root, pFile) ;
@Override public Dataset open(final Assembler assembler, final Resource root, final Mode mode) { // Old name : bypass. if ( ! root.hasProperty( RDF.type, DatasetAssemblerVocab.tDatasetTxnMem ) ) checkType(root, DatasetAssemblerVocab.tMemoryDataset); final Dataset dataset = createTxnMem(); setContext(root, dataset.getContext()); Txn.executeWrite(dataset, ()->{ // Load data into the default graph // This also loads quads into the dataset. multiValueAsString(root, data) .forEach(dataURI -> read(dataset, dataURI)); // load data into named graphs multiValueResource(root, pNamedGraph).forEach(namedGraphResource -> { final String graphName = getAsStringValue(namedGraphResource, pGraphName); if (namedGraphResource.hasProperty(data)) { multiValueAsString(namedGraphResource, data) .forEach(namedGraphData -> read(dataset.getNamedModel(graphName), namedGraphData)); } }); }); return dataset; } }
String dsName = getAsStringValue(root, pDeltaPatchLog); String storageTypeStr = getAsStringValue(root, pDeltaStorage); LocalStorageType storage = LocalStorageType.fromString(storageTypeStr); if ( storage == null ) if ( !exactlyOneProperty(root, pDeltaZone) ) throw new AssemblerException(root, "No location for state manangement (zone)"); String zoneLocationStr = getAsStringValue(root, pDeltaZone); zoneLocation = Location.create(zoneLocationStr);
graphName = getAsStringValue(root, pGraphName1) ; if ( root.hasProperty(pGraphName2) ) graphName = getAsStringValue(root, pGraphName2) ;
graphName = getAsStringValue(root, pGraphName1) ; if ( root.hasProperty(pGraphName2) ) graphName = getAsStringValue(root, pGraphName2) ;
Resource r = (Resource)n; String gName = GraphUtils.getAsStringValue(r, DatasetAssemblerVocab.pGraphName); Resource g = GraphUtils.getResourceValue(r, DatasetAssemblerVocab.pGraph); if ( g == null ) {