Package com.hp.hpl.jena.ontology

Examples of com.hp.hpl.jena.ontology.OntResource.asClass()


            log.debug("ObjectProperty {} not found, creating new one...", propertyURI);
        } else {
            // Add domains to union class
            OntResource domain = objectProperty.getDomain();
            if (domain != null) {
                if (domain.isClass() && domain.asClass().isUnionClass()) {
                    UnionClass unclass = domain.asClass().asUnionClass();
                    for (Resource newDomain : domains) {
                        unclass.addOperand(newDomain);
                    }
                } else {
View Full Code Here


        } else {
            // Add domains to union class
            OntResource domain = objectProperty.getDomain();
            if (domain != null) {
                if (domain.isClass() && domain.asClass().isUnionClass()) {
                    UnionClass unclass = domain.asClass().asUnionClass();
                    for (Resource newDomain : domains) {
                        unclass.addOperand(newDomain);
                    }
                } else {
                    List<Resource> resources = new ArrayList<Resource>(domains);
View Full Code Here

            // Add ranges to union class

            OntResource range = objectProperty.getRange();
            if (range != null) {
                if (range.isClass() && range.asClass().isUnionClass()) {
                    UnionClass unclass = range.asClass().asUnionClass();
                    for (Resource newRange : ranges) {
                        unclass.addOperand(newRange);
                    }
                } else {
View Full Code Here

            // Add ranges to union class

            OntResource range = objectProperty.getRange();
            if (range != null) {
                if (range.isClass() && range.asClass().isUnionClass()) {
                    UnionClass unclass = range.asClass().asUnionClass();
                    for (Resource newRange : ranges) {
                        unclass.addOperand(newRange);
                    }
                } else {
                    List<Resource> resources = new ArrayList<Resource>(ranges);
View Full Code Here

            datatypeProperty.addRange(range);
        } else {
            // Add domains to union class
            OntResource domain = datatypeProperty.getDomain();
            if (domain != null) {
                if (domain.isClass() && domain.asClass().isUnionClass()) {
                    UnionClass unclass = domain.asClass().asUnionClass();
                    for (Resource newDomain : domains) {
                        unclass.addOperand(newDomain);
                    }
                } else {
View Full Code Here

        } else {
            // Add domains to union class
            OntResource domain = datatypeProperty.getDomain();
            if (domain != null) {
                if (domain.isClass() && domain.asClass().isUnionClass()) {
                    UnionClass unclass = domain.asClass().asUnionClass();
                    for (Resource newDomain : domains) {
                        unclass.addOperand(newDomain);
                    }
                } else {
                    List<Resource> resources = new ArrayList<Resource>(domains);
View Full Code Here

      OntProperty s_p = this.getOntModel().getOntProperty(subject);
      if (s_p != null) {
        QueryResult qr = new QueryResult(OntologyElement.ONTCLASS);
        OntResource range = s_p.getRange();
        if (range != null) {
          qr.add(wrap(range.asClass()));
          return qr;
        }
        return null;
      }
      return null;
View Full Code Here

                new Term(search.getLabel(locale.getLanguage()),
                Relationship.SeeAlso,
                ontResource.getLabel(locale.getLanguage()),
                queryCriteria.getSeeAlsoWeight() * (lev + 1));
              terms.add(term);
              ontClasses.add(ontResource.asClass());
              termsFound.add(ontResource.getLabel(locale.getLanguage()));
            }
          }
        }

View Full Code Here

                new Term(ontResource.getLabel(locale.getLanguage()),
                Relationship.SubClassOf,
                search.getLabel(locale.getLanguage()),
                queryCriteria.getSubClassWeight() * (lev + 1));
              terms.add(term);
              ontClasses.add(ontResource.asClass());
              termsFound.add(ontResource.getLabel(locale.getLanguage()));
            }
          }

          if (search.hasSuperClass()) {
View Full Code Here

                  new Term(search.getLabel(locale.getLanguage()),
                  Relationship.SubClassOf,
                  ontResource.getLabel(locale.getLanguage()),
                  queryCriteria.getSubClassWeight() * (lev + 1));
                terms.add(term);
                ontClasses.add(ontResource.asClass());
                termsFound.add(ontResource.getLabel(locale.getLanguage()));
              }
            }
          }

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.