/** Test dc properties */ public void testClassDCProperites() { String[] props = classComment.listDCPropertyNames(); assertEquals(3, props.length); assertEquals("Ben Szekely", classComment.getDCProperty("creator")); assertEquals("Ski Title", classComment.getDCProperty("title")); assertEquals("Joe Betz", classComment.getDCProperty("contributor")); }
/** Test dc properties */ public void testPropDCProperites() { String[] props = propComment.listDCPropertyNames(); assertEquals(3, props.length); assertEquals("Ben Szekely", propComment.getDCProperty("creator")); assertEquals("Manufacturer Title", propComment.getDCProperty("title")); assertEquals("Joe Betz", propComment.getDCProperty("contributor")); }
/** Test rdfs properties */ public void testClassRDFSProperties() { String[] props = classComment.listRDFSPropertyNames(); assertEquals(3, props.length); assertEquals( "This class represents the base ontology class for describing skis", classComment.getRDFSProperty("comment")); assertEquals("Ski Class", classComment.getRDFSProperty("label")); }
/** Test RDFS properties */ public void testPropRDFSProperties() { String[] props = propComment.listRDFSPropertyNames(); assertEquals(2, props.length); assertEquals( "This property indicates the manufacturer of the ski", propComment.getRDFSProperty("comment")); assertEquals("Manufacturer", propComment.getRDFSProperty("label")); }
@Override protected void setUp() throws Exception { super.setUp(); ctx = new JastorContext(); ctx.addOntologyToGenerate( ReadWriteUtils.createSmartFileReader("src/test/resources/ski.owl"), "http://jastor.openanzo.org/testonts/Ski", "org.openanzo.rdf.jastor.test.ski"); INamedGraph gm = ctx.getOntGraph(); Class twintip = OWL11Factory.getClass("http://jastor.openanzo.org/testonts/classes#Ski", gm); classComment = OntologyComment.getOntologyComment(gm, twintip.resource()); _Property manufacturer = OWL11Factory.getDatatypeProperty( "http://jastor.openanzo.org/testonts/predicates#manufacturer", gm); propComment = OntologyComment.getOntologyComment(gm, manufacturer.resource()); Ontology pkg = ctx.listOntologiesToGenerate().get(0); pkgComment = pkg.getComment(); }
/** Test property authors */ public void testPropAuthors() { List<String> authors = propComment.getAuthors(); assertTrue(authors.contains("Ben Szekely")); assertTrue(authors.contains("Joe Betz")); }
/** Test property label */ public void testPropLabel() { assertEquals("Manufacturer", propComment.getLabel()); }
/** Test class label */ public void testClassLabel() { assertEquals("Ski Class", classComment.getLabel()); }
/** Test package label */ public void testPkgLabel() { assertEquals("Ski Ontology", pkgComment.getLabel()); }