Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.SWRLVariable


    @Test
    public void shouldDoCompleteRoundtripManchesterOWLSyntax() throws Exception {
        OWLClass a = Class(IRI(NS + "#A"));
        OWLDataProperty p = df.getOWLDataProperty(IRI(NS + "#P"));
        SWRLVariable x = df.getSWRLVariable(IRI(NS + "#X"));
        SWRLVariable y = df.getSWRLVariable(IRI(NS + "#Y"));
        OWLOntology ontology = m.createOntology(IRI(NS));
        Set<SWRLAtom> body = new TreeSet<>();
        body.add(df.getSWRLDataPropertyAtom(p, x, y));
        body.add(df.getSWRLDataRangeAtom(
                df.getOWLDatatype(XSDVocabulary.STRING.getIRI()), y));
View Full Code Here


     */
    @Nonnull
    OWLOntology prepareOntology() throws OWLOntologyCreationException {
        OWLClass a = Class(IRI(NS + "#A"));
        OWLDataProperty p = df.getOWLDataProperty(IRI(NS + "#P"));
        SWRLVariable x = df.getSWRLVariable(IRI(NS + "#X"));
        SWRLVariable y = df.getSWRLVariable(IRI(NS + "#Y"));
        OWLOntology ontology = m.createOntology(IRI(NS));
        Set<SWRLAtom> body = new TreeSet<>();
        body.add(df.getSWRLDataPropertyAtom(p, x, y));
        body.add(df.getSWRLDataRangeAtom(
                df.getOWLDatatype(XSDVocabulary.STRING.getIRI()), y));
View Full Code Here

            return true;
        }
        if (!(obj instanceof SWRLVariable)) {
            return false;
        }
        SWRLVariable other = (SWRLVariable) obj;
        return other.getIRI().equals(this.getIRI());
    }
View Full Code Here

  }

  @Test
  public void ruleBuiltinTest3() throws Exception {

    SWRLVariable y = SWRL.variable( ontologyURI + "year" );
    SWRLVariable m = SWRL.variable( ontologyURI + "month" );
    SWRLVariable d = SWRL.variable( ontologyURI + "day" );

    OWLDataProperty year = OWL.DataProperty( ontologyURI + "year" );
    OWLDataProperty month = OWL.DataProperty( ontologyURI + "month" );
    OWLDataProperty day = OWL.DataProperty( ontologyURI + "day" );
View Full Code Here

    OWLIndividual individualA = OWL.Individual( "a" );
    OWLClassExpression classC = OWL.Class( "C" );
    OWLClassExpression classD = OWL.Class( "D" );
    OWLClassExpression classE = OWL.Class( "E" );
    OWLObjectProperty propertyP = OWL.ObjectProperty( "p" );
    SWRLVariable variable = SWRL.variable( "x" );

    OWLObjectSomeValuesFrom restriction = OWL.some( propertyP, classD );

    // C(?x)
    bodyAtoms.add( SWRL.classAtom( classC, variable ) );
View Full Code Here

  }

  @Test
  public void ruleBuiltinTest3() throws Exception {

    SWRLVariable y = SWRL.variable( ontologyURI + "year" );
    SWRLVariable m = SWRL.variable( ontologyURI + "month" );
    SWRLVariable d = SWRL.variable( ontologyURI + "day" );

    OWLDataProperty year = OWL.DataProperty( ontologyURI + "year" );
    OWLDataProperty month = OWL.DataProperty( ontologyURI + "month" );
    OWLDataProperty day = OWL.DataProperty( ontologyURI + "day" );
View Full Code Here

    OWLIndividual individualA = OWL.Individual( "a" );
    OWLClassExpression classC = OWL.Class( "C" );
    OWLClassExpression classD = OWL.Class( "D" );
    OWLClassExpression classE = OWL.Class( "E" );
    OWLObjectProperty propertyP = OWL.ObjectProperty( "p" );
    SWRLVariable variable = SWRL.variable( "x" );

    OWLObjectSomeValuesFrom restriction = OWL.some( propertyP, classD );

    // C(?x)
    bodyAtoms.add( SWRL.classAtom( classC, variable ) );
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.model.SWRLVariable

Copyright © 2018 www.massapicom. 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.