1.1 --- a/java/alt2xml/src/cz/frantovo/alt2xml/SAXTovarna.java Tue Jan 03 12:55:38 2012 +0100
1.2 +++ b/java/alt2xml/src/cz/frantovo/alt2xml/SAXTovarna.java Tue Jan 03 14:39:16 2012 +0100
1.3 @@ -1,8 +1,6 @@
1.4 package cz.frantovo.alt2xml;
1.5
1.6 import cz.frantovo.alt2xml.vstup.SuperReader;
1.7 -import java.util.logging.Level;
1.8 -import java.util.logging.Logger;
1.9 import javax.xml.parsers.ParserConfigurationException;
1.10 import javax.xml.parsers.SAXParser;
1.11 import javax.xml.parsers.SAXParserFactory;
1.12 @@ -25,17 +23,16 @@
1.13
1.14 @Override
1.15 public void setFeature(String name, boolean value) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException {
1.16 - throw new UnsupportedOperationException("Not supported yet.");
1.17 + throw new SAXNotSupportedException("Zatím není podporováno.");
1.18 }
1.19
1.20 @Override
1.21 public boolean getFeature(String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException {
1.22 - throw new UnsupportedOperationException("Not supported yet.");
1.23 + throw new SAXNotSupportedException("Zatím není podporováno.");
1.24 }
1.25
1.26 private static class MůjParser extends SAXParser {
1.27
1.28 - private static final Logger log = Logger.getLogger(MůjParser.class.getName());
1.29 private XMLReader xmlReader;
1.30
1.31 public MůjParser(XMLReader xmlReader) {
1.32 @@ -44,9 +41,7 @@
1.33
1.34 @Override
1.35 public Parser getParser() throws SAXException {
1.36 - // TODO: dopsat
1.37 - log.log(Level.FINE, "getParser");
1.38 - return null;
1.39 + throw new SAXException("Není podporováno.");
1.40 }
1.41
1.42 @Override
1.43 @@ -56,29 +51,22 @@
1.44
1.45 @Override
1.46 public boolean isNamespaceAware() {
1.47 - // TODO: dopsat
1.48 - log.log(Level.FINE, "isNamespaceAware");
1.49 return false;
1.50 }
1.51
1.52 @Override
1.53 public boolean isValidating() {
1.54 - // TODO: dopsat
1.55 - log.log(Level.FINE, "isValidating");
1.56 return false;
1.57 }
1.58
1.59 @Override
1.60 public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException {
1.61 - // TODO: dopsat
1.62 - log.log(Level.FINE, "setProperty: {0} = {1}", new Object[]{name, value});
1.63 + xmlReader.setProperty(name, value);
1.64 }
1.65
1.66 @Override
1.67 public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
1.68 - // TODO: dopsat
1.69 - log.log(Level.FINE, "getProperty: {0}", name);
1.70 - return null;
1.71 + return xmlReader.getProperty(name);
1.72 }
1.73 }
1.74 }
1.75 \ No newline at end of file