KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > ontology > daml > DAMLProperty


1 /*****************************************************************************
2  * Source code information
3  * -----------------------
4  * Original author Ian Dickinson, HP Labs Bristol
5  * Author email Ian.Dickinson@hp.com
6  * Package Jena
7  * Created 4 Jan 2001
8  * Filename $RCSfile: DAMLProperty.java,v $
9  * Revision $Revision: 1.8 $
10  * Release status Preview-release $State: Exp $
11  *
12  * Last modified on $Date: 2005/02/21 12:05:01 $
13  * by $Author: andy_seaborne $
14  *
15  * (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
16  * (see footer for full conditions)
17  *****************************************************************************/

18
19 // Package
20
///////////////
21
package com.hp.hpl.jena.ontology.daml;
22
23
24 // Imports
25
///////////////
26
import com.hp.hpl.jena.ontology.*;
27 import com.hp.hpl.jena.util.iterator.ExtendedIterator;
28
29
30 /**
31  * <p>Encapsulates a property in a DAML ontology. According to the specification,
32  * a daml:Property is an alias for rdf:Property. It also acts as the super-class for
33  * more semantically meaningful property classes: datatype properties and object properties.
34  * The DAML spec also allows any property to be unique (that is, it defines UniqueProperty
35  * as a sub-class of Property), so uniqueness is modelled here as an attribute of a DAMLProperty.</p>
36  *
37  * @author Ian Dickinson, HP Labs (<a HREF="mailto:Ian.Dickinson@hp.com">email</a>)
38  * @version CVS info: $Id: DAMLProperty.java,v 1.8 2005/02/21 12:05:01 andy_seaborne Exp $
39  */

40 public interface DAMLProperty
41     extends DAMLCommon, OntProperty
42 {
43     // Constants
44
//////////////////////////////////
45

46     // External signature methods
47
//////////////////////////////////
48

49
50     /**
51      * <p>Set the flag to indicate that this property is to be considered
52      * unique - that is, it is defined by the DAML class UniqueProperty.</p>
53      *
54      * @param unique True for a unique property
55      */

56     public void setIsUnique( boolean unique );
57
58
59     /**
60      * <p>Answer true if this property is to be considered unique, that is
61      * it is characterised by the DAML class UniqueProperty</p>
62      *
63      * @return True if this property is unique
64      */

65     public boolean isUnique();
66
67
68     /**
69      * <p>Property accessor for the <code>domain</code> of a property. This
70      * denotes the class that is the domain of the relation denoted by
71      * the property.
72      *
73      * @return Property accessor for 'domain'.
74      */

75     public PropertyAccessor prop_domain();
76
77
78     /**
79      * <p>Property accessor for the <code>subPropertyOf</code> property of a property. This
80      * denotes the property that is the super-property of this property.</p>
81      *
82      * @return Property accessor for <code>daml:subPropertyOf</code>
83      */

84     public PropertyAccessor prop_subPropertyOf();
85
86
87     /**
88      * <p>Property accessor for the <code>samePropertyAs</code> property of a DAML Property. This
89      * denotes that the named property and this one have the same elements.</p>
90      *
91      * @return PropertyAccessor for <code>samePropertyAs</code>
92      */

93     public PropertyAccessor prop_samePropertyAs();
94
95
96     /**
97      * Property accessor for the <code>range</code> of a property. This
98      * denotes the class that is the range of the relation denoted by
99      * the property.
100      *
101      * @return Property accessor for <code>range</code>.
102      */

103     public PropertyAccessor prop_range();
104
105
106     /**
107      * <p>Answer an iterator over all of the DAML properties that are equivalent to this
108      * value under the <code>daml:samePropertyAs</code> relation. Note: only considers
109      * <code>daml:samePropertyAs</code>, for general equivalence, see
110      * {@link #getEquivalentValues}. Note also that the first member of the iteration is
111      * always the DAMLProperty on which the method is invoked: trivially, a property is
112      * a member of the set of properties equivalent to itself. If the caller wants
113      * the set of properties equivalent to this one, not including itself, simply ignore
114      * the first element of the iteration.</p>
115      *
116      * @return an iterator ranging over every equivalent DAML property.
117      */

118     public ExtendedIterator getSameProperties();
119
120
121     /**
122      * <p>Answer an iterator over all of the DAML objects that are equivalent to this
123      * property, which will be the union of <code>daml:equivalentTo</code> and
124      * <code>daml:samePropertyAs</code>.</p>
125      *
126      * @return an iterator ranging over every equivalent DAML property.
127      */

128     public ExtendedIterator getEquivalentValues();
129
130
131     /**
132      * <p>Answer an iterator over all of the DAML classes that form the domain of this
133      * property. The actual domain of the relation denoted by this property is the
134      * conjunction of all of the classes mention by the RDFS:domain property of this
135      * DAML property and all of its super-properties.</p>
136      *
137      * @return an iterator whose values will be the DAML classes that define the domain
138      * of the relation
139      */

140     public ExtendedIterator getDomainClasses();
141
142
143     /**
144      * <p>Answer an iterator over all of the DAML classes that form the range of this
145      * property. The actual range of the relation denoted by this property is the
146      * conjunction of all of the classes mention by the RDFS:range property of this
147      * DAML property and all of its super-properties.</p>
148      *
149      * @return an iterator whose values will be the DAML classes that define the range
150      * of the relation
151      */

152     public ExtendedIterator getRangeClasses();
153
154
155     /**
156      * <p>Answer an iterator over all of the super-properties of this property, using the
157      * <code>rdfs:subPropertyOf</code> relation (or one of its aliases). The set of super-properties
158      * is transitively closed over the subPropertyOf relation.</p>
159      *
160      * @return An iterator over the super-properties of this property,
161      * whose values will be DAMLProperties.
162      */

163     public ExtendedIterator getSuperProperties();
164
165
166     /**
167      * <p>Answer an iterator over all of the super-properties of this property.</p>
168      * <p><strong>Note:</strong> In a change to the Jena 1 DAML API, whether
169      * this iterator includes <em>inferred</em> super-properties is determined
170      * not by a flag at the API level, but by the construction of the DAML
171      * model itself. See {@linkplain com.hp.hpl.jena.rdf.model.ModelFactory the model factory}
172      * for details. The boolean parameter
173      * <code>closed</code> is now re-interpreted to mean the inverse of <code>
174      * direct</code>, see {@link OntClass#listSubClasses(boolean)} for more details.
175      * </p>
176      *
177      * @param closed If true, return all available values; otherwise, return
178      * only local (direct) super-properties. See note for details.
179      * @return An iterator over this property's super-properties.
180      */

181     public ExtendedIterator getSuperProperties( boolean closed );
182
183
184     /**
185      * <p>Answer an iterator over all of the sub-properties of this property.</p>
186      *
187      * @return An iterator over the sub-properties of this property.
188      */

189     public ExtendedIterator getSubProperties();
190
191
192     /**
193      * <p>Answer an iterator over all of the sub-properties of this property.</p>
194      * <p><strong>Note:</strong> In a change to the Jena 1 DAML API, whether
195      * this iterator includes <em>inferred</em> sub-properties is determined
196      * not by a flag at the API level, but by the construction of the DAML
197      * model itself. See {@linkplain com.hp.hpl.jena.rdf.model.ModelFactory the model factory}
198      * for details. The boolean parameter
199      * <code>closed</code> is now re-interpreted to mean the inverse of <code>
200      * direct</code>, see {@link OntClass#listSubClasses(boolean)} for more details.
201      * </p>
202      *
203      * @param closed If true, return all available values; otherwise, return
204      * only local (direct) sub-properties. See note for details.
205      * @return An iterator over this property's sub-properties.
206      */

207     public ExtendedIterator getSubProperties( boolean closed );
208 }
209
210
211 /*
212     (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
213     All rights reserved.
214
215     Redistribution and use in source and binary forms, with or without
216     modification, are permitted provided that the following conditions
217     are met:
218
219     1. Redistributions of source code must retain the above copyright
220        notice, this list of conditions and the following disclaimer.
221
222     2. Redistributions in binary form must reproduce the above copyright
223        notice, this list of conditions and the following disclaimer in the
224        documentation and/or other materials provided with the distribution.
225
226     3. The name of the author may not be used to endorse or promote products
227        derived from this software without specific prior written permission.
228
229     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
230     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
231     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
232     IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
233     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
234     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
235     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
236     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
237     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
238     THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
239 */

240
241
Popular Tags