/** Get the content type of an action or return the default. * @param action * @return ContentType */ public static ContentType getContentType(HttpAction action) { return FusekiNetLib.getContentType(action.request) ; } }
public void setExistedBefore(boolean existedBefore) { if ( existedBefore ) setExistedBefore(PreState.EXISTED) ; else setExistedBefore(PreState.ABSENT) ; } public void setExistedBefore(PreState state) { this.state = state ; }
public static void loadGraph(Graph g, String uri, int limit) { readUtil(g, uri, limit) ; }
/** response to a upload operation of some kind. */ public static void uploadResponse(HttpAction action, UploadDetails details) { if ( details.getExistedBefore().equals(PreState.ABSENT) ) ServletOps.successCreated(action) ; else ServletOps.success(action) ; // successNoContent if empty body. JsonValue v = details.detailsJson() ; ServletOps.sendJson(action, v) ; } }
/** Set up logging - standalone and war packaging */ public static synchronized void setLogging() { setLogging(null); }
/** Retrun a free port */ public static int choosePort() { return FusekiNetLib.choosePort(); }
private static void assemblerFromUpload(HttpAction action, StreamRDF dest) { Upload.fileUploadWorker(action, dest); }
public String detailsStr() { return detailsStr(count, tripleCount, quadCount) ; }
public JsonValue detailsJson() { return detailsJson(count, tripleCount, quadCount) ; }
/** response to a upload operation of some kind. */ public static void uploadResponse(HttpAction action, UploadDetails details) { if ( details.getExistedBefore().equals(PreState.ABSENT) ) ServletOps.successCreated(action) ; else ServletOps.success(action) ; // successNoContent if empty body. JsonValue v = details.detailsJson() ; ServletOps.sendJson(action, v) ; } }
/** Get the content type of an action or return the default. * @param action * @return ContentType */ public static ContentType getContentType(HttpAction action) { return FusekiNetLib.getContentType(action.request) ; } }
/** Set up logging - standalone and war packaging */ public static synchronized void setLogging() { setLogging(null); }
/** Retrun a free port */ public static int choosePort() { return FusekiNetLib.choosePort(); }
private static void assemblerFromUpload(HttpAction action, StreamRDF dest) { Upload.fileUploadWorker(action, dest); }
public static void loadGraph(Graph g, String uri, int limit) { readUtil(g, uri, limit) ; }
public void setExistedBefore(boolean existedBefore) { if ( existedBefore ) setExistedBefore(PreState.EXISTED) ; else setExistedBefore(PreState.ABSENT) ; } public void setExistedBefore(PreState state) { this.state = state ; }
public String detailsStr() { return detailsStr(count, tripleCount, quadCount) ; }
public JsonValue detailsJson() { return detailsJson(count, tripleCount, quadCount) ; }
public static void loadModel(Model model, String uri, int limit) { Graph g = model.getGraph() ; readUtil(g, uri, limit) ; }
public static Graph readGraph(String uri, int limit) { Graph g = Factory.createGraphMem() ; readUtil(g, uri, limit) ; return g ; }