vladimir 2002/11/18 21:36:55
Modified: java/src/org/apache/xindice/client/xmldb/resources XMLResourceImpl.java Log: SAX feature and not SaxFeature Revision Changes Path 1.12 +26 -32 xml-xindice/java/src/org/apache/xindice/client/xmldb/resources/XMLResourceImpl.java Index: XMLResourceImpl.java =================================================================== RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/client/xmldb/resources/XMLResourceImpl.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- XMLResourceImpl.java 18 Nov 2002 16:16:50 -0000 1.11 +++ XMLResourceImpl.java 19 Nov 2002 05:36:55 -0000 1.12 @@ -92,7 +92,7 @@ saxFactory = SAXParserFactory.newInstance(); saxFactory.setNamespaceAware( true ); } - + protected String id = null; protected String documentId = null; protected org.xmldb.api.base.Collection collection = null; @@ -124,7 +124,7 @@ private SymbolTable symbols = null; private byte[] bytes = null; - + /** * Constructor for the XMLResourceImpl object * @@ -158,7 +158,7 @@ String content) { this(id, id, collection, content); } - + /** * Constructor for the XMLResourceImpl object * @@ -175,6 +175,22 @@ this.content = content; } + /** + * Constructor for the XMLResourceImpl object used in conjunction with + * Wire Compression + * + * @param id The unique id associated with this resource + * @param collection the parent collection for the resource + * @param bytes the content to associate with the resource + */ + public XMLResourceImpl(String id, String documentId, + org.xmldb.api.base.Collection collection, SymbolTable syms, byte[] bytes) { + this.collection = collection; + this.id = id; + this.documentId = documentId; + this.symbols = syms; + this.bytes = bytes; + } /** * Allows SAX feature to be set for the SAX that is generated by @@ -185,7 +201,7 @@ * @param value turn feature on or off. * @see <a href="http://sax.sourceforge.net/?selected=namespaces">sax.sourceforge.net/?selected=namespaces</a> */ - public void setSaxFeature(String feature, boolean value) { + public void setSAXFeature(String feature, boolean value) { if (SAX_NAMESPACES_FEATURE.equals(feature)) { @@ -205,7 +221,7 @@ * @return whether the feature is on or off * @see <a href="http://sax.sourceforge.net/?selected=namespaces">sax.sourceforge.net/?selected=namespaces</a> */ - public boolean getSaxFeature(String feature) { + public boolean getSAXFeature(String feature) { if (SAX_NAMESPACES_FEATURE.equals(feature)) { @@ -219,28 +235,6 @@ } } - - /** - * Retrieves a SAX feature - */ - - /** - * Constructor for the XMLResourceImpl object used in conjunction with - * Wire Compression - * - * @param id The unique id associated with this resource - * @param collection the parent collection for the resource - * @param bytes the content to associate with the resource - */ - public XMLResourceImpl(String id, String documentId, - org.xmldb.api.base.Collection collection, SymbolTable syms, byte[] bytes) { - this.collection = collection; - this.id = id; - this.documentId = documentId; - this.symbols = syms; - this.bytes = bytes; - } - /** * Constructor for the XMLResourceImpl object used in conjunction with * Wire Compression @@ -265,7 +259,7 @@ public String getDocumentId() throws XMLDBException { return documentId; } - + /** * Sets the Content attribute of the XMLResourceImpl object. The value being * set must be well formed XML text. @@ -401,7 +395,7 @@ if (handler instanceof ErrorHandler) { events.setErrorHandler((ErrorHandler)handler); } - + events.start(); } else { SAXParser sp = saxFactory.newSAXParser(); @@ -411,10 +405,10 @@ xr.setFeature(SAX_NAMESPACE_PREFIXES_FEATURE, hasSaxNamespacesPrefixes); xr.setContentHandler(handler); - + if (handler instanceof ErrorHandler) xr.setErrorHandler((ErrorHandler) handler); - + if (content != null) { xr.parse(new InputSource(new StringReader(content))); }