KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > ontology > QualifiedRestriction


1 /*****************************************************************************
2  * Source code information
3  * -----------------------
4  * Original author Ian Dickinson, HP Labs Bristol
5  * Author email ian.dickinson@hp.com
6  * Package Jena 2
7  * Web http://sourceforge.net/projects/jena/
8  * Created 08-Sep-2003
9  * Filename $RCSfile: QualifiedRestriction.java,v $
10  * Revision $Revision: 1.4 $
11  * Release status $State: Exp $
12  *
13  * Last modified on $Date: 2005/02/21 12:04:42 $
14  * by $Author: andy_seaborne $
15  *
16  * (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
17  * [See end of file]
18  *****************************************************************************/

19
20 // Package
21
///////////////
22
package com.hp.hpl.jena.ontology;
23
24
25 // Imports
26
///////////////
27

28 /**
29  * <p>
30  * Represents a qualified restriction, in which all values of the restricted property
31  * are required to be members of a given class. At present, this capability is only
32  * part of DAML+OIL, not OWL.
33  * </p>
34  *
35  * @author Ian Dickinson, HP Labs
36  * (<a HREF="mailto:Ian.Dickinson@hp.com" >email</a>)
37  * @version CVS $Id: QualifiedRestriction.java,v 1.4 2005/02/21 12:04:42 andy_seaborne Exp $
38  */

39 public interface QualifiedRestriction
40     extends Restriction
41 {
42     // Constants
43
//////////////////////////////////
44

45     // External signature methods
46
//////////////////////////////////
47

48     /**
49      * <p>Assert that this qualified restriction restricts the property to have a given
50      * cardinality and to have values belonging to the class denoted by <code>hasClassQ</code>.
51      * Any existing statements for <code>hasClassQ</code>
52      * will be removed.</p>
53      * @param cls The class to which all of the value of the restricted property must belong
54      * @exception OntProfileException If the {@link Profile#HAS_CLASS_Q()} property is not supported in the current language profile.
55      */

56     public void setHasClassQ( OntClass cls );
57
58     /**
59      * <p>Answer the class to which all values of the restricted property belong.</p>
60      * @return The ontology class of the restricted property values
61      * @exception OntProfileException If the {@link Profile#HAS_CLASS_Q()} property is not supported in the current language profile.
62      */

63     public OntClass getHasClassQ();
64
65     /**
66      * <p>Answer true if this qualified property restriction has the given class as
67      * the class to which all of the property values must belong.</p>
68      * @param cls The class to test against
69      * @return True if the given class is the class to which all members of this restriction must belong
70      * @exception OntProfileException If the {@link Profile#HAS_CLASS_Q()} property is not supported in the current language profile.
71      */

72     public boolean hasHasClassQ( OntClass cls );
73     
74     /**
75      * <p>Remove the statement that this restriction has the given class
76      * as the class to which all values must belong. If this statement
77      * is not true of the current model, nothing happens.</p>
78      * @param cls The ont class that is the object of the <code>hasClassQ</code> property.
79      */

80     public void removeHasClassQ( OntClass cls );
81     
82
83 }
84
85 /*
86  * (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
87  * All rights reserved.
88  *
89  * Redistribution and use in source and binary forms, with or without
90  * modification, are permitted provided that the following conditions
91  * are met:
92  * 1. Redistributions of source code must retain the above copyright
93  * notice, this list of conditions and the following disclaimer.
94  * 2. Redistributions in binary form must reproduce the above copyright
95  * notice, this list of conditions and the following disclaimer in the
96  * documentation and/or other materials provided with the distribution.
97  * 3. The name of the author may not be used to endorse or promote products
98  * derived from this software without specific prior written permission.
99  *
100  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
101  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
102  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
103  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
104  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
105  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
106  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
107  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
108  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
109  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
110  */

111
Popular Tags