/** Calculate the bNode closure from a resource. * The Statement itself does not automatically get included. * @param resource Starting point for the closure. * @param testThisNode Indicate whether to apply the closure test to the Resource argument. * @return A model containing statements */ public static Model closure(Resource resource, boolean testThisNode) { return closure(resource, new ClosureBNode(), testThisNode) ; }
public static Class<?> loadClass(String uri, Class<?> expectedClass) { String mappedUri = mapDynamicURI(uri); if (mappedUri == null) return null; return ClsLoader.loadClass(mappedUri, expectedClass); }
/** Set the XML style sheet processing instruction {@code <?xml-stylesheet...>}. * Set to null to not use a stylesheet. */ public static void setStylesheetURL(Context cxt, String stylesheetURL) { cxt.set(ResultSetWriterXML.xmlStylesheet, stylesheetURL); }
public static StageGenerator getGenerator(Context context) { if ( context == null ) return null ; return (StageGenerator)context.get(ARQ.stageGenerator) ; }
/** * Return a copy of this context. Modifications of the copy do not affect * the original context. */ public Context copy() { return new Context(this) ; }
public TypeNotUniqueException(Resource type) { super("Multiple types for "+FmtUtils.stringForResource(type)) ; } }
@Override public String toString() { return symbol.getSymbol() ; } }
public UpdateProcessorBase(UpdateRequest request, DatasetGraph datasetGraph, Binding inputBinding, Context context, UpdateEngineFactory factory) { this.request = request ; this.datasetGraph = datasetGraph ; this.inputBinding = inputBinding; this.context = Context.setupContextExec(context, datasetGraph) ; this.factory = factory ; }
/** * Look up a short name for a result set FMT_ * * @param s * Short name * @return ResultSetFormat */ public static ResultsFormat lookup(String s) { return names.lookup(s); }
public NotUniqueException( Resource root, Property property ) { super( makeMessage( root, property ) ); this.property = property; }
@Override public int hashCode() { final int prime = 31 ; int result = 1 ; result = prime * result + ((symbol == null) ? 0 : symbol.hashCode()) ; return result ; }
/** Calculate the bNode closure from a statement . * The Statement itself does not automatically get included. * @param statement Starting point for the closure. * @param model Add the statements to this model * @return A model containing statements * @see ClosureTest */ public static Model closure(Statement statement, Model model) { return closure(statement, new ClosureBNode(), model) ; }
public static void setFilter(Context context, Predicate<Tuple<NodeId>> filter) { context.set(SystemTDB.symTupleFilter, filter) ; } }
/** Calculate the bNode closure from a statement . * The Statement itself does not automatically get included. * @param stmt * @return A model containing statements */ public static Model closure(Statement stmt) { return closure(stmt, new ClosureBNode()) ; }
/** Calculate the bNode closure from a resource . * The Statement itself does not automatically get included. * @param resource * @param testThisNode Indicate whether to apply the closure test to the Resource argument. * @param results Add the statements to this model * @return A model containing statements */ public static Model closure(Resource resource, boolean testThisNode, Model results) { return closure(resource, new ClosureBNode(), testThisNode, results) ; }