use of org.apache.jena.fuseki.server.DatasetRef in project jena by apache.
the class MgtFunctions method serviceGraphRead.
/** Return a SPARQL Graph Store Protocol (Read) service name for the dataset */
public static String serviceGraphRead(String dataset) {
String dft = "get";
DatasetRef ref = getFromRegistry(dataset);
if (ref == null)
return dft;
return serviceNameOrDefault(ref.readGraphStore, dft);
}
use of org.apache.jena.fuseki.server.DatasetRef in project jena by apache.
the class MgtFunctions method serviceUpload.
/** Return a SPARQL upload service name for the dataset */
public static String serviceUpload(String dataset) {
String dft = "upload";
DatasetRef ref = getFromRegistry(dataset);
if (ref == null)
return dft;
return serviceNameOrDefault(ref.upload, dft);
}
use of org.apache.jena.fuseki.server.DatasetRef in project jena by apache.
the class MgtFunctions method serviceUpdate.
/** Return a SPARQL update service name for the dataset */
public static String serviceUpdate(String dataset) {
String dft = "update";
DatasetRef ref = getFromRegistry(dataset);
if (ref == null)
return dft;
return serviceNameOrDefault(ref.update, dft);
}
use of org.apache.jena.fuseki.server.DatasetRef in project jena by apache.
the class MgtFunctions method serviceGraphReadWrite.
/** Return a SPARQL Graph Store Protocol (Read-Write) service name for the dataset */
public static String serviceGraphReadWrite(String dataset) {
String dft = "data";
DatasetRef ref = getFromRegistry(dataset);
if (ref == null)
return dft;
return serviceNameOrDefault(ref.readWriteGraphStore, dft);
}
use of org.apache.jena.fuseki.server.DatasetRef in project jena by apache.
the class MgtFunctions method prefixes.
/** Return prefixes for the datasets, SPARQL syntax. */
public static String prefixes(HttpServletRequest request) {
String dsName = dataset(request);
DatasetRef desc = getFromRegistry(dsName);
if (desc == null)
return "<not found>";
DatasetGraph dsg = desc.dataset;
if (dsg instanceof DatasetGraphTDB) {
PrefixMapping pmap = ((DatasetGraphTDB) dsg).getPrefixes().getPrefixMapping();
Prologue prologue = new Prologue(pmap);
IndentedLineBuffer buff = new IndentedLineBuffer();
PrologueSerializer.output(buff, prologue);
buff.append("\n");
return buff.asString();
}
return "";
}
Aggregations