Search in sources :

Example 1 with Endpoint

use of org.apache.jena.fuseki.server.Endpoint in project jena by apache.

the class JsonDescription method describe.

public static void describe(JsonBuilder builder, DataAccessPoint access) {
    builder.startObject();
    builder.key(JsonConst.dsName).value(access.getName());
    builder.key(JsonConst.dsState).value(access.getDataService().isAcceptingRequests());
    builder.key(JsonConst.dsService);
    builder.startArray();
    for (OperationName opName : access.getDataService().getOperations()) {
        List<Endpoint> endpoints = access.getDataService().getOperation(opName);
        describe(builder, opName, endpoints);
    }
    builder.finishArray();
    builder.finishObject();
}
Also used : Endpoint(org.apache.jena.fuseki.server.Endpoint) OperationName(org.apache.jena.fuseki.server.OperationName)

Example 2 with Endpoint

use of org.apache.jena.fuseki.server.Endpoint in project jena by apache.

the class FusekiBuilder method addServiceEP.

private static void addServiceEP(DataService dataService, OperationName opName, Resource svc, Property property) {
    String p = "<" + property.getURI() + ">";
    ResultSet rs = query("SELECT * { ?svc " + p + " ?ep}", svc.getModel(), "svc", svc);
    for (; rs.hasNext(); ) {
        QuerySolution soln = rs.next();
        String epName = soln.getLiteral("ep").getLexicalForm();
        Endpoint operation = new Endpoint(opName, epName);
        addServiceEP(dataService, opName, epName);
    //log.info("  " + opName.name + " = " + dataAccessPoint.getName() + "/" + epName) ;
    }
}
Also used : Endpoint(org.apache.jena.fuseki.server.Endpoint) QuerySolution(org.apache.jena.query.QuerySolution) ResultSet(org.apache.jena.query.ResultSet)

Example 3 with Endpoint

use of org.apache.jena.fuseki.server.Endpoint in project jena by apache.

the class JsonDescription method describe.

private static void describe(JsonBuilder builder, OperationName opName, List<Endpoint> endpoints) {
    builder.startObject();
    builder.key(JsonConst.srvType).value(opName.name());
    builder.key(JsonConst.srvDescription).value(opName.getDescription());
    builder.key(JsonConst.srvEndpoints);
    builder.startArray();
    for (Endpoint endpoint : endpoints) builder.value(endpoint.getEndpoint());
    builder.finishArray();
    builder.finishObject();
}
Also used : Endpoint(org.apache.jena.fuseki.server.Endpoint)

Aggregations

Endpoint (org.apache.jena.fuseki.server.Endpoint)3 OperationName (org.apache.jena.fuseki.server.OperationName)1 QuerySolution (org.apache.jena.query.QuerySolution)1 ResultSet (org.apache.jena.query.ResultSet)1