KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > ontology > daml > impl > DAMLDatatypePropertyImpl


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 4 Jan 2001
8  * Filename $RCSfile: DAMLDatatypePropertyImpl.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:19 $
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.impl;
22
23
24 // Imports
25
///////////////
26
import com.hp.hpl.jena.enhanced.*;
27 import com.hp.hpl.jena.graph.*;
28 import com.hp.hpl.jena.ontology.*;
29 import com.hp.hpl.jena.ontology.daml.*;
30 import com.hp.hpl.jena.vocabulary.DAML_OIL;
31
32
33
34 /**
35  * <p>Java encapsulation of a datatype property in a DAML ontology. A datatype property
36  * is a partition of the class of all properties, whose range values are drawn from concrete
37  * domains represented by XML schema expressions.</p>
38  *
39  * @author Ian Dickinson, HP Labs (<a HREF="mailto:Ian.Dickinson@hp.com">email</a>)
40  * @version CVS info: $Id: DAMLDatatypePropertyImpl.java,v 1.6 2005/02/21 12:05:19 andy_seaborne Exp $
41  */

42 public class DAMLDatatypePropertyImpl
43     extends DAMLPropertyImpl
44     implements DAMLDatatypeProperty
45 {
46     // Constants
47
//////////////////////////////////
48

49     
50     // Static variables
51
//////////////////////////////////
52

53     /**
54      * A factory for generating DAMLDataDatatypeProperty facets from nodes in enhanced graphs.
55      * Note: should not be invoked directly by user code: use
56      * {@link com.hp.hpl.jena.rdf.model.RDFNode#as as()} instead.
57      */

58     public static Implementation factory = new Implementation() {
59         public EnhNode wrap( Node n, EnhGraph eg ) {
60             if (canWrap( n, eg )) {
61                 return new DAMLDatatypePropertyImpl( n, eg );
62             }
63             else {
64                 throw new ConversionException( "Cannot convert node " + n.toString() + " to DAMLDatatypeProperty" );
65             }
66         }
67             
68         public boolean canWrap( Node n, EnhGraph g ) {
69             return hasType( n, g, DAML_OIL.DatatypeProperty );
70         }
71     };
72
73     
74     // Instance variables
75
//////////////////////////////////
76

77     
78     
79     // Constructors
80
//////////////////////////////////
81

82     /**
83      * <p>
84      * Construct a DAML list represented by the given node in the given graph.
85      * </p>
86      *
87      * @param n The node that represents the resource
88      * @param g The enh graph that contains n
89      */

90     public DAMLDatatypePropertyImpl( Node n, EnhGraph g ) {
91         super( n, g );
92     }
93     
94     
95     // External signature methods
96
//////////////////////////////////
97

98     
99     
100     
101     
102     
103     // Internal implementation methods
104
//////////////////////////////////
105

106     
107     
108     
109     
110     //==============================================================================
111
// Inner class definitions
112
//==============================================================================
113

114     
115 }
116
117
118 /*
119     (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
120     All rights reserved.
121
122     Redistribution and use in source and binary forms, with or without
123     modification, are permitted provided that the following conditions
124     are met:
125
126     1. Redistributions of source code must retain the above copyright
127        notice, this list of conditions and the following disclaimer.
128
129     2. Redistributions in binary form must reproduce the above copyright
130        notice, this list of conditions and the following disclaimer in the
131        documentation and/or other materials provided with the distribution.
132
133     3. The name of the author may not be used to endorse or promote products
134        derived from this software without specific prior written permission.
135
136     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
137     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
138     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
139     IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
140     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
141     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
142     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
143     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
144     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
145     THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146 */

147
148
Popular Tags