KickJava   Java API By Example, From Geeks To Geeks.

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


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: CardinalityQRestriction.java,v $
10  * Revision $Revision: 1.4 $
11  * Release status $State: Exp $
12  *
13  * Last modified on $Date: 2005/02/21 12:04:25 $
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  * Interface representing the ontology abstraction for a qualified cardinality
31  * restriction. A qualified restriction is a DAML+OIL term for a restriction
32  * with a cardinality constraint <em>and</em> a constraint that the values of
33  * the restricted property must all belong to the given class. At the current
34  * time, qualified restrictions are part of DAML+OIL, but not part of OWL.
35  * </p>
36  *
37  * @author Ian Dickinson, HP Labs
38  * (<a HREF="mailto:Ian.Dickinson@hp.com" >email</a>)
39  * @version CVS $Id: CardinalityQRestriction.java,v 1.4 2005/02/21 12:04:25 andy_seaborne Exp $
40  */

41 public interface CardinalityQRestriction
42     extends QualifiedRestriction
43 {
44     // Constants
45
//////////////////////////////////
46

47     // External signature methods
48
//////////////////////////////////
49

50     /**
51      * <p>Assert that this restriction restricts the property to have the given
52      * cardinality. Any existing statements for <code>cardinalityQ</code>
53      * will be removed.</p>
54      * @param cardinality The cardinality of the restricted property
55      * @exception OntProfileException If the {@link Profile#CARDINALITY_Q()} property is not supported in the current language profile.
56      */

57     public void setCardinalityQ( int cardinality );
58
59     /**
60      * <p>Answer the cardinality of the restricted property.</p>
61      * @return The cardinality of the restricted property
62      * @exception OntProfileException If the {@link Profile#CARDINALITY_Q()} property is not supported in the current language profile.
63      */

64     public int getCardinalityQ();
65
66     /**
67      * <p>Answer true if this property restriction has the given cardinality.</p>
68      * @param cardinality The cardinality to test against
69      * @return True if the given cardinality is the cardinality of the restricted property in this restriction
70      * @exception OntProfileException If the {@link Profile#CARDINALITY_Q()} property is not supported in the current language profile.
71      */

72     public boolean hasCardinalityQ( int cardinality );
73     
74     /**
75      * <p>Remove the statement that this restriction has the given cardinality
76      * for the restricted property. If this statement
77      * is not true of the current model, nothing happens.</p>
78      * @param cardinality A cardinality value to be removed from this restriction
79      * @exception OntProfileException If the {@link Profile#CARDINALITY_Q()} property is not supported in the current language profile.
80      */

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

114
Popular Tags