Examples of OntologyException


Examples of com.hp.hpl.jena.ontology.OntologyException

    public Resource getOWLLanguageLevel(OntModel owlModel, List problems)
            throws OntologyException {
// Code from OntModelImpl.getOWLLanguageLevel version 2.2 beta
        Profile oProf = owlModel.getProfile();
        if (!(oProf instanceof OWLProfile)) {
            throw new OntologyException( "Cannnot perform OWL language level test on non OWL model" );
        }
       
        // this process is made complicated by the design of the syntax checker, which uses
        // two different grammars for Lite and DL checking.  in some circumstances, we have
        // to run both kinds of check
View Full Code Here

Examples of jade.content.onto.OntologyException

     @param value The value to be checked
     @throws OntologyException If the value is not valid
   */
  public void validate(AbsObject value, Ontology onto) throws OntologyException {
    if (!(value instanceof AbsPrimitive)) {
      throw new OntologyException(value+" is not an AbsPrimitive");
    }
   
    AbsPrimitive absPrimitive = (AbsPrimitive) value;
    Object absValue = absPrimitive.getObject();
    if (absValue != null && permittedValues != null) {
      for (int i=0; i<permittedValues.length; i++) {
        if (absValue.equals(permittedValues[i])) {
          return;
        }
      }
      throw new OntologyException(value+" is not a permitted value ("+getPermittedValuesAsString()+")");
    }
  }
View Full Code Here

Examples of jade.content.onto.OntologyException

     @param value The value to be checked
     @throws OntologyException If the value is not valid
   */
  public void validate(AbsObject value, Ontology onto) throws OntologyException {
    if (!(value instanceof AbsPrimitive)) {
      throw new OntologyException(value+" is not an AbsPrimitive");
    }
   
    AbsPrimitive absPrimitive = (AbsPrimitive) value;
    Object absValue = absPrimitive.getObject();
    if (absValue != null) {
      if (!absValue.toString().matches(regex)) {
        throw new OntologyException(value+" not match the regular expression "+regex);
      }
    }
  }
View Full Code Here

Examples of jade.content.onto.OntologyException

    /**
     * Creates an Abstract descriptor to hold a content element of
     * the proper type.
     */
    public AbsObject newInstance() throws OntologyException {
      throw new OntologyException("AbsContentElement cannot be instantieted");
    }
View Full Code Here

Examples of jade.content.onto.OntologyException

    /**
     * Creates an Abstract descriptor to hold a term of
     * the proper type.
     */
    public AbsObject newInstance() throws OntologyException {
      throw new OntologyException("AbsTerm cannot be instantiated")
    }
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.