01: /*
02: * (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
03: * [see end of file]
04: */
05:
06: package com.hp.hpl.jena.rdf.arp.impl;
07:
08: import org.xml.sax.SAXParseException;
09:
10: import com.hp.hpl.jena.rdf.arp.ALiteral;
11: import com.hp.hpl.jena.rdf.arp.states.Frame;
12:
13: /**
14: * @author Jeremy J. Carroll
15: *
16: */
17: public class ARPDatatypeLiteral extends TaintImpl implements ALiteral {
18:
19: final private String datatype;
20: final private String lexForm;
21:
22: public ARPDatatypeLiteral(Frame f, String lexf, URIReference dt)
23: throws SAXParseException {
24:
25: f.checkString(this , lexf);
26: datatype = dt.getURI();
27: lexForm = lexf;
28: if (dt.isTainted())
29: taint();
30: }
31:
32: /**
33: * @see com.hp.hpl.jena.rdf.arp.ALiteral#isWellFormedXML()
34: */
35: public boolean isWellFormedXML() {
36: return false; //datatype.equals(ARPString.RDFXMLLiteral);
37: }
38:
39: /**
40: * @see com.hp.hpl.jena.rdf.arp.ALiteral#getParseType()
41: * @deprecated
42: */
43: public String getParseType() {
44: return null;
45: }
46:
47: public String toString() {
48: return lexForm;
49: }
50:
51: /**
52: * @see com.hp.hpl.jena.rdf.arp.ALiteral#getDatatypeURI()
53: */
54: public String getDatatypeURI() {
55: return datatype;
56: }
57:
58: /**
59: * @see com.hp.hpl.jena.rdf.arp.ALiteral#getLang()
60: */
61: public String getLang() {
62: return ""; //lang;
63: }
64:
65: }
66:
67: /*
68: * (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
69: * All rights reserved.
70: *
71: * Redistribution and use in source and binary forms, with or without
72: * modification, are permitted provided that the following conditions
73: * are met:
74: * 1. Redistributions of source code must retain the above copyright
75: * notice, this list of conditions and the following disclaimer.
76: * 2. Redistributions in binary form must reproduce the above copyright
77: * notice, this list of conditions and the following disclaimer in the
78: * documentation and/or other materials provided with the distribution.
79: * 3. The name of the author may not be used to endorse or promote products
80: * derived from this software without specific prior written permission.
81: *
82: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
83: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
84: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
85: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
86: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
87: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
88: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
89: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
90: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
91: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
92: */
|