Examples of OWLDeclarationAxiom


Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

      manager.applyChanges( changes );

      changes = new ArrayList<OWLOntologyChange>();
      for( OWLEntity entity : referencedEntities ) {
        if( !ontology.containsEntityInSignature( entity ) ) {
          OWLDeclarationAxiom declaration = manager.getOWLDataFactory()
              .getOWLDeclarationAxiom( entity );
          changes.add( new AddAxiom( ontology, declaration ) );
        }
      }
     
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

      new SyntacticLocalityModuleExtractor( manager, ontology, moduleType );
    Set<OWLAxiom> expected = segmenter.extract( signature );
     
    // prune declarations to avoid mismatches related to declarations
    for( OWLEntity entity : signature ) {
      OWLDeclarationAxiom declaration = OWL.declaration( entity );
      computed.remove( declaration );
      computed.remove( declaration );
    }
   
    TestUtils.assertToStringEquals( "Modules diff for " + signature, expected.toArray( new OWLAxiom[0] ), computed.toArray( new OWLAxiom[0] ) );
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

                sb.append(" = ");
                sb.append(formatClassExpression(ces.get(i), ont));
            }
            return sb.toString();
        } else if (a instanceof OWLDeclarationAxiom) {
            OWLDeclarationAxiom da = (OWLDeclarationAxiom) a;
            OWLEntity ent = da.getEntity();
            String name = (ent.isOWLClass()) ? getLabel(ent.asOWLClass(), ont)
                    : ent.toString();
            return "init(" + name + ")";
        } else {
            return a.toString();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

                sb.append(" = ");
                sb.append(formatClassExpression(ces.get(i), ont));
            }
            return sb.toString();
        } else if (a instanceof OWLDeclarationAxiom) {
            OWLDeclarationAxiom da = (OWLDeclarationAxiom) a;
            OWLEntity ent = da.getEntity();
            String name = (ent.isOWLClass()) ? getLabel(ent.asOWLClass(), ont)
                    : ent.toString();
            return "init(" + name + ")";
        } else {
            return a.toString();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

      new SyntacticLocalityModuleExtractor( OWL.manager, ontology, moduleType );
    Set<OWLAxiom> expected = segmenter.extract( signature );
     
    // prune declarations to avoid mismatches related to declarations
    for( OWLEntity entity : signature ) {
      OWLDeclarationAxiom declaration = OWL.declaration( entity );
      computed.remove( declaration );
      computed.remove( declaration );
    }

    for( Iterator<OWLAxiom> i = expected.iterator(); i.hasNext(); ) {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

      manager.applyChanges( changes );

      changes = new ArrayList<OWLOntologyChange>();
      for( OWLEntity entity : referencedEntities ) {
        if( !ontology.containsEntityInSignature( entity ) ) {
          OWLDeclarationAxiom declaration = manager.getOWLDataFactory()
              .getOWLDeclarationAxiom( entity );
          changes.add( new AddAxiom( ontology, declaration ) );
        }
      }
     
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

                OWLAnnotation     oav = factory.getOWLAnnotation(oa, factory.getOWLStringLiteral(clazzlabel,"en"));
                OWLDatatype dt = factory.getOWLDatatype(IRI.create(DATATYPE));
                OWLNamedIndividual sub = factory.getOWLNamedIndividual(IRI.create(SUBJECT));
                OWLNamedIndividual obj = factory.getOWLNamedIndividual(IRI.create(OBJECT));
                OWLLiteral literal1 = factory.getOWLTypedLiteral(VALUE,dt);
                OWLDeclarationAxiom daxiomcls = factory.getOWLDeclarationAxiom(cls); //Classe
                OWLDeclarationAxiom daxiomop = factory.getOWLDeclarationAxiom(op); //obj prop
                OWLDeclarationAxiom daxiomdp = factory.getOWLDeclarationAxiom(dp); //data prop
                OWLDeclarationAxiom daxiomsub = factory.getOWLDeclarationAxiom(sub); //subject
                OWLDeclarationAxiom daxiomobj = factory.getOWLDeclarationAxiom(obj); //object

                OWLClassAssertionAxiom axiomsub = factory.getOWLClassAssertionAxiom(cls,sub); //Istanza
                OWLClassAssertionAxiom axiomobj = factory.getOWLClassAssertionAxiom(cls,obj); //Istanza
                OWLObjectPropertyAssertionAxiom axiomop = factory.getOWLObjectPropertyAssertionAxiom(op, sub, obj); //Obj prop tra individui
                OWLDataPropertyAssertionAxiom axiomvalue = factory.getOWLDataPropertyAssertionAxiom(dp, obj,literal1); //Dataprop all'istanza;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDeclarationAxiom

                OWLAnnotation     oav = factory.getOWLAnnotation(oa, factory.getOWLStringLiteral(clazzlabel,"en"));
                OWLDatatype dt = factory.getOWLDatatype(IRI.create(DATATYPE));
                OWLNamedIndividual sub = factory.getOWLNamedIndividual(IRI.create(SUBJECT));
                OWLNamedIndividual obj = factory.getOWLNamedIndividual(IRI.create(OBJECT));
                OWLLiteral literal1 = factory.getOWLTypedLiteral(VALUE,dt);
                OWLDeclarationAxiom daxiomcls = factory.getOWLDeclarationAxiom(cls); //Classe
                OWLDeclarationAxiom daxiomop = factory.getOWLDeclarationAxiom(op); //obj prop
                OWLDeclarationAxiom daxiomdp = factory.getOWLDeclarationAxiom(dp); //data prop
                OWLDeclarationAxiom daxiomsub = factory.getOWLDeclarationAxiom(sub); //subject
                OWLDeclarationAxiom daxiomobj = factory.getOWLDeclarationAxiom(obj); //object

                OWLClassAssertionAxiom axiomsub = factory.getOWLClassAssertionAxiom(cls,sub); //Istanza
                OWLClassAssertionAxiom axiomobj = factory.getOWLClassAssertionAxiom(cls,obj); //Istanza
                OWLObjectPropertyAssertionAxiom axiomop = factory.getOWLObjectPropertyAssertionAxiom(op, sub, obj); //Obj prop tra individui
                OWLDataPropertyAssertionAxiom axiomvalue = factory.getOWLDataPropertyAssertionAxiom(dp, sub,literal1); //Dataprop all'istanza;
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.