Schema { public static boolean isSchemaTriple(Statement triple) { IRI pred = triple.getPredicate(); if (schemaPredicates.contains(pred)) { return true; } else if (pred.equals(RDF.TYPE)) { if (schemaTypes.contains(triple.getObject())) { return true; } } return false; } Schema(); static boolean isSchemaTriple(Statement triple); OwlClass getClass(Resource c); OwlClass getClass(Value c); OwlProperty getProperty(IRI p); OwlProperty getProperty(Value p); boolean hasProperty(IRI r); boolean hasClass(Resource r); boolean hasRestriction(Resource r); void processTriple(Statement triple); void closure(); boolean containsTriple(Statement triple); String getSummary(); String explainRestriction(Resource type);  }
@Test public void testRejectClassAssertion() throws Exception { Assert.assertFalse(Schema.isSchemaTriple(TestUtils.statement( lubm("TeachingAssistant"), RDF.TYPE, OWL.CLASS))); }
@Test public void testRejectObjectPropertyAssertion() throws Exception { Assert.assertFalse(Schema.isSchemaTriple(TestUtils.statement( lubm("researchProject"), RDF.TYPE, OWL.OBJECTPROPERTY))); }
@Test public void testRejectDatatypePropertyAssertion() throws Exception { Assert.assertFalse(Schema.isSchemaTriple(TestUtils.statement( lubm("researchInterest"), RDF.TYPE, OWL.DATATYPEPROPERTY))); }
@Test public void testAcceptSubclass() throws Exception { Assert.assertTrue(Schema.isSchemaTriple(TestUtils.statement( lubm("Lecturer"), RDFS.SUBCLASSOF, lubm("Faculty")))); }
@Test public void testAcceptSubproperty() throws Exception { Assert.assertTrue(Schema.isSchemaTriple(TestUtils.statement( lubm("mastersDegreeFrom"), RDFS.SUBPROPERTYOF, lubm("degreeFrom")))); }
@Test public void testAcceptDomain() throws Exception { Assert.assertTrue(Schema.isSchemaTriple(TestUtils.statement( lubm("degreeFrom"), RDFS.DOMAIN, lubm("Person")))); }
@Test public void testAcceptRange() throws Exception { Assert.assertTrue(Schema.isSchemaTriple(TestUtils.statement( lubm("degreeFrom"), RDFS.RANGE, lubm("University")))); }
@Test public void testAcceptInverse() throws Exception { Assert.assertTrue(Schema.isSchemaTriple(TestUtils.statement( lubm("degreeFrom"), OWL.INVERSEOF, lubm("hasAlumnus")))); }