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 17 Sept 2001 8 * Filename $RCSfile: DAMLDataInstance.java,v $ 9 * Revision $Revision: 1.7 $ 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.datatypes.RDFDatatype; 27 28 29 30 /** 31 * <p>A data instance is a specific type of DAML object that represents the instantiation 32 * of a DAML datatype. The instance is a resource whose <code>rdf:value</code> is a typed literal.</p> 33 * 34 * @author Ian Dickinson, HP Labs (<a HREF="mailto:Ian.Dickinson@hp.com">email</a>) 35 * @version CVS info: $Id: DAMLDataInstance.java,v 1.7 2005/02/21 12:04:58 andy_seaborne Exp $ 36 */ 37 public interface DAMLDataInstance 38 extends DAMLInstance 39 { 40 // Constants 41 ////////////////////////////////// 42 43 44 45 // External signature methods 46 ////////////////////////////////// 47 48 /** 49 * <p>Answer the typed value translator for values encoded by the datatype of this 50 * instance.</p> 51 * 52 * @return The datatype translator defined for the <code>rdf:type</code> of this instance 53 */ 54 public RDFDatatype getDatatype(); 55 56 57 /** 58 * <p>Answer the value of this instance as a Java object, translated from the 59 * serialised RDF representation by the Dataype's type mapper.</p> 60 * 61 * @return The value of this instance, or null if either the translator or the 62 * serialised value is defined 63 */ 64 public Object getValue(); 65 66 67 /** 68 * <p>Set the value of this instance to the given Java value, which will be 69 * serialised into the RDF graph by the datatype's translator.</p> 70 */ 71 public void setValue( Object value ); 72 73 } 74 75 76 /* 77 (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP 78 All rights reserved. 79 80 Redistribution and use in source and binary forms, with or without 81 modification, are permitted provided that the following conditions 82 are met: 83 84 1. Redistributions of source code must retain the above copyright 85 notice, this list of conditions and the following disclaimer. 86 87 2. Redistributions in binary form must reproduce the above copyright 88 notice, this list of conditions and the following disclaimer in the 89 documentation and/or other materials provided with the distribution. 90 91 3. The name of the author may not be used to endorse or promote products 92 derived from this software without specific prior written permission. 93 94 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 95 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 96 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 97 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 98 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 99 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 100 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 101 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 102 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 103 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 104 */ 105 106