Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLNamedIndividual


                    manager.addAxiom(ontology, annotations.next());
            }

            // If the entity is an individual
            if (entity.isOWLNamedIndividual()) {
                OWLNamedIndividual owldata = entity.asOWLNamedIndividual();

                Iterator<OWLIndividualAxiom> entityaxiom = owlmodel.getAxioms(owldata).iterator();

                while (entityaxiom.hasNext())
                    manager.addAxiom(ontology, entityaxiom.next());
View Full Code Here


        }
        return getOWLNamedIndividual(name);
    }

    private OWLNamedIndividual getOWLNamedIndividual(String name) {
        OWLNamedIndividual ind = owlEntityChecker.getOWLIndividual(name);
        if (ind == null && individualNames.contains(name)) {
            ind = dataFactory.getOWLNamedIndividual(getIRI(name));
        }
        return ind;
    }
View Full Code Here

    @Override
    public void handleTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException {
        if (!isAnonymous(subject)) {
            Set<OWLAnnotation> annos = getConsumer().getPendingAnnotations();
            OWLNamedIndividual individual = getDataFactory().getOWLNamedIndividual(subject);
            addAxiom(getDataFactory().getOWLDeclarationAxiom(individual, annos));
        }
        getConsumer().addOWLNamedIndividual(subject, true);
    }
View Full Code Here

        return dataFactory.getOWLAnnotationProperty(iri);
   
  }

  final public OWLNamedIndividual NamedIndividual() throws ParseException {
    OWLNamedIndividual ind;
    jj_consume_token(NAMEDINDIVIDUAL);
    jj_consume_token(OPENPAR);
    ind = IndividualIRI();
    jj_consume_token(CLOSEPAR);
        return ind;
View Full Code Here

return dataFactory.getSWRLDifferentIndividualsAtom(arg0, arg1);
   
  }

  final public SWRLIArgument IArg() throws ParseException {
    OWLNamedIndividual ind;
    //SWRLIArgument arg;
    IRI iri;
    if (jj_2_127(2)) {
      jj_consume_token(VARIABLE);
      jj_consume_token(OPENPAR);
View Full Code Here

        Set<OWLNamedIndividual> inds = new HashSet<OWLNamedIndividual>();
        Set<OWLSameIndividualAxiom> processed = new HashSet<OWLSameIndividualAxiom>();
        List<OWLNamedIndividual> stack = new ArrayList<OWLNamedIndividual>();
        stack.add(ind);
        while (!stack.isEmpty()) {
            OWLNamedIndividual currentInd = stack.remove(0);
            for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
                for (OWLSameIndividualAxiom axiom : ontology.getSameIndividualAxioms(currentInd)) {
                    if (!processed.contains(axiom)) {
                        processed.add(axiom);
                        for (OWLIndividual i : axiom.getIndividuals()) {
                            if (!i.isAnonymous()) {
                                OWLNamedIndividual namedInd = i.asOWLNamedIndividual();
                                if (!inds.contains(namedInd)) {
                                    inds.add(namedInd);
                                    stack.add(namedInd);
                                }
                            }
View Full Code Here

        return ontology.getReferencingAxioms(this, includeImports);
    }

    @Override
  protected int compareObjectOfSameType(OWLObject object) {
        OWLNamedIndividual other = (OWLNamedIndividual) object;
        return iri.compareTo(other.getIRI());
    }
View Full Code Here

    @Override
    public List<EntityData> execute() {
        List<EntityData> result = new ArrayList<EntityData>();
       
        OWLNamedIndividual individual = getRenderingManager().getEntity(instanceName, EntityType.NAMED_INDIVIDUAL);
        Set<OWLOntology> importsClosure = getRootOntologyImportsClosure();
        for(OWLClassExpression ce : individual.getTypes(importsClosure)) {
            if(!ce.isAnonymous()) {
                result.add(getRenderingManager().getEntityData(ce.asOWLClass()));
            }
        }       
        return result;
View Full Code Here

    public List<EntityData> getSelection() {
        Optional<OWLNamedIndividualData> selection = individualsList.getSelectedEntity();
        if(selection.isPresent()) {
            List<EntityData> result = new ArrayList<EntityData>();
            OWLNamedIndividual entity = selection.get().getEntity();
            EntityData entityData = new EntityData(entity.getIRI().toString(), selection.get().getBrowserText());
            entityData.setValueType(ValueType.Instance);
            result.add(entityData);
            return result;
        }
        else {
View Full Code Here

    Set<OWLClassAssertionAxiom> axioms;

    axioms = o.getClassAssertionAxioms( POSITIVE_ENTAILMENT_TEST.getOWLClass() );
    if( axioms != null ) {
      for( OWLClassAssertionAxiom ax : axioms ) {
        final OWLNamedIndividual i = ax.getIndividual().asOWLNamedIndividual();
        final PositiveEntailmentTest<O> t = factory.getPositiveEntailmentTestCase( o, i );
        if( filter.accepts( t ) )
          cases.put( i, t );
      }
    }

    axioms = o.getClassAssertionAxioms( NEGATIVE_ENTAILMENT_TEST.getOWLClass() );
    if( axioms != null ) {
      for( OWLClassAssertionAxiom ax : axioms ) {
        final OWLNamedIndividual i = ax.getIndividual().asOWLNamedIndividual();
        final NegativeEntailmentTest<O> t = factory.getNegativeEntailmentTestCase( o, i );
        if( filter.accepts( t ) )
          cases.put( i, t );
      }
    }

    axioms = o.getClassAssertionAxioms( CONSISTENCY_TEST.getOWLClass() );
    if( axioms != null ) {
      for( OWLClassAssertionAxiom ax : axioms ) {
        final OWLNamedIndividual i = ax.getIndividual().asOWLNamedIndividual();
        /*
         * Verify the identifier is not already in the map because both
         * entailment tests may also be marked as consistency tests.
         */
        if( cases.containsKey( i ) )
          continue;
        final ConsistencyTest<O> t = factory.getConsistencyTestCase( o, i );
        if( filter.accepts( t ) && !cases.containsKey( i ) )
          cases.put( i, t );
      }
    }

    axioms = o.getClassAssertionAxioms( INCONSISTENCY_TEST.getOWLClass() );
    if( axioms != null ) {
      for( OWLClassAssertionAxiom ax : axioms ) {
        final OWLNamedIndividual i = ax.getIndividual().asOWLNamedIndividual();
        final InconsistencyTest<O> t = factory.getInconsistencyTestCase( o, i );
        if( filter.accepts( t ) )
          cases.put( i, t );
      }
    }
View Full Code Here

TOP

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

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.