KickJava   Java API By Example, From Geeks To Geeks.

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


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 07-May-2003
9  * Filename $RCSfile: HasValueRestriction.java,v $
10  * Revision $Revision: 1.8 $
11  * Release status $State: Exp $
12  *
13  * Last modified on $Date: 2005/02/21 12:04:28 $
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 // Imports
26
///////////////
27
import com.hp.hpl.jena.rdf.model.*;
28
29
30 /**
31  * <p>
32  * A property restriction that requires the named property to have a given individual as
33  * its value.
34  * </p>
35  *
36  * @author Ian Dickinson, HP Labs
37  * (<a HREF="mailto:Ian.Dickinson@hp.com" >email</a>)
38  * @version CVS $Id: HasValueRestriction.java,v 1.8 2005/02/21 12:04:28 andy_seaborne Exp $
39  */

40 public interface HasValueRestriction
41     extends Restriction
42 {
43     // Constants
44
//////////////////////////////////
45

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

49     // hasValue
50

51     /**
52      * <p>Assert that this restriction restricts the property to have the given
53      * value. Any existing statements for <code>hasValue</code>
54      * will be removed.</p>
55      * @param value The RDF value (an individual or a literal)
56      * that is the value that the restricted property must have to be a member of the
57      * class defined by this restriction.
58      * @exception OntProfileException If the {@link Profile#HAS_VALUE()} property is not supported in the current language profile.
59      */

60     public void setHasValue( RDFNode value );
61
62     /**
63      * <p>Answer the RDF value that all values of the restricted property must be equal to.</p>
64      * @return An RDFNode that is the value of the restricted property
65      * @exception OntProfileException If the {@link Profile#HAS_VALUE()} property is not supported in the current language profile.
66      */

67     public RDFNode getHasValue();
68
69     /**
70      * <p>Answer true if this property restriction has the given RDF value as the value which all
71      * values of the restricted property must equal.</p>
72      * @param value An RDF value to test
73      * @return True if the given value is the value of the restricted property in this restriction
74      * @exception OntProfileException If the {@link Profile#HAS_VALUE()} property is not supported in the current language profile.
75      */

76     public boolean hasValue( RDFNode value );
77     
78     /**
79      * <p>Remove the statement that this restriction requires the restricted property to have
80      * the given value. If this statement
81      * is not true of the current model, nothing happens.</p>
82      * @param value An RDF value that is to be removed as the required value for the restricted property
83      */

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

119
120
Popular Tags