org.deri.wsmo4j.validator
Class WsmlDLValidator

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

public class WsmlDLValidator
extends WsmlFullValidator

Checks an ontology for wsml-dl validity.

  Created on Aug 18, 2005
  Committed by $Author: morcen $
  $Source$,
 

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

Field Summary
 List<org.omwg.logicalexpression.terms.Term> explicitConcepts
           
 List<org.omwg.logicalexpression.terms.Term> explicitInstances
           
 List<org.omwg.logicalexpression.terms.Term> explicitRelations
           
 List<org.omwg.logicalexpression.terms.Term> idAbstractRelations
           
 List<org.omwg.logicalexpression.terms.Term> idConcepts
           
 List<org.omwg.logicalexpression.terms.Term> idConcreteRelations
           
 List<org.omwg.logicalexpression.terms.Term> idInstances
           
 List<org.omwg.logicalexpression.terms.Term> idRelations
           
 
Fields inherited from class org.deri.wsmo4j.validator.WsmlFullValidator
constants, errors, leFactory, leSerializer, warnings
 
Constructor Summary
WsmlDLValidator(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)
           
 List getIdAbstractRelations()
           
 List getIdConcepts()
           
 List getIdConcreteRelations()
           
 List getIdInstances()
           
 List getIdRelations()
           
 org.omwg.ontology.Variable getRootVariable(org.omwg.logicalexpression.LogicalExpression logExpr)
           
 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-dl.
protected  void visitConcept(org.omwg.ontology.Concept concept)
          Checks if a concept is valid to wsml-dl.
protected  void visitInstance(org.omwg.ontology.Instance instance)
          Checks if an instance is valid to wsml-dl.
protected  void visitRelation(org.omwg.ontology.Relation relation)
          Checks if a relation is valid to wsml-dl.
protected  void visitRelationInstance(org.omwg.ontology.RelationInstance relationInstance)
          Checks if a relation instance is valid to wsml-dl.
 
Methods inherited from class org.deri.wsmo4j.validator.WsmlFullValidator
addWarning, getErrors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

idConcepts

public List<org.omwg.logicalexpression.terms.Term> idConcepts

explicitConcepts

public List<org.omwg.logicalexpression.terms.Term> explicitConcepts

idInstances

public List<org.omwg.logicalexpression.terms.Term> idInstances

explicitInstances

public List<org.omwg.logicalexpression.terms.Term> explicitInstances

idRelations

public List<org.omwg.logicalexpression.terms.Term> idRelations

explicitRelations

public List<org.omwg.logicalexpression.terms.Term> explicitRelations

idAbstractRelations

public List<org.omwg.logicalexpression.terms.Term> idAbstractRelations

idConcreteRelations

public List<org.omwg.logicalexpression.terms.Term> idConcreteRelations
Constructor Detail

WsmlDLValidator

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

visitAxiom

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

Overrides:
visitAxiom in class WsmlFullValidator
See Also:
WsmlFullValidator.visitAxiom(org.omwg.ontology.Axiom)

visitConcept

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

Overrides:
visitConcept in class WsmlFullValidator
See Also:
WsmlFullValidator.visitConcept(org.omwg.ontology.Concept)

visitInstance

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

Overrides:
visitInstance in class WsmlFullValidator
See Also:
WsmlFullValidator.visitInstance(org.omwg.ontology.Instance)

visitRelation

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

Overrides:
visitRelation in class WsmlFullValidator
See Also:
WsmlFullValidator.visitRelation(org.omwg.ontology.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-dl.

Overrides:
visitRelationInstance in class WsmlFullValidator
Throws:
org.wsmo.common.exception.InvalidModelException
org.wsmo.common.exception.SynchronisationException
See Also:
WsmlFullValidator.visitRelationInstance(org.omwg.ontology.RelationInstance)

getIdConcepts

public List getIdConcepts()
Returns:
Returns the idConcepts.

getIdInstances

public List getIdInstances()
Returns:
Returns the idInstances.

getIdRelations

public List getIdRelations()
Returns:
Returns the idRelations.

getIdAbstractRelations

public List getIdAbstractRelations()
Returns:
Returns the idAbstractRelations

getIdConcreteRelations

public List getIdConcreteRelations()
Returns:
Returns the idConcreteRelations

isValid

public boolean isValid(org.wsmo.common.TopEntity te,
                       List<org.wsmo.validator.ValidationError> errorMessages,
                       List<org.wsmo.validator.ValidationWarning> warningMessages)
Description copied from class: WsmlFullValidator
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
Overrides:
isValid in class WsmlFullValidator
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)
Overrides:
isValid in class WsmlFullValidator

getRootVariable

public org.omwg.ontology.Variable getRootVariable(org.omwg.logicalexpression.LogicalExpression logExpr)

addError

protected void addError(org.wsmo.common.Entity ent,
                        String msg)
Overrides:
addError in class WsmlFullValidator

addError

protected void addError(org.wsmo.common.Entity ent,
                        org.omwg.ontology.Attribute att,
                        String msg)
Overrides:
addError in class WsmlFullValidator


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