KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > rdf > arp > ARPDatatypeLiteral


1 /*
2  * (c) Copyright 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
3  * [see end of file]
4  */

5
6 package com.hp.hpl.jena.rdf.arp;
7
8 /**
9  * @author Jeremy J. Carroll
10  *
11  */

12 class ARPDatatypeLiteral implements ALiteral {
13
14     final private String JavaDoc datatype;
15    // final private String lang;
16
final private String JavaDoc lexForm;
17     ARPDatatypeLiteral(ARPString lexf,URIReference dt){
18        datatype = dt.getURI();
19     // lang = lexf.getLang();
20
lexForm = lexf.toString();
21     }
22     /**
23      * @see com.hp.hpl.jena.rdf.arp.ALiteral#isWellFormedXML()
24      */

25     public boolean isWellFormedXML() {
26         return false; //datatype.equals(ARPString.RDFXMLLiteral);
27
}
28     /**
29      * @see com.hp.hpl.jena.rdf.arp.ALiteral#getParseType()
30      */

31     public String JavaDoc getParseType() {
32         return null;
33     }
34     public String JavaDoc toString() {
35         return lexForm;
36     }
37
38     /**
39      * @see com.hp.hpl.jena.rdf.arp.ALiteral#getDatatypeURI()
40      */

41     public String JavaDoc getDatatypeURI() {
42         return datatype;
43     }
44
45     /**
46      * @see com.hp.hpl.jena.rdf.arp.ALiteral#getLang()
47      */

48     public String JavaDoc getLang() {
49         return ""; //lang;
50
}
51
52 }
53
54 /*
55  * (c) Copyright 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
56  * All rights reserved.
57  *
58  * Redistribution and use in source and binary forms, with or without
59  * modification, are permitted provided that the following conditions
60  * are met:
61  * 1. Redistributions of source code must retain the above copyright
62  * notice, this list of conditions and the following disclaimer.
63  * 2. Redistributions in binary form must reproduce the above copyright
64  * notice, this list of conditions and the following disclaimer in the
65  * documentation and/or other materials provided with the distribution.
66  * 3. The name of the author may not be used to endorse or promote products
67  * derived from this software without specific prior written permission.
68  *
69  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
70  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
71  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
72  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
73  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
74  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
75  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
76  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
77  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
78  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
79  */

80
Popular Tags