KickJava   Java API By Example, From Geeks To Geeks.

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


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 19-Aug-2003
9  * Filename $RCSfile: DataRange.java,v $
10  * Revision $Revision: 1.6 $
11  * Release status $State: Exp $
12  *
13  * Last modified on $Date: 2005/02/21 12:04:27 $
14  * by $Author: andy_seaborne $
15  *
16  * (c) Copyright 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
17  * (see footer for full conditions)
18  *****************************************************************************/

19
20 // Package
21
///////////////
22
package com.hp.hpl.jena.ontology;
23
24
25
26 // Imports
27
///////////////
28
import java.util.Iterator JavaDoc;
29
30 import com.hp.hpl.jena.rdf.model.*;
31 import com.hp.hpl.jena.util.iterator.ExtendedIterator;
32
33
34 /**
35  * <p>
36  * Represents an ontology DataRange: a class-like construct that contains only concrete
37  * data literals. See section 6.2 of the OWL language reference for details. In OWL
38  * Full, there is no difference between a DataRange and a Class.
39  * </p>
40  *
41  * @author Ian Dickinson, HP Labs
42  * (<a HREF="mailto:Ian.Dickinson@hp.com" >email</a>)
43  * @version CVS $Id: DataRange.java,v 1.6 2005/02/21 12:04:27 andy_seaborne Exp $
44  */

45 public interface DataRange
46     extends OntResource
47 {
48     // Constants
49
//////////////////////////////////
50

51     // External signature methods
52
//////////////////////////////////
53

54     // oneOf
55

56     /**
57      * <p>Assert that this data range is exactly the enumeration of the given individuals. Any existing
58      * statements for <code>oneOf</code> will be removed.</p>
59      * @param en A list of literals that defines the permissible values for this datarange
60      * @exception OntProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile.
61      */

62     public void setOneOf( RDFList en );
63
64     /**
65      * <p>Add a literal to the enumeration that defines the permissible values of this class.</p>
66      * @param lit A literal to add to the enumeration
67      * @exception OntProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile.
68      */

69     public void addOneOf( Literal lit );
70
71     /**
72      * <p>Add each literal from the given iteratation to the
73      * enumeration that defines the permissible values of this datarange.</p>
74      * @param literals An iterator over literals
75      * @exception OntProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile.
76      */

77     public void addOneOf( Iterator JavaDoc literals );
78
79     /**
80      * <p>Answer a list of literals that defines the extension of this datarange.</p>
81      * @return A list of literals that is the permissible values
82      * @exception OntProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile.
83      */

84     public RDFList getOneOf();
85
86     /**
87      * <p>Answer an iterator over all of the literals that are declared to be the permissible values for
88      * this class. Each element of the iterator will be an {@link Literal}.</p>
89      * @return An iterator over the literals that are the permissible values
90      * @exception OntProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile.
91      */

92     public ExtendedIterator listOneOf();
93
94     /**
95      * <p>Answer true if the given literal is one of the enumerated literals that are the permissible values
96      * of this datarange.</p>
97      * @param lit A literal to test
98      * @return True if the given literal is in the permissible values for this class.
99      * @exception OntProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile.
100      */

101     public boolean hasOneOf( Literal lit );
102     
103     /**
104      * <p>Remove the statement that this enumeration includes <code>lit</code> among its members. If this statement
105      * is not true of the current model, nothing happens.</p>
106      * @param lit A literal that may be declared to be part of this data range, and which is
107      * no longer to be one of the data range values.
108      */

109     public void removeOneOf( Literal lit );
110     
111
112 }
113
114
115 /*
116     (c) Copyright 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
117     All rights reserved.
118
119     Redistribution and use in source and binary forms, with or without
120     modification, are permitted provided that the following conditions
121     are met:
122
123     1. Redistributions of source code must retain the above copyright
124        notice, this list of conditions and the following disclaimer.
125
126     2. Redistributions in binary form must reproduce the above copyright
127        notice, this list of conditions and the following disclaimer in the
128        documentation and/or other materials provided with the distribution.
129
130     3. The name of the author may not be used to endorse or promote products
131        derived from this software without specific prior written permission.
132
133     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
134     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
135     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
136     IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
137     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
138     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
139     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
140     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
141     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
142     THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
143 */

144
Popular Tags