View Javadoc

1   /*
2    wsmo4j - a WSMO API and Reference Implementation
3    Copyright (c) 2005, University of Innsbruck, Austria
4    This library is free software; you can redistribute it and/or modify it under
5    the terms of the GNU Lesser General Public License as published by the Free
6    Software Foundation; either version 2.1 of the License, or (at your option)
7    any later version.
8    This library is distributed in the hope that it will be useful, but WITHOUT
9    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10   FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11   details.
12   You should have received a copy of the GNU Lesser General Public License along
13   with this library; if not, write to the Free Software Foundation, Inc.,
14   59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15   */
16  package org.deri.wsmo4j.validator;
17  
18  
19  import java.util.*;
20  
21  import org.omwg.logicalexpression.*;
22  import org.omwg.ontology.*;
23  
24  
25  /**
26   * Checks logical expressions for wsml-full validity.
27   * 
28   * @author nathalie.steinmetz@deri.org
29   */
30  public class WsmlFullExpressionValidator
31          implements Visitor {
32  
33      protected Axiom axiom = null;
34  
35      protected List errors = null;
36  
37      /**
38       * @param axiom whose logical expression is checked
39       * @param errors list that will be filled with error messages of found variant violations
40       */
41      protected WsmlFullExpressionValidator(Axiom axiom, List errors) {
42          this.axiom = axiom;
43          this.errors = errors;
44      }
45  
46      /**
47       * Checks if an Atom is valid to wsml-full.
48       * 
49       * @see org.omwg.logicalexpression.Visitor#visitAtom(org.omwg.logicalexpression.Atom)
50       */
51      public void visitAtom(Atom expr) {
52  
53      }
54  
55      /**
56       * Checks if an AttributeConstraintMolecule is valid to wsml-full.
57       * 
58       * @see org.omwg.logicalexpression.Visitor#visitAttributeContraintMolecule(org.omwg.logicalexpression.AttributeConstraintMolecule)
59       */
60      public void visitAttributeContraintMolecule(AttributeConstraintMolecule expr) {
61          
62      }
63  
64      /**
65       * Checks if an AttributeInferenceMolecule is valid to wsml-full.
66       * 
67       * @see org.omwg.logicalexpression.Visitor#visitAttributeInferenceMolecule(org.omwg.logicalexpression.AttributeInferenceMolecule)
68       */
69      public void visitAttributeInferenceMolecule(AttributeInferenceMolecule expr) {
70          
71      }
72  
73      /**
74       * Checks if an AttributeValueMolecule is valid to wsml-full.
75       *     
76       * @see org.omwg.logicalexpression.Visitor#visitAttributeValueMolecule(org.omwg.logicalexpression.AttributeValueMolecule)
77       */
78      public void visitAttributeValueMolecule(AttributeValueMolecule expr) {
79          
80      }
81  
82      /**
83       * Checks if a CompoundMolecule is valid to wsml-full.
84       * 
85       * @see org.omwg.logicalexpression.Visitor#visitCompoundMolecule(org.omwg.logicalexpression.CompoundMolecule)
86       */
87      public void visitCompoundMolecule(CompoundMolecule expr) {
88          
89      }
90  
91      /**
92       * Checks if a MembershipMolecule is valid to wsml-full.
93       * 
94       * @see org.omwg.logicalexpression.Visitor#visitMemberShipMolecule(org.omwg.logicalexpression.MembershipMolecule)
95       */
96      public void visitMemberShipMolecule(MembershipMolecule expr) {
97          
98      }
99  
100     /**
101      * Checks if a SubConceptMolecule is valid to wsml-full.
102      * 
103      * @see org.omwg.logicalexpression.Visitor#visitSubConceptMolecule(org.omwg.logicalexpression.SubConceptMolecule)
104      */
105     public void visitSubConceptMolecule(SubConceptMolecule expr) {
106         
107     }
108     
109     
110     /**
111      * Checks if a Negation is valid to wsml-full.
112      * 
113      * @see org.omwg.logicalexpression.Visitor#visitNegation(org.omwg.logicalexpression.Negation)
114      */
115     public void visitNegation(Negation expr) {
116 
117     }
118 
119     /**
120      * Checks if a NegationAsFailure is valid to wsml-full.
121      * 
122      * @see org.omwg.logicalexpression.Visitor#visitNegationAsFailure(org.omwg.logicalexpression.NegationAsFailure)
123      */
124     public void visitNegationAsFailure(NegationAsFailure expr) {
125 
126     }
127 
128     /**
129      * Checks if a Constraint is valid to wsml-full.
130      * 
131      * @see org.omwg.logicalexpression.Visitor#visitConstraint(org.omwg.logicalexpression.Constraint)
132      */
133     public void visitConstraint(Constraint expr) {
134 
135     }
136 
137     /**
138      * Checks if a Conjunction is valid to wsml-full.
139      * 
140      * @see org.omwg.logicalexpression.Visitor#visitConjunction(org.omwg.logicalexpression.Conjunction)
141      */
142     public void visitConjunction(Conjunction expr) {
143 
144     }
145 
146     /**
147      * Checks if a Disjunction is valid to wsml-full.
148      * 
149      * @see org.omwg.logicalexpression.Visitor#visitDisjunction(org.omwg.logicalexpression.Disjunction)
150      */
151     public void visitDisjunction(Disjunction expr) {
152 
153     }
154 
155     /**
156      * Checks if an InverseImplication is valid to wsml-full.
157      * 
158      * @see org.omwg.logicalexpression.Visitor#visitInverseImplication(org.omwg.logicalexpression.InverseImplication)
159      */
160     public void visitInverseImplication(InverseImplication expr) {
161 
162     }
163 
164     /**
165      * Checks if an Implication is valid to wsml-full.
166      * 
167      * @see org.omwg.logicalexpression.Visitor#visitImplication(org.omwg.logicalexpression.Implication)
168      */
169     public void visitImplication(Implication expr) {
170 
171     }
172 
173     /**
174      * Checks if an Equivalence is valid to wsml-full.
175      * 
176      * @see org.omwg.logicalexpression.Visitor#visitEquivalence(org.omwg.logicalexpression.Equivalence)
177      */
178     public void visitEquivalence(Equivalence expr) {
179 
180     }
181 
182     /**
183      * Checks if a LogicProgrammingRule is valid to wsml-full.
184      * 
185      * @see org.omwg.logicalexpression.Visitor#visitLogicProgrammingRule(org.omwg.logicalexpression.LogicProgrammingRule)
186      */
187     public void visitLogicProgrammingRule(LogicProgrammingRule expr) {
188 
189     }
190 
191     /**
192      * Checks if a UniversalQuantification is valid to wsml-full.
193      * 
194      * @see org.omwg.logicalexpression.Visitor#visitUniversalQuantification(org.omwg.logicalexpression.UniversalQuantification)
195      */
196     public void visitUniversalQuantification(UniversalQuantification expr) {
197 
198     }
199 
200     /**
201      * Checks if an ExistentialQuantification is valid to wsml-full.
202      * 
203      * @see org.omwg.logicalexpression.Visitor#visitExistentialQuantification(org.omwg.logicalexpression.ExistentialQuantification)
204      */
205     public void visitExistentialQuantification(ExistentialQuantification expr) {
206 
207     }
208 
209 }