org.deri.wsmo4j.validator
Class WsmlFullValidator

java.lang.Object
  extended by org.deri.wsmo4j.validator.WsmlFullValidator
All Implemented Interfaces:
org.wsmo.validator.Validator
Direct Known Subclasses:
WsmlDLValidator, WsmlRuleValidator

public class WsmlFullValidator
extends Object
implements org.wsmo.validator.Validator

Checks an ontology for wsml-full validity.

    Created on Jul 28, 2005
    Committed by $Author: morcen $
    $Source$,
 

Version:
$Revision: 1946 $ $Date: 2007-04-02 15:13:28 +0300 (Mon, 02 Apr 2007) $
Author:
Holger Lausen, nathalie.steinmetz@deri.org

Field Summary
protected  ConstantTransformer constants
           
protected  List<org.wsmo.validator.ValidationError> errors
           
protected  org.wsmo.factory.LogicalExpressionFactory leFactory
           
protected  LogExprSerializerWSML leSerializer
           
protected  List<org.wsmo.validator.ValidationWarning> warnings
           
 
Constructor Summary
WsmlFullValidator(org.wsmo.factory.LogicalExpressionFactory leFactory)
           
 
Method Summary
protected  void addError(org.wsmo.common.Entity ent, org.omwg.ontology.Attribute att, String msg)
           
protected  void addError(org.wsmo.common.Entity ent, String msg)
           
protected  void addWarning(org.wsmo.common.Entity ent, String msg, String quickFix)
           
 Collection getErrors()
           
 boolean isValid(org.omwg.logicalexpression.LogicalExpression logExpr, List<org.wsmo.validator.ValidationError> errorMessages, List<org.wsmo.validator.ValidationWarning> warningMessages)
           
 boolean isValid(org.wsmo.common.TopEntity te, List<org.wsmo.validator.ValidationError> errorMessages, List<org.wsmo.validator.ValidationWarning> warningMessages)
          Given an ontology as TopEntity, the method checks if the different ontology elements are valid and fills the error- and warningMessages lists with errors and warnings if not.
protected  void visitAxiom(org.omwg.ontology.Axiom axiom)
          Checks if an axiom is valid to wsml-full.
protected  void visitConcept(org.omwg.ontology.Concept concept)
          Checks if a concept is valid to wsml-full.
protected  void visitInstance(org.omwg.ontology.Instance instance)
          Checks if an instance is valid to wsml-full.
protected  void visitRelation(org.omwg.ontology.Relation relation)
          Checks if a relation is valid to wsml-full.
protected  void visitRelationInstance(org.omwg.ontology.RelationInstance relationInstance)
          Checks if a relation instance is valid to wsml-full.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constants

protected ConstantTransformer constants

errors

protected List<org.wsmo.validator.ValidationError> errors

warnings

protected List<org.wsmo.validator.ValidationWarning> warnings

leSerializer

protected LogExprSerializerWSML leSerializer

leFactory

protected org.wsmo.factory.LogicalExpressionFactory leFactory
Constructor Detail

WsmlFullValidator

public WsmlFullValidator(org.wsmo.factory.LogicalExpressionFactory leFactory)
Method Detail

visitAxiom

protected void visitAxiom(org.omwg.ontology.Axiom axiom)
Checks if an axiom is valid to wsml-full.

Parameters:
axiom -

visitConcept

protected void visitConcept(org.omwg.ontology.Concept concept)
Checks if a concept is valid to wsml-full.

Parameters:
concept -

visitInstance

protected void visitInstance(org.omwg.ontology.Instance instance)
Checks if an instance is valid to wsml-full.

Parameters:
instance -

visitRelation

protected void visitRelation(org.omwg.ontology.Relation relation)
Checks if a relation is valid to wsml-full.

Parameters:
relation -

visitRelationInstance

protected void visitRelationInstance(org.omwg.ontology.RelationInstance relationInstance)
                              throws org.wsmo.common.exception.SynchronisationException,
                                     org.wsmo.common.exception.InvalidModelException
Checks if a relation instance is valid to wsml-full.

Parameters:
relationInstance -
Throws:
org.wsmo.common.exception.SynchronisationException
org.wsmo.common.exception.InvalidModelException

getErrors

public Collection getErrors()
Returns:
error list

isValid

public boolean isValid(org.wsmo.common.TopEntity te,
                       List<org.wsmo.validator.ValidationError> errorMessages,
                       List<org.wsmo.validator.ValidationWarning> warningMessages)
Given an ontology as TopEntity, the method checks if the different ontology elements are valid and fills the error- and warningMessages lists with errors and warnings if not. Given a WebService or a Goal as TopEntity, the method checks the capability assumptions, effects, postcondition and precondition axioms for validity and fills the error- and warningMessages if the axioms are not valid.

Specified by:
isValid in interface org.wsmo.validator.Validator
Parameters:
te - TopEntity to be checked
errorMessages - list that will be filled with error messages of found variant violations
Returns:
true if valid (no errors), false if errors occured
See Also:
Validator.isValid(org.wsmo.common.TopEntity, java.util.List, java.util.List)

isValid

public boolean isValid(org.omwg.logicalexpression.LogicalExpression logExpr,
                       List<org.wsmo.validator.ValidationError> errorMessages,
                       List<org.wsmo.validator.ValidationWarning> warningMessages)

addWarning

protected void addWarning(org.wsmo.common.Entity ent,
                          String msg,
                          String quickFix)

addError

protected void addError(org.wsmo.common.Entity ent,
                        String msg)

addError

protected void addError(org.wsmo.common.Entity ent,
                        org.omwg.ontology.Attribute att,
                        String msg)


Copyright © 2004-2008 Ontotext Lab.. All Rights Reserved.