/** * Adds the test inputs to the TestRun resource. Each input is an anonymous * member of an unordered collection (rdf:Bag). A {@value #TEST_RUN_ID} * parameter is treated in special manner: its value is set as the value of * the standard dct:identifier property. * * @param earl * An RDF model containing EARL statements. * @param params * A collection of name-value pairs gleaned from the test suite * parameters. */ void addTestInputs(Model earl, final Map<String, String> params) { Bag inputs = earl.createBag(); for (Map.Entry<String, String> param : params.entrySet()) { if (param.getKey().equals(TEST_RUN_ID)) { this.testRun.addProperty(DCTerms.identifier, param.getValue()); } else { if (param.getValue().isEmpty()) continue; Resource testInput = earl.createResource(); testInput.addProperty(DCTerms.title, param.getKey()); testInput.addProperty(DCTerms.description, param.getValue()); inputs.add(testInput); } } this.testRun.addProperty(CITE.inputs, inputs); }
@Override public Bag createBag(String uri) { return (Bag) getBag(uri).addProperty( RDF.type, RDF.Bag ); }
public void testCreateNamedBag() { final String uri = "http://aldabaran/foo"; final Bag tv = model.createBag(uri); Assert.assertEquals(uri, tv.getURI()); Assert.assertTrue(model.contains(tv, RDF.type, RDF.Bag)); }
public void testCreateAnonBag() { final Bag tv = model.createBag(); Assert.assertTrue(tv.isAnon()); Assert.assertTrue(model.contains(tv, RDF.type, RDF.Bag)); }
@Override public SecuredBag getBag(final int index) throws ReadDeniedException, AuthenticationRequiredException { checkRead(); final Bag b = holder.getBaseItem().getBag(index); checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index) .asNode(), b.asNode())); return SecuredBagImpl.getInstance(getModel(), b); }
public void testCreateNamedBag() { final String uri = "http://aldabaran/foo"; final Bag tv = model.createBag(uri); Assert.assertEquals(uri, tv.getURI()); Assert.assertTrue(model.contains(tv, RDF.type, RDF.Bag)); }
public void testCreateAnonBag() { final Bag tv = model.createBag(); Assert.assertTrue(tv.isAnon()); Assert.assertTrue(model.contains(tv, RDF.type, RDF.Bag)); }
/** * This method is used to add test inputs in to earl report. * * @param earl * Model object to add the result into it. * @param params * The variable is type of Map with all the user input. */ private void addTestInputs( Model earl, Map<String, String> params ) { Bag inputs = earl.createBag(); if ( !params.equals( "" ) && params != null ) { String value = ""; for ( String key : params.keySet() ) { value = params.get( key ); Resource testInputs = earl.createResource(); testInputs.addProperty( DCTerms.title, key ); testInputs.addProperty( DCTerms.description, value ); inputs.add( testInputs ); } } this.testRun.addProperty( CITE.inputs, inputs ); }
@Override public Bag createBag(String uri) { return (Bag) getBag(uri).addProperty( RDF.type, RDF.Bag ); }
public void testGetBag() { final String uri = "http://aldabaran.hpl.hp.com/rdf/test4/" + 150; model.createBag(uri); final Bag b = model.getBag(uri); Assert.assertEquals(uri, b.getURI()); Assert.assertTrue(model.contains(b, RDF.type, RDF.Bag)); }
/** * This method is used to add test inputs in to earl report. * * @param earl * Model object to add the result into it. * @param params * The variable is type of Map with all the user input. */ private void addTestInputs( Model earl, Map<String, String> params ) { Bag inputs = earl.createBag(); if ( !params.equals( "" ) && params != null ) { String value = ""; for ( String key : params.keySet() ) { value = params.get( key ); Resource testInputs = earl.createResource(); testInputs.addProperty( DCTerms.title, key ); testInputs.addProperty( DCTerms.description, value ); inputs.add( testInputs ); } } this.testRun.addProperty( CITE.inputs, inputs ); }
bag1.addProperty(OWL.differentFrom, bag2); Resource molecule = aBox.createResource(); molecule.addProperty(molecule2atomOntProperty, bag1);
public void testGetBag() { final String uri = "http://aldabaran.hpl.hp.com/rdf/test4/" + 150; model.createBag(uri); final Bag b = model.getBag(uri); Assert.assertEquals(uri, b.getURI()); Assert.assertTrue(model.contains(b, RDF.type, RDF.Bag)); }
@Override @Before public void setup() { super.setup(); final Bag bag = baseModel.getBag("http://example.com/testContainer"); bag.add("SomeDummyItem"); setSecuredRDFNode(SecuredBagImpl.getInstance(securedModel, bag), bag); }
bag1.addProperty(OWL.differentFrom, bag2); Resource molecule = aBox.createResource(); molecule.addProperty(molecule2atomOntProperty, bag1);
@BeforeClass public static void beforeClass() { Model m = ModelFactory.createModelForGraph(graph1) ; Bag bag0 = m.createBag(base+"node0") ; Bag bag1 = m.createBag(base+"node1") ; Seq seq2 = m.createSeq(base+"node2") ; bag1.add("elt1") ; seq2.add("elt1") ; seq2.add("elt2") ; }