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: IntLiteralAccessor.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:02 $ 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 28 29 /** 30 * <p>Encapsulates the standard methods of modifying a property on a DAML object, where 31 * the value of the property is an RDF literal (as opposed to another DAML value, 32 * see {@link PropertyAccessor}, and the literal is known to encapsulate an integer value.</p> 33 * 34 * @author Ian Dickinson, HP Labs (<a HREF="mailto:Ian.Dickinson@hp.com">email</a>) 35 * @version CVS info: $Id: IntLiteralAccessor.java,v 1.6 2005/02/21 12:05:02 andy_seaborne Exp $ 36 */ 37 public interface IntLiteralAccessor 38 extends LiteralAccessor 39 { 40 // Constants 41 ////////////////////////////////// 42 43 44 45 // External signature methods 46 ////////////////////////////////// 47 48 /** 49 * <p>Answer the integer value of the encapsulated property.</p> 50 * 51 * @return A value for the encapsulated property in the model, as an integer. 52 */ 53 public int getInt(); 54 55 56 /** 57 * <p>Add a value to the encapsulated property.</p> 58 * 59 * @param value The value to be added, as an int. 60 */ 61 public void addInt( int value ); 62 63 64 /** 65 * <p>Remove an integer value from the encapsulated property.</p> 66 * 67 * @param value The value to be removed, as an int. 68 */ 69 public void removeInt( int value ); 70 71 72 /** 73 * <p>Answer true if the encapsulated property has the given value as one of its 74 * values.</p> 75 * 76 * @param value An int value to test for 77 * @return True if the RDF model contains a statement giving a value for 78 * the encapsulated property matching the given value. 79 */ 80 public boolean hasIntValue( int value ); 81 82 } 83 84 85 86 /* 87 (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP 88 All rights reserved. 89 90 Redistribution and use in source and binary forms, with or without 91 modification, are permitted provided that the following conditions 92 are met: 93 94 1. Redistributions of source code must retain the above copyright 95 notice, this list of conditions and the following disclaimer. 96 97 2. Redistributions in binary form must reproduce the above copyright 98 notice, this list of conditions and the following disclaimer in the 99 documentation and/or other materials provided with the distribution. 100 101 3. The name of the author may not be used to endorse or promote products 102 derived from this software without specific prior written permission. 103 104 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 105 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 106 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 107 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 108 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 109 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 110 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 111 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 112 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 113 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 114 */ 115 116