Examples of OWLIndividual


Examples of edu.stanford.smi.protegex.owl.model.OWLIndividual

    if(obj instanceof RDFSClass) {
      RDFSClass cls = (RDFSClass) obj;
      return cls.getBrowserText();
    }
    else if(obj instanceof OWLIndividual) {
      OWLIndividual owlInstance = (OWLIndividual) obj;
      return owlInstance.getBrowserText();
    }
    return "";
  }
View Full Code Here

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

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

Examples of org.semanticweb.owlapi.model.OWLIndividual

        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

Examples of org.semanticweb.owlapi.model.OWLIndividual

        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

Examples of org.semanticweb.owlapi.model.OWLIndividual

        }
        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

Examples of org.semanticweb.owlapi.model.OWLIndividual

        }
        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

Examples of org.semanticweb.owlapi.model.OWLIndividual

        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

Examples of org.semanticweb.owlapi.model.OWLIndividual

        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

Examples of org.semanticweb.owlapi.model.OWLIndividual

    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
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.