Package jade.content.onto

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


     @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

    /**
     * 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

    /**
     * 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

Related Classes of jade.content.onto.OntologyException

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.