@Test public void testAssembleOneGraphSignature() throws Exception { Dataset testDataset = TestSigningUtils.prepareTestDatasetFromNamedGraphs(RESOURCE_FILE, new String[] { ATOM_CORE_DATA_URI }); GraphCollection gc = ModelConverter.modelToGraphCollection(ATOM_CORE_DATA_URI, testDataset); SignatureData mockSigData = createMockSignature(); gc.setSignature(mockSigData); WonAssembler.assemble(gc, testDataset, ATOM_CORE_DATA_SIG_URI); List<String> namesList = RdfUtils.getModelNames(testDataset); Assert.assertEquals("should be one named graph with data and one named graph with signature", 2, namesList.size()); Assert.assertTrue("should be some triples in signature graph", testDataset.getNamedModel(ATOM_CORE_DATA_SIG_URI).listStatements().hasNext()); Assert.assertFalse(testDataset.getDefaultModel().listStatements().hasNext()); int triplesCounter = TestSigningUtils .countTriples(testDataset.getNamedModel(ATOM_CORE_DATA_SIG_URI).listStatements()); Set<String> subjs = TestSigningUtils.getSubjects(testDataset.getNamedModel(ATOM_CORE_DATA_SIG_URI)); Set<String> objs = TestSigningUtils.getUriResourceObjects(testDataset.getNamedModel(ATOM_CORE_DATA_SIG_URI)); Assert.assertEquals("signature graph should contain 11 triples", 11, triplesCounter); Assert.assertTrue("signed graph name should be an object in signature triples", objs.contains(ATOM_CORE_DATA_URI)); Assert.assertTrue("signature graph name should be a subject in signature triples", subjs.contains(ATOM_CORE_DATA_SIG_URI)); }
@Deprecated public static void assemble(GraphCollection namedSignedGraph, Dataset graphOrigin) throws Exception { Ontology o = prepareSignatureOntology(namedSignedGraph); verifyGraphCollectionContainsExactlyOneNamedGraph(namedSignedGraph); addSignatureTriplesToOrigin(namedSignedGraph, o, graphOrigin); }
WonAssembler { @Deprecated public static void assemble(GraphCollection namedSignedGraph, Dataset graphOrigin) throws Exception { Ontology o = prepareSignatureOntology(namedSignedGraph); verifyGraphCollectionContainsExactlyOneNamedGraph(namedSignedGraph); addSignatureTriplesToOrigin(namedSignedGraph, o, graphOrigin); } }
WonAssembler { @Deprecated public static void assemble(GraphCollection namedSignedGraph, Dataset graphOrigin) throws Exception { Ontology o = prepareSignatureOntology(namedSignedGraph); verifyGraphCollectionContainsExactlyOneNamedGraph(namedSignedGraph); addSignatureTriplesToOrigin(namedSignedGraph, o, graphOrigin); }  }
WonAssembler { @Deprecated public static void assemble(GraphCollection namedSignedGraph, Dataset graphOrigin) throws Exception { Ontology o = prepareSignatureOntology(namedSignedGraph); verifyGraphCollectionContainsExactlyOneNamedGraph(namedSignedGraph); addSignatureTriplesToOrigin(namedSignedGraph, o, graphOrigin); }  @Deprecated static void assemble(GraphCollection namedSignedGraph, Dataset graphOrigin); static void assemble(GraphCollection namedSignedGraph, Dataset graphOrigin, String sigGraphURI); static void removeSignatureGraphs(Dataset dataset); }
WonAssembler { @Deprecated public static void assemble(GraphCollection namedSignedGraph, Dataset graphOrigin) throws Exception { Ontology o = prepareSignatureOntology(namedSignedGraph); verifyGraphCollectionContainsExactlyOneNamedGraph(namedSignedGraph); addSignatureTriplesToOrigin(namedSignedGraph, o, graphOrigin); }  @Deprecated static void assemble(GraphCollection namedSignedGraph, Dataset graphOrigin); static void assemble(GraphCollection namedSignedGraph, Dataset graphOrigin, String sigGraphURI); static void removeSignatureGraphs(Dataset dataset);  }