Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLIndividual


        }
        // Adding all same-individuals axioms
        // Adding all different-individuals axioms
        for (OWLEntity entity : sig) {
            if (OWLNamedIndividual.class.isAssignableFrom(entity.getClass())) {
                OWLIndividual individual = (OWLIndividual) entity;
                Set<OWLSameIndividualAxiom> sameIndividualAxioms = ontology
                        .getSameIndividualAxioms(individual);
                enrichedModule.addAll(sameIndividualAxioms);
                if (verbose) {
                    for (OWLSameIndividualAxiom sameIndividualAxiom : sameIndividualAxioms) {
View Full Code Here


        throw new Error("Missing return statement in function");
    }

    final public Set<OWLIndividual> IndividualMinOneSet() throws ParseException {
        Set<OWLIndividual> individuals = new HashSet<OWLIndividual>();
        OWLIndividual ind;
        ind = Individual();
        individuals.add(ind);
        label_5: while (true) {
            switch (jj_ntk == -1 ? jj_ntk_f() : jj_ntk) {
                case FULLIRI:
View Full Code Here

        throw new Error("Missing return statement in function");
    }

    final public OWLClassExpression ObjectHasValue() throws ParseException {
        OWLObjectPropertyExpression prop;
        OWLIndividual ind;
        jj_consume_token(OBJECTHASVALUE);
        jj_consume_token(OPENPAR);
        prop = ObjectPropertyExpression();
        ind = Individual();
        jj_consume_token(CLOSEPAR);
View Full Code Here

        }
        throw new Error("Missing return statement in function");
    }

    final public Set<OWLIndividual> IndividualSet() throws ParseException {
        OWLIndividual ind;
        Set<OWLIndividual> individuals = new HashSet<OWLIndividual>();
        ind = Individual();
        individuals.add(ind);
        ind = Individual();
        individuals.add(ind);
View Full Code Here

        }
        throw new Error("Missing return statement in function");
    }

    final public OWLIndividualAxiom ClassAssertion() throws ParseException {
        OWLIndividual ind;
        OWLClassExpression desc;
        Set<OWLAnnotation> axiomAnnos;
        jj_consume_token(CLASSASSERTION);
        jj_consume_token(OPENPAR);
        axiomAnnos = AxiomAnnotationSet();
View Full Code Here

        Set<OntologyAxiomPair> axioms = new HashSet<>();
        if (!INDIVIDUAL.matches(tok)) {
            throw new ExceptionBuilder().withKeyword(INDIVIDUAL).build();
        }
        String subj = consumeToken();
        OWLIndividual ind = getOWLIndividual(subj);
        if (!ind.isAnonymous()) {
            axioms.add(new OntologyAxiomPair(getOntology(null), dataFactory
                    .getOWLDeclarationAxiom(ind.asOWLNamedIndividual())));
        }
        parseFrameSections(false, axioms, ind, individualFrameSections);
        return axioms;
    }
View Full Code Here

        return (OWLClassAxiom) parseAxiom();
    }

    @Nonnull
    private OWLAxiom parseAxiomWithIndividualStart() {
        OWLIndividual ind = parseIndividual();
        String kw = consumeToken();
        if (TYPE.matches(kw)) {
            OWLClassExpression type = parseClassExpression();
            return dataFactory.getOWLClassAssertionAxiom(type, ind);
        }
View Full Code Here

    public Set<OWLDifferentIndividualsAxiom> asPairwiseAxioms() {
        List<OWLIndividual> individuals = getIndividualsAsList();
        Set<OWLDifferentIndividualsAxiom> result = new HashSet<>();
        for (int i = 0; i < individuals.size() - 1; i++) {
            for (int j = i + 1; j < individuals.size(); j++) {
                OWLIndividual indI = individuals.get(i);
                OWLIndividual indJ = individuals.get(j);
                result.add(new OWLDifferentIndividualsAxiomImpl(new HashSet<>(
                        Arrays.asList(indI, indJ)), NO_ANNOTATIONS));
            }
        }
        return result;
View Full Code Here

        if (individuals.size() == 2) {
            return Collections.<OWLDifferentIndividualsAxiom> singleton(this);
        }
        Set<OWLDifferentIndividualsAxiom> result = new HashSet<>();
        for (int i = 0; i < individuals.size() - 1; i++) {
            OWLIndividual indI = individuals.get(i);
            OWLIndividual indJ = individuals.get(i + 1);
            result.add(new OWLDifferentIndividualsAxiomImpl(new HashSet<>(
                    Arrays.asList(indI, indJ)), getAnnotations()));
        }
        return result;
    }
View Full Code Here

    public String getShortForm(OWLEntity entity) {
        checkNotNull(entity, "entity cannot be null");
        if (!(entity instanceof OWLIndividual)) {
            return alternateShortFormProvider.getShortForm(entity);
        }
        OWLIndividual individual = (OWLIndividual) entity;
        // The candidate value to be rendered, we select this based on
        // ranking of annotation URI and ranking of lang (if present)
        OWLObject candidateValue = null;
        int lastURIMatchIndex = Integer.MAX_VALUE;
        int lastLangMatchIndex = Integer.MAX_VALUE;
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.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.