/** * Returns the menu with available scripts as GraphNode. * * @param resource The resource to which to attach the list. * @return {@link GraphNode} containing all available script resources. * */ @GET @Path("script-list") @Produces("text/plain") public GraphNode getScriptList( @QueryParam(value = "resource") UriRef uriRef) { return getScriptList((NonLiteral)uriRef); }
/** * Execution Uri overview page. * * @return A Graphnode containing a ExecutionUriOverviewPage. */ @GET @Path("execution-uri-overview") public GraphNode getExecutionUriOverview() { AccessController.checkPermission(new ScriptManagerAppPermission()); MGraph contentGraph = cgProvider.getContentGraph(); BNode resultResource = new BNode(); MGraph resultGraph = new SimpleMGraph(); resultGraph.add(new TripleImpl(resultResource, RDF.type, PLATFORM.HeadedPage)); resultGraph.add(new TripleImpl(resultResource, RDF.type, SCRIPTMANAGER.ExecutionUriOverviewPage)); GraphNode scriptList = getScriptList(resultResource); UnionMGraph unionGraph = new UnionMGraph(resultGraph, scriptList.getGraph(), contentGraph); return new GraphNode(resultResource, unionGraph); }
/** * The page that contains the install form. * * @return a Graphnode containing a ScriptManagerInstallPage. */ @GET @Path("script-install") public GraphNode install() { AccessController.checkPermission(new ScriptManagerAppPermission()); MGraph contentGraph = cgProvider.getContentGraph(); BNode resultResource = new BNode(); MGraph resultGraph = new SimpleMGraph(); resultGraph.add(new TripleImpl(resultResource, RDF.type, SCRIPTMANAGER.ScriptManagerInstallPage)); resultGraph.add(new TripleImpl(resultResource, RDF.type, PLATFORM.HeadedPage)); GraphNode languageList = getScriptLanguageList(resultResource); GraphNode scriptList = getScriptList(resultResource); UnionMGraph unionGraph = new UnionMGraph(resultGraph, scriptList.getGraph(), languageList.getGraph(), contentGraph); return new GraphNode(resultResource, unionGraph); }
RDF.type, SCRIPTMANAGER.ScriptManagerOverviewPage)); GraphNode scriptList = getScriptList(resultResource);