Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLDataFactory


      removePropertyValue(prop,o);
    }
  }

  public void removePropertyValue(IProperty prop, Object value) {
    OWLDataFactory df = getOWLDataFactory();
    OWLIndividual subj = getOWLIndividual();
    if(prop.isAnnotationProperty()){
      super.removePropertyValue(prop, value);
    }else if(prop.isDatatypeProperty()){
      OWLDataProperty dp = (OWLDataProperty)convertOntologyObject(prop);
      OWLLiteral dl = (OWLLiteral)convertOntologyObject(value);
      removeAxiom(df.getOWLDataPropertyAssertionAxiom(dp,subj,dl));
    }else if(prop.isObjectProperty()){
      OWLObjectProperty op = (OWLObjectProperty)convertOntologyObject(prop);
      OWLIndividual oo = (OWLIndividual)convertOntologyObject(value);
      removeAxiom(df.getOWLObjectPropertyAssertionAxiom(op,subj,oo));
    }
  }
View Full Code Here


    OWLClass ca = (OWLClass) convertOntologyObject(a);
    addAxiom(getOWLDataFactory().getOWLEquivalentClassesAxiom(cls,ca));
  }

  public IInstance createInstance(String name) {
    OWLDataFactory dataFactory = getOWLDataFactory();
    OWLIndividual ind = dataFactory.getOWLNamedIndividual(IRI.create(getOntology().getNameSpace()+name));
    addAxiom(dataFactory.getOWLClassAssertionAxiom(cls,ind));
    return (IInstance)convertOWLObject(ind);
  }
View Full Code Here

    addAxiom(dataFactory.getOWLClassAssertionAxiom(cls,ind));
    return (IInstance)convertOWLObject(ind);
  }

  public IInstance createInstance() {
    OWLDataFactory dataFactory = getOWLDataFactory();
    OWLIndividual ind = dataFactory.getOWLAnonymousIndividual();
    addAxiom(dataFactory.getOWLClassAssertionAxiom(cls,ind));
    return (IInstance)convertOWLObject(ind);
  }
View Full Code Here

    addAxiom(dataFactory.getOWLClassAssertionAxiom(cls,ind));
    return (IInstance)convertOWLObject(ind);
  }

  public IClass createSubClass(String name) {
    OWLDataFactory dataFactory = getOWLDataFactory();
    OWLClass ch = dataFactory.getOWLClass(IRI.create(getOntology().getNameSpace()+name));
    addAxiom(getOWLDataFactory().getOWLSubClassOfAxiom(ch,cls));
    return (IClass) convertOWLObject(ch);
  }
View Full Code Here

    OWLClass ca = (OWLClass) convertOntologyObject(a);
    addAxiom(getOWLDataFactory().getOWLEquivalentClassesAxiom(cls,ca));
  }

  public IInstance createInstance(String name) {
    OWLDataFactory dataFactory = getOWLDataFactory();
    OWLIndividual ind = dataFactory.getOWLNamedIndividual(IRI.create(getOntology().getNameSpace()+name));
    addAxiom(dataFactory.getOWLClassAssertionAxiom(cls,ind));
    return (IInstance)convertOWLObject(ind);
  }
View Full Code Here

    addAxiom(dataFactory.getOWLClassAssertionAxiom(cls,ind));
    return (IInstance)convertOWLObject(ind);
  }

  public IInstance createInstance() {
    OWLDataFactory dataFactory = getOWLDataFactory();
    OWLIndividual ind = dataFactory.getOWLAnonymousIndividual();
    addAxiom(dataFactory.getOWLClassAssertionAxiom(cls,ind));
    return (IInstance)convertOWLObject(ind);
  }
View Full Code Here

    addAxiom(dataFactory.getOWLClassAssertionAxiom(cls,ind));
    return (IInstance)convertOWLObject(ind);
  }

  public IClass createSubClass(String name) {
    OWLDataFactory dataFactory = getOWLDataFactory();
    OWLClass ch = dataFactory.getOWLClass(IRI.create(getOntology().getNameSpace()+name));
    addAxiom(getOWLDataFactory().getOWLSubClassOfAxiom(ch,cls));
    return (IClass) convertOWLObject(ch);
  }
View Full Code Here

    return annotation;
  }

 
  public IProperty createSubProperty(String name) {
    OWLDataFactory dataFactory = getOWLDataFactory();
    OWLAnnotationProperty ch = dataFactory.getOWLAnnotationProperty(IRI.create(getOntology().getNameSpace()+name));
    addAxiom(getOWLDataFactory().getOWLSubAnnotationPropertyOfAxiom(ch,annotation));
    return (IProperty) convertOWLObject(ch);
  }
View Full Code Here

  }


 
  public void addPropertyValue(IProperty prop, Object value) {
    OWLDataFactory df = getOWLDataFactory();
    OWLIndividual subj = getOWLIndividual();
    if(prop.isAnnotationProperty()){
      super.addPropertyValue(prop, value);
    }else if(prop.isDatatypeProperty()){
      OWLDataProperty dp = (OWLDataProperty)convertOntologyObject(prop);
      OWLLiteral dl = (OWLLiteral)convertOntologyObject(value);
      addAxiom(df.getOWLDataPropertyAssertionAxiom(dp,subj,dl));
    }else if(prop.isObjectProperty()){
      OWLObjectProperty op = (OWLObjectProperty)convertOntologyObject(prop);
      OWLIndividual oo = (OWLIndividual)convertOntologyObject(value);
      addAxiom(df.getOWLObjectPropertyAssertionAxiom(op,subj,oo));
    }
  }
View Full Code Here

      removePropertyValue(prop,o);
    }
  }

  public void removePropertyValue(IProperty prop, Object value) {
    OWLDataFactory df = getOWLDataFactory();
    OWLIndividual subj = getOWLIndividual();
    if(prop.isAnnotationProperty()){
      super.removePropertyValue(prop, value);
    }else if(prop.isDatatypeProperty()){
      OWLDataProperty dp = (OWLDataProperty)convertOntologyObject(prop);
      OWLLiteral dl = (OWLLiteral)convertOntologyObject(value);
      removeAxiom(df.getOWLDataPropertyAssertionAxiom(dp,subj,dl));
    }else if(prop.isObjectProperty()){
      OWLObjectProperty op = (OWLObjectProperty)convertOntologyObject(prop);
      OWLIndividual oo = (OWLIndividual)convertOntologyObject(value);
      removeAxiom(df.getOWLObjectPropertyAssertionAxiom(op,subj,oo));
    }
  }
View Full Code Here

TOP

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

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.