Esempio n. 1
0
 /** 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"));
 }
Esempio n. 2
0
 /** 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"));
 }
Esempio n. 3
0
 /** 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"));
 }
Esempio n. 4
0
 /** 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"));
 }
Esempio n. 5
0
 @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();
 }
Esempio n. 6
0
 /** Test property authors */
 public void testPropAuthors() {
   List<String> authors = propComment.getAuthors();
   assertTrue(authors.contains("Ben Szekely"));
   assertTrue(authors.contains("Joe Betz"));
 }
Esempio n. 7
0
 /** Test property label */
 public void testPropLabel() {
   assertEquals("Manufacturer", propComment.getLabel());
 }
Esempio n. 8
0
 /** Test class label */
 public void testClassLabel() {
   assertEquals("Ski Class", classComment.getLabel());
 }
Esempio n. 9
0
 /** Test package label */
 public void testPkgLabel() {
   assertEquals("Ski Ontology", pkgComment.getLabel());
 }