View Javadoc

1   /*
2    wsmo4j - a WSMO API and Reference Implementation
3   
4    Copyright (c) 2004-2005, OntoText Lab. / SIRMA
5   
6    This library is free software; you can redistribute it and/or modify it under
7    the terms of the GNU Lesser General Public License as published by the Free
8    Software Foundation; either version 2.1 of the License, or (at your option)
9    any later version.
10   This library is distributed in the hope that it will be useful, but WITHOUT
11   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12   FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13   details.
14   You should have received a copy of the GNU Lesser General Public License along
15   with this library; if not, write to the Free Software Foundation, Inc.,
16   59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17   */
18  
19  /**
20   * <p>Title: WSMO4J</p>
21   * <p>Description: WSMO API and a Reference Implementation</p>
22   * <p>Copyright:  Copyright (c) 2004-2005</p>
23   * <p>Company: OntoText Lab. / SIRMA </p>
24   */
25  
26  
27  package org.wsmo.validator;
28  
29  
30  import java.util.*;
31  import org.wsmo.common.*;
32  
33  
34  /**
35   * An interface representing validator for WSMO entities.
36   * The validator may perform specific model checks to ensure that the entity definition is
37   * compliant with the respective WSML variant
38   *
39   * @author not attributable
40   * @version $Revision: 1946 $ $Date: 2007-04-02 15:13:28 +0300 (Mon, 02 Apr 2007) $
41   * @since 0.4.0
42   */
43  public interface Validator {
44  
45      /**
46       * Checks whether a WSMO element definition is valid. The notion of "validity" is dependent only
47       * on the specific Validator implementation (f.e. a validity check may be whether a definition is
48       * compliant with a specific WSML variant)
49       * @param te the TopEntity to be validated (ontology, mediator, goal,...)
50       * @param errorMessages a collection where the validation specific error messages will be added (if any)
51       * @param warningMessages a collection where the validation specific warning messages will be added (if any)
52       * @return valid/invalid
53       * @see org.omwg.ontology.Ontology
54       */
55      boolean isValid(TopEntity te, List <ValidationError> errorMessages, List <ValidationWarning> warningMessages);
56  }
57  
58  /*
59   * $Log$
60   * Revision 1.3  2007/04/02 12:13:16  morcen
61   * Generics support added to wsmo-api, wsmo4j and wsmo-test
62   *
63   * Revision 1.2  2005/11/15 16:49:45  nathaliest
64   * added validation warning to the interface
65   *
66   * Revision 1.1  2005/09/09 15:45:06  marin_dimitrov
67   * moved from org.wsmo.common
68   *
69   * Revision 1.1  2005/06/01 10:30:24  marin_dimitrov
70   * v0.4.0
71   *
72   * Revision 1.5  2005/05/12 14:42:57  marin
73   * added @since tags
74   *
75   * Revision 1.4  2005/05/12 13:29:16  marin
76   * javadoc, header, footer, etc
77   *
78   */