KickJava   Java API By Example, From Geeks To Geeks.

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


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 26 Jan 2001
8  * Filename $RCSfile: LiteralAccessor.java,v $
9  * Revision $Revision: 1.6 $
10  * Release status Preview-release $State: Exp $
11  *
12  * Last modified on $Date: 2005/02/21 12:05:03 $
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

27 import com.hp.hpl.jena.rdf.model.*;
28
29
30
31 /**
32  * <p>Encapsulates the standard methods of modifying a property on a DAML object, where
33  * the value of the property is an RDF literal (as opposed to another DAML value,
34  * see {@link PropertyAccessor}.<p>
35  *
36  * @author Ian Dickinson, HP Labs (<a HREF="mailto:Ian.Dickinson@hp.com">email</a>)
37  * @version CVS info: $Id: LiteralAccessor.java,v 1.6 2005/02/21 12:05:03 andy_seaborne Exp $
38  */

39 public interface LiteralAccessor
40     extends PropertyAccessor
41 {
42     // Constants
43
//////////////////////////////////
44

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

49     /**
50      * <p>Answer the value of the encapsulated property. If it has no values, answer
51      * null. If it has one value, answer that value. Otherwise, answer an undetermined
52      * member of the set of values.<p>
53      *
54      * @return The literal value of the encapsulated property, or null.
55      */

56     public Literal getValue();
57
58
59     /**
60      * <p>Add a value to the encapsulated property.</p>
61      *
62      * @param value The value to be added, as a string.
63      */

64     public void addValue( String JavaDoc value );
65
66
67     /**
68      * <p>Remove a value from the encapsulated property.</p>
69      *
70      * @param value The value to be removed, as a string.
71      */

72     public void removeValue( String JavaDoc value );
73
74
75     /**
76      * <p>Answer true if the encapsulated property has the given value as one of its
77      * values.</p>
78      *
79      * @param value A String value to test for
80      * @return True if the RDF model contains a statement giving a value for
81      * the encapsulated property matching the given value.
82      */

83     public boolean hasValue( String JavaDoc value );
84
85
86
87 }
88
89
90 /*
91     (c) Copyright 2001, 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