KickJava   Java API By Example, From Geeks To Geeks.

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


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 5 Jan 2001
8  * Filename $RCSfile: DAMLCommon.java,v $
9  * Revision $Revision: 1.10 $
10  * Release status Preview-release $State: Exp $
11  *
12  * Last modified on $Date: 2005/02/21 12:04:58 $
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.rdf.model.*;
27 import com.hp.hpl.jena.ontology.*;
28
29 import com.hp.hpl.jena.util.iterator.ExtendedIterator;
30 import com.hp.hpl.jena.vocabulary.*;
31
32
33 /**
34  * <p>Abstract super-class for all DAML resources (including properties). Defines shared
35  * implementations and common services, such as property manipulation, vocabulary
36  * management and <code>rdf:type</code> management. Also defines accessors for common
37  * properties, including <code>comment</code>, <code>label</code>, and <code>equivalentTo</code>.
38  * </p>
39  *
40  * @author Ian Dickinson, HP Labs (<a HREF="mailto:Ian.Dickinson@hp.com">email</a>)
41  * @version CVS info: $Id: DAMLCommon.java,v 1.10 2005/02/21 12:04:58 andy_seaborne Exp $
42  */

43 public interface DAMLCommon
44     extends OntResource
45 {
46     // Constants
47
//////////////////////////////////
48

49
50     // External signature methods
51
//////////////////////////////////
52

53     /**
54      * <p>Answer the DAML model wherein this value is stored.</p>
55      *
56      * @return a DAMLModel reference.
57      */

58     public DAMLModel getDAMLModel();
59
60
61     /**
62      * <p>Add an RDF type property for this node in the underlying model. If the replace flag
63      * is true, this type will replace any current type property for the node. Otherwise,
64      * the type will be in addition to any existing type property.</p>
65      * <p>Deprecated in favour of {@link OntResource#addRDFType} for add, or
66      * {@link OntResource#setRDFType} for replace.</p>
67      *
68      * @param rdfClass The RDF resource denoting the class that will be new value for the rdf:type property.
69      * @param replace If true, the given class will replace any existing type property for this
70      * value, otherwise it will be added as an extra type statement.
71      * @deprecated Use {@link OntResource#addRDFType} or {@link OntResource#setRDFType}.
72      */

73     public void setRDFType( Resource rdfClass, boolean replace );
74
75
76     /**
77      * <p>Answer an iterator over all of the types to which this resource belongs. Optionally,
78      * restrict the results to the most specific types, so that any class that is subsumed by
79      * another class in this resource's set of types is not reported.</p>
80      * <p><strong>Note:</strong> that the interpretation of the <code>complete</code> flag has
81      * changed since Jena 1.x. Previously, the boolean flag was to generated the transitive
82      * closure of the class hierarchy; this is now handled by the underlyin inference graph
83      * (if specified). Now the flag is used to restrict the returned values to the most-specific
84      * types for this resource.</p>
85      *
86      * @param complete If true, return all known types; if false, return only the most-specific
87      * types.
88      * @return an iterator over the set of this value's classes
89      */

90     public ExtendedIterator getRDFTypes( boolean complete );
91
92
93     /**
94      * <p>Answer the DAML+OIL vocabulary that corresponds to the namespace that this value
95      * was declared in.</p>
96      *
97      * @return A vocabulary object
98      */

99     public DAMLVocabulary getVocabulary();
100
101
102     /**
103      * <p>Answer an iterator over all of the DAML objects that are equivalent to this
104      * value under the <code>daml:equivalentTo</code> relation.
105      * Note that the first member of the iteration is
106      * always the DAML value on which the method is invoked: trivially, a value is
107      * a member of the set of values equivalent to itself. If the caller wants
108      * the set of values equivalent to this one, not including itself, simply ignore
109      * the first element of the iteration.</p>
110      *
111      * @return An iterator ranging over every equivalent DAML value
112      */

113     public ExtendedIterator getEquivalentValues();
114
115
116     /**
117      * <p>Answer the set of equivalent values to this value, but not including the
118      * value itself. The iterator will range over a set: each element occurs only
119      * once.</p>
120      *
121      * @return An iteration ranging over the set of values that are equivalent to this
122      * value, but not itself.
123      */

124     public ExtendedIterator getEquivalenceSet();
125
126
127     // Properties
128
/////////////
129

130     /**
131      * <p>Accessor for the property of the label on the value, whose value
132      * is a literal (string).</p>
133      *
134      * @return Literal accessor for the label property
135      */

136     public LiteralAccessor prop_label();
137
138     /**
139      * <p>Accessor for the property of the comment on the value, whose value
140      * is a literal (string).</p>
141      *
142      * @return Literal accessor for the comment property
143      */

144     public LiteralAccessor prop_comment();
145
146     /**
147      * <p>Property accessor for the <code>equivalentTo</code> property. This
148      * denotes that two terms have the same meaning. The DAML spec helpfully
149      * says: <i>for equivalentTo(X, Y), read X is an equivalent term to Y</i>.
150      *
151      * @return Property accessor for <code>equivalentTo</code>.
152      */

153     public PropertyAccessor prop_equivalentTo();
154
155
156     /**
157      * <p>Property accessor for the <code>rdf:type</code> property of a DAML value.
158      *
159      * @return Property accessor for <code>rdf:type</code>
160      */

161     public PropertyAccessor prop_type();
162
163
164 }
165
166
167
168 /*
169     (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
170     All rights reserved.
171
172     Redistribution and use in source and binary forms, with or without
173     modification, are permitted provided that the following conditions
174     are met:
175
176     1. Redistributions of source code must retain the above copyright
177        notice, this list of conditions and the following disclaimer.
178
179     2. Redistributions in binary form must reproduce the above copyright
180        notice, this list of conditions and the following disclaimer in the
181        documentation and/or other materials provided with the distribution.
182
183     3. The name of the author may not be used to endorse or promote products
184        derived from this software without specific prior written permission.
185
186     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
187     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
188     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
189     IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
190     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
191     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
192     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
193     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
194     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
195     THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
196 */

197
198
Popular Tags