1 31 package com.hp.hpl.jena.rdf.arp; 32 import org.xml.sax.*; 33 34 68 public class SAX2RDF extends SAX2RDFImpl 69 implements ARPConfig { 70 81 static public SAX2RDF newInstance(String base) throws MalformedURIException { 82 return new SAX2RDF(base,""); 83 } 84 100 static public SAX2RDF newInstance(String base, String lang) throws MalformedURIException { 101 return new SAX2RDF(base,lang); 102 } 103 125 public void startPrefixMapping (String prefix, String uri) 126 { super.startPrefixMapping(prefix,uri); 127 } 128 129 SAX2RDF(String base, String lang) throws MalformedURIException { 130 super(base,lang); 131 initParse(base); 132 } 133 139 public ARPHandlers getHandlers() { 140 return super.getHandlers(); 141 } 142 148 public void setHandlersWith(ARPHandlers handlers) { 149 super.setHandlersWith(handlers); 150 } 151 154 public ARPOptions getOptions() { 155 return super.getOptions(); 156 } 157 160 public void setOptionsWith(ARPOptions opts) { 161 super.setOptionsWith(opts); 162 163 } 164 171 static public void installHandlers(XMLReader rdr, XMLHandler sax2rdf) 172 throws SAXException 173 { 174 rdr.setEntityResolver(sax2rdf); 175 rdr.setDTDHandler(sax2rdf); 176 rdr.setContentHandler(sax2rdf); 177 rdr.setErrorHandler(sax2rdf); 178 rdr.setFeature("http://xml.org/sax/features/namespaces", true); 179 rdr.setFeature( 180 "http://xml.org/sax/features/namespace-prefixes", 181 true); 182 rdr.setProperty( 183 "http://xml.org/sax/properties/lexical-handler", 184 sax2rdf); 185 rdr.setFeature( 186 "http://apache.org/xml/features/allow-java-encodings",true); 187 188 } 189 } 190 191 192 | Popular Tags |