Package com.hp.hpl.jena.ontology

Examples of com.hp.hpl.jena.ontology.OntModel.validate()


    model.prepare();

    model.add( p, RDF.type, OWL.InverseFunctionalProperty );
    model.add( a, OWL.differentFrom, d );

    assertFalse( model.validate().isValid() );
  }

  @Test
  public void testInverse() {
    String ns = "http://www.example.org/test#";
View Full Code Here


    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
    model.read( base + "float_test.owl" );

    model.prepare();

    assertTrue( model.validate().isValid() );

    OntClass ThingWithFloatValue = model.getOntClass( ns + "ThingWithFloatValue" );
    OntClass ThingWithFloatProbability = model.getOntClass( ns + "ThingWithProbabilityValue" );

    Individual exampleThingWithFloatValue = model.getIndividual( ns
View Full Code Here

    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
    model.read( base + "decimal_test.owl" );

    model.prepare();

    assertTrue( model.validate().isValid() );

    OntClass ThingWithDecimalValue = model.getOntClass( ns + "ThingWithDecimalValue" );
    OntClass ThingWithDecimalProbability = model.getOntClass( ns
        + "ThingWithDecimalProbability" );
    OntClass ThingWithIntegerValue = model.getOntClass( ns + "ThingWithIntegerValue" );
View Full Code Here

      }
    }

    model.prepare();

    assertTrue( model.validate().isValid() );
  }

  @Test
  public void testBuiltinDatatypesWithInvalidValues() {
    String ns = "urn:test:";
View Full Code Here

          Literal value = model.createTypedLiteral( (String) datatypes[i], datatype
              .getURI() );
          ind.addProperty( p, value );

          assertFalse( value.getLexicalForm() + " should not belong to "
              + datatype.getLocalName(), model.validate().isValid() );
          i++;
        }
      }
    }
  }
View Full Code Here

    model.prepare();

    model.add( a, r, model.createLiteral( "l" ) );
    model.add( a, r, model.createResource() );

    assertTrue( model.validate().isValid() );

    model.prepare();

    model.add( p, RDF.type, OWL.FunctionalProperty );
    model.add( b, OWL.differentFrom, c );
View Full Code Here

    model.add( p, RDF.type, OWL.FunctionalProperty );
    model.add( b, OWL.differentFrom, c );

    model.prepare();

    assertFalse( model.validate().isValid() );

    model.remove( b, OWL.differentFrom, c );

    assertTrue( model.validate().isValid() );
View Full Code Here

    assertFalse( model.validate().isValid() );

    model.remove( b, OWL.differentFrom, c );

    assertTrue( model.validate().isValid() );

    model.prepare();

    model.add( p, RDF.type, OWL.InverseFunctionalProperty );
    model.add( a, OWL.differentFrom, d );
View Full Code Here

    model.prepare();

    model.add( p, RDF.type, OWL.InverseFunctionalProperty );
    model.add( a, OWL.differentFrom, d );

    assertFalse( model.validate().isValid() );
  }

  @Test
  public void testInverse() {
    String ns = "http://www.example.org/test#";
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.