From: <lh...@us...> - 2008-11-23 14:42:07
|
Revision: 231 http://tinytim.svn.sourceforge.net/tinytim/?rev=231&view=rev Author: lheuer Date: 2008-11-23 14:42:02 +0000 (Sun, 23 Nov 2008) Log Message: ----------- Aligned naming Added Paths: ----------- tinytim-mio/trunk/src/main/java/org/tinytim/mio/AbstractXTMTopicMapWriter.java Removed Paths: ------------- tinytim-mio/trunk/src/main/java/org/tinytim/mio/AbstractXTMWriter.java Copied: tinytim-mio/trunk/src/main/java/org/tinytim/mio/AbstractXTMTopicMapWriter.java (from rev 230, tinytim-mio/trunk/src/main/java/org/tinytim/mio/AbstractXTMWriter.java) =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/mio/AbstractXTMTopicMapWriter.java (rev 0) +++ tinytim-mio/trunk/src/main/java/org/tinytim/mio/AbstractXTMTopicMapWriter.java 2008-11-23 14:42:02 UTC (rev 231) @@ -0,0 +1,72 @@ +/* + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.tinytim.mio; + +import java.io.IOException; +import java.io.OutputStream; + +import org.xml.sax.helpers.AttributesImpl; + +/** + * Abstract superclass for XTM serializers. + * <p> + * Provides a XML writer and takes care about the encoding. + * </p> + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev$ - $Date$ + */ +abstract class AbstractXTMWriter extends AbstractTopicMapWriter { + + protected final AttributesImpl _attrs; + + protected final XMLWriter _out; + + /** + * Creates a new instance using "utf-8" encoding. + * + * @param out The output stream to write onto. + * @param baseIRI The base IRI. + * @throws IOException If an error occurs. + */ + protected AbstractXTMWriter(final OutputStream out, final String baseIRI) + throws IOException { + this(out, baseIRI, "utf-8"); + } + + /** + * Creates a new instance. + * + * @param out + * The output stream to write onto. + * @param baseIRI + * The base IRI. + * @param encoding + * The encoding to use. + * @throws IOException + * If an error occurs. + */ + protected AbstractXTMWriter(final OutputStream out, final String baseIRI, + final String encoding) throws IOException { + super(baseIRI); + if (encoding == null) { + throw new IOException("The encoding must not be null"); + } + _out = new XMLWriter(out, encoding); + _attrs = new AttributesImpl(); + } + +} Deleted: tinytim-mio/trunk/src/main/java/org/tinytim/mio/AbstractXTMWriter.java =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/mio/AbstractXTMWriter.java 2008-11-22 16:59:38 UTC (rev 230) +++ tinytim-mio/trunk/src/main/java/org/tinytim/mio/AbstractXTMWriter.java 2008-11-23 14:42:02 UTC (rev 231) @@ -1,72 +0,0 @@ -/* - * Copyright 2008 Lars Heuer (heuer[at]semagia.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.tinytim.mio; - -import java.io.IOException; -import java.io.OutputStream; - -import org.xml.sax.helpers.AttributesImpl; - -/** - * Abstract superclass for XTM serializers. - * <p> - * Provides a XML writer and takes care about the encoding. - * </p> - * - * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> - * @version $Rev$ - $Date$ - */ -abstract class AbstractXTMWriter extends AbstractTopicMapWriter { - - protected final AttributesImpl _attrs; - - protected final XMLWriter _out; - - /** - * Creates a new instance using "utf-8" encoding. - * - * @param out The output stream to write onto. - * @param baseIRI The base IRI. - * @throws IOException If an error occurs. - */ - protected AbstractXTMWriter(final OutputStream out, final String baseIRI) - throws IOException { - this(out, baseIRI, "utf-8"); - } - - /** - * Creates a new instance. - * - * @param out - * The output stream to write onto. - * @param baseIRI - * The base IRI. - * @param encoding - * The encoding to use. - * @throws IOException - * If an error occurs. - */ - protected AbstractXTMWriter(final OutputStream out, final String baseIRI, - final String encoding) throws IOException { - super(baseIRI); - if (encoding == null) { - throw new IOException("The encoding must not be null"); - } - _out = new XMLWriter(out, encoding); - _attrs = new AttributesImpl(); - } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |