use of org.apache.jena.fuseki.FusekiConfigException in project jena by apache.
the class FusekiServer method writeableDirectory.
private static Path writeableDirectory(Path root, String relName) {
Path p = makePath(root, relName);
ensureDir(p);
if (!Files.isWritable(p))
throw new FusekiConfigException("Not writable: " + p);
return p;
}
use of org.apache.jena.fuseki.FusekiConfigException in project jena by apache.
the class FusekiConfig method getOne.
private static RDFNode getOne(Resource svc, String property) {
String ln = property.substring(property.indexOf(':') + 1);
ResultSet rs = query("SELECT * { ?svc " + property + " ?x}", svc.getModel(), "svc", svc);
if (!rs.hasNext())
throw new FusekiConfigException("No " + ln + " for service " + nodeLabel(svc));
RDFNode x = rs.next().get("x");
if (rs.hasNext())
throw new FusekiConfigException("Multiple " + ln + " for service " + nodeLabel(svc));
return x;
}
Aggregations