AccessController.checkPermission(new ScriptManagerAppPermission());
MGraph contentGraph = cgProvider.getContentGraph();
BNode resultResource = new BNode();
MGraph resultGraph = new SimpleMGraph();
GraphNode scriptNode = null;
if(script != null){
scriptNode = getScript(script);
resultGraph.add(new TripleImpl(resultResource,
SCRIPTMANAGER.script,
scriptNode.getNode()));
}
resultGraph.add(new TripleImpl(resultResource,
RDF.type,
PLATFORM.HeadedPage));
resultGraph.add(new TripleImpl(resultResource,
RDF.type,
SCRIPTMANAGER.ScriptManagerOverviewPage));
GraphNode scriptList = getScriptList(resultResource);
UnionMGraph unionGraph = null;
if(scriptNode != null){
unionGraph = new UnionMGraph(resultGraph, scriptList.getGraph(),
scriptNode.getGraph(), contentGraph);
} else {
unionGraph = new UnionMGraph(resultGraph, scriptList.getGraph(),
contentGraph);
}
return new GraphNode(resultResource, unionGraph);
}