Search in sources :

Example 1 with GoGRDDLResourceRDFizer

use of com.thoughtworks.studios.shine.cruise.GoGRDDLResourceRDFizer in project gocd by gocd.

the class StageResourceImporter method importPipeline.

private void importPipeline(PipelineInstanceModel pipelineInstance, Graph graph, XSLTTransformerRegistry transformerRegistry, String baseUri) throws GoIntegrationException {
    final GoGRDDLResourceRDFizer pipeline = new GoGRDDLResourceRDFizer("pipeline", XSLTTransformerRegistry.CRUISE_PIPELINE_GRAPH_GRDDL_XSL, graph, transformerRegistry, xmlApiService);
    Graph pipelineGraph = pipeline.importURIUsingGRDDL(new PipelineXmlViewModel(pipelineInstance), baseUri);
    graph.addTriplesFromGraph(pipelineGraph);
}
Also used : PipelineXmlViewModel(com.thoughtworks.go.server.domain.xml.PipelineXmlViewModel) Graph(com.thoughtworks.studios.shine.semweb.Graph) GoGRDDLResourceRDFizer(com.thoughtworks.studios.shine.cruise.GoGRDDLResourceRDFizer)

Example 2 with GoGRDDLResourceRDFizer

use of com.thoughtworks.studios.shine.cruise.GoGRDDLResourceRDFizer in project gocd by gocd.

the class StageResourceImporter method loadIsolatedStageGraph.

private Graph loadIsolatedStageGraph(StageIdentifier stageIdentifier, TempGraphFactory tempGraphFactory, XSLTTransformerRegistry transformerRegistry, final Stage stageWithIdentifier, final String baseUri) throws GoIntegrationException {
    GoGRDDLResourceRDFizer stageRdfizer = new GoGRDDLResourceRDFizer("stage", XSLTTransformerRegistry.CRUISE_STAGE_GRAPH_GRDDL_XSL, tempGraphFactory, transformerRegistry, xmlApiService);
    Graph graph = stageRdfizer.importURIUsingGRDDL(new StageXmlViewModel(stageWithIdentifier), baseUri);
    if (!stageCompleted(graph)) {
        throw new CanNotImportABuildingStageException(stageIdentifier + " is not completed yet, can not load test details");
    }
    return graph;
}
Also used : Graph(com.thoughtworks.studios.shine.semweb.Graph) StageXmlViewModel(com.thoughtworks.go.server.domain.xml.StageXmlViewModel) GoGRDDLResourceRDFizer(com.thoughtworks.studios.shine.cruise.GoGRDDLResourceRDFizer)

Aggregations

GoGRDDLResourceRDFizer (com.thoughtworks.studios.shine.cruise.GoGRDDLResourceRDFizer)2 Graph (com.thoughtworks.studios.shine.semweb.Graph)2 PipelineXmlViewModel (com.thoughtworks.go.server.domain.xml.PipelineXmlViewModel)1 StageXmlViewModel (com.thoughtworks.go.server.domain.xml.StageXmlViewModel)1