Package org.semanticweb.owl.model

Examples of org.semanticweb.owl.model.OWLIndividual


        super(consumer);
        this.predicate = predicate;
    }

    public void handleTriple(URI subject, URI predicate, OWLConstant object) throws OWLException {
        OWLIndividual subj = getDataFactory().getOWLIndividual(subject);
        OWLDataProperty prop = getDataFactory().getOWLDataProperty(predicate);
        addAxiom(getDataFactory().getOWLDataPropertyAssertionAxiom(subj, prop, object));
    }
View Full Code Here


        super(consumer, SKOSVocabulary.CONCPET.getURI());
    }


    public void handleTriple(URI subject, URI predicate, URI object) throws OWLException {
        OWLIndividual ind = getDataFactory().getOWLIndividual(subject);
        OWLClass skosConcept = getDataFactory().getOWLClass(SKOSVocabulary.CONCPET.getURI());
        addAxiom(getDataFactory().getOWLClassAssertionAxiom(ind, skosConcept));
    }
View Full Code Here

        super(consumer, predicate.getURI());
    }


    public void handleTriple(URI subject, URI predicate, URI object) throws OWLException {
        OWLIndividual subj = getDataFactory().getOWLIndividual(subject);
        OWLIndividual obj = getDataFactory().getOWLIndividual(object);
        OWLObjectProperty prop = getDataFactory().getOWLObjectProperty(predicate);
        addAxiom(getDataFactory().getOWLObjectPropertyAssertionAxiom(subj, prop, obj));
    }
View Full Code Here

        URI hasValueObject = getResourceObject(mainNode, OWLRDFVocabulary.OWL_HAS_VALUE.getURI(), true);
        if (hasValueObject == null) {
            throw new MalformedDescriptionException(OWLRDFVocabulary.OWL_HAS_VALUE + " triple not present");
        }
        OWLObjectPropertyExpression prop = translateOnProperty(mainNode);
        OWLIndividual ind = getConsumer().getOWLIndividual(hasValueObject);
        getConsumer().addIndividual(ind.getURI());
        return getDataFactory().getOWLObjectValueRestriction(prop, ind);
    }
View Full Code Here

        final URI sourceIndividualURI = getConsumer().getResourceObject(subject,
                OWLRDFVocabulary.OWL_SOURCE_INDIVIDUAL.getURI(), true);
        if( sourceIndividualURI == null ) {
            throw new OWLRDFXMLParserMalformedNodeException("missing owl:sourceIndividual triple");
        }
        final OWLIndividual sourceIndividual = translateIndividual(sourceIndividualURI);
        final URI assertionPropertyURI = getConsumer().getResourceObject(subject,
                OWLRDFVocabulary.OWL_ASSERTION_PROPERTY.getURI(), true);
        if( assertionPropertyURI == null ) {
            throw new OWLRDFXMLParserMalformedNodeException("missing owl:assertionProperty triple");
        }
        URI targetIndividualURI = getConsumer().getResourceObject(subject,
                OWLRDFVocabulary.OWL_TARGET_INDIVIDUAL.getURI(), true);
        OWLConstant targetValue = getConsumer().getLiteralObject(subject,
                OWLRDFVocabulary.OWL_TARGET_VALUE.getURI(), true);
        OWLAxiom ax;
        if( targetIndividualURI != null ) {
            if( targetValue != null ) {
                throw new OWLRDFXMLParserMalformedNodeException(
                        "owl:targetIndividual and owl:targetValue triples with the same subject");
            }
            final OWLObjectPropertyExpression assertionProperty = translateObjectProperty(assertionPropertyURI);
            final OWLIndividual targetIndividual = translateIndividual(targetIndividualURI);
            ax = getDataFactory().getOWLNegativeObjectPropertyAssertionAxiom(sourceIndividual,
                    assertionProperty, targetIndividual);
        }
        else {
            if( targetValue == null ) {
View Full Code Here

 
  private void _addOwlChange(URI conceptUri, String id, String description,
      String canonicalUnits, String grib, String amip) {
   
    OWLIndividual conceptOwlIndiv = owlDataFactory.getOWLIndividual(conceptUri);
   
    // rdfs:label
    if ( id.trim().length() > 0 ) {
      OWLTypedConstant owlc = owlDataFactory.getOWLTypedConstant(id.trim());
      OWLDataPropertyAssertionAxiom addProp = owlDataFactory.getOWLDataPropertyAssertionAxiom(
View Full Code Here

      else if( object instanceof OWLDataProperty ) {
        OWLDataProperty p = (OWLDataProperty) object;
        axiom = factory.getOWLSubDataPropertyAxiom( p, p );
      }
      else if( object instanceof OWLIndividual ) {
        OWLIndividual ind = (OWLIndividual) object;
        axiom = factory.getOWLClassAssertionAxiom( ind, factory.getOWLThing() );
      }
      if( axiom != null )
        axiom.accept( atermConverter );
View Full Code Here

    OWLClass OlderThan10 = Class( ns + "OlderThan10" );
    OWLClass YoungerThan20 = Class( ns + "YoungerThan20" );
    OWLClass Teenager = Class( ns + "Teenager" );
    OWLClass Teen = Class( ns + "Teen" );

    OWLIndividual ind1 = Individual( ns + "ind1" );
    OWLIndividual ind3 = Individual( ns + "ind3" );
    OWLIndividual ind4 = Individual( ns + "ind4" );
    OWLIndividual ind5 = Individual( ns + "ind5" );
    OWLIndividual ind6 = Individual( ns + "ind6" );

    OWLObjectProperty p = ObjectProperty( ns + "p" );
    OWLObjectProperty r = ObjectProperty( ns + "r" );
    OWLObjectProperty invR = ObjectProperty( ns + "invR" );
    OWLObjectProperty ir = ObjectProperty( ns + "ir" );
View Full Code Here

    OWLOntology ont = loadOntology( base + "uncle.owl" );

    Reasoner reasoner = new Reasoner( OWL.manager );
    reasoner.setOntology( ont );

    OWLIndividual Bob = Individual( ns + "Bob" );
    OWLIndividual Sam = Individual( ns + "Sam" );

    OWLObjectProperty uncleOf = ObjectProperty( ns + "uncleOf" );

    assertPropertyValues( reasoner, Bob, uncleOf, Sam );
  }
View Full Code Here

    OWLOntology ont = loadOntology( base + "sibling.owl" );

    Reasoner reasoner = new Reasoner( OWL.manager );
    reasoner.setOntology( ont );

    OWLIndividual Bob = Individual( ns + "Bob" );
    OWLIndividual John = Individual( ns + "John" );
    OWLIndividual Jane = Individual( ns + "Jane" );

    OWLObjectProperty hasBrother = ObjectProperty( ns + "hasBrother" );
    OWLObjectProperty hasSister = ObjectProperty( ns + "hasSister" );

    assertPropertyValues( reasoner, Bob, hasBrother, John );
View Full Code Here

TOP

Related Classes of org.semanticweb.owl.model.OWLIndividual

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.