Skip to content
Commits on Source (8)
language: java
jdk:
- oraclejdk7
......@@ -3,12 +3,17 @@
Stax2 API is an extension to standard [Stax](http://en.wikipedia.org/wiki/StAX) API ("STandard Api for Xml procesing"),
pull-parser API of JDK, added in JDK 6.
## Status
[![Build Status](https://travis-ci.org/FasterXML/stax2-api.svg)](https://travis-ci.org/FasterXML/stax2-api)
## Support
Stax2 API is implemented natively by following Stax XML implementations:
* [Woodstox](http://wiki.fasterxml.com/WoodstoxHome)
* [Aalto](https://github.com/FasterXML/aalto-xml)
* [Aalto](../../../aalto-xml) (performance-oriented, also non-blocking/async)
* [Woodstox](../../../woodstox) (full-featured, most compliant XML package on Java platform)
In addition, Stax2 API contains wrapper implementations that can be used to support most of API on
regular Stax implementations like Sun SJSXP (default Stax implementation bundled with JDK 1.6 and 1.7).
......@@ -32,7 +37,7 @@ Maven dependency is defined as:
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId>
<version>3.1.2</version>
<version>3.1.4</version>
</dependency>
Jars can be found from [Central Maven repo](http://repo1.maven.org/maven2/org/codehaus/woodstox/stax2-api/).
libstax2-api-java (4.1-1) UNRELEASED; urgency=medium
* New upstream release.
+ Update maven rules accordingly.
* Update Vcs-* after moving to salsa.
* Update to debhelper 11.
* Bump Standards-Version to 4.1.4.
-- Giovanni Mascellani <gio@debian.org> Sat, 23 Jun 2018 12:04:12 +0200
libstax2-api-java (4.0.0-1) experimental; urgency=medium
* Move the package to git.
......
......@@ -3,14 +3,14 @@ Section: java
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Uploaders: Giovanni Mascellani <gio@debian.org>
Build-Depends: debhelper (>= 10), maven-debian-helper,
Build-Depends: debhelper (>= 11), maven-debian-helper,
libmaven-bundle-plugin-java, libmaven-javadoc-plugin-java,
libmaven-compiler-plugin-java
Build-Depends-Indep: default-jdk
Standards-Version: 4.1.1
Standards-Version: 4.1.4
Homepage: https://github.com/FasterXML/stax2-api
Vcs-Git: https://anonscm.debian.org/git/pkg-java/libstax2-api-java.git
Vcs-Browser: https://anonscm.debian.org/git/pkg-java/libstax2-api-java.git
Vcs-Browser: https://salsa.debian.org/java-team/libstax2-api-java
Vcs-Git: https://salsa.debian.org/java-team/libstax2-api-java.git
Package: libstax2-api-java
Architecture: all
......
......@@ -4,8 +4,8 @@ Upstream-Contact: Tatu Saloranta <tsaloranta@gmail.com>
Source: https://github.com/FasterXML/stax2-api
Files: *
Copyright: © 2004-2015, Tatu Saloranta <tsaloranta@gmail.com>
© 2010-2015, FasterXML.com
Copyright: © 2004-2018, Tatu Saloranta <tsaloranta@gmail.com>
© 2010-2018, FasterXML.com
License: BSD-2-clause
All rights reserved.
.
......@@ -35,7 +35,7 @@ License: BSD-2-clause
Files: debian/*
Copyright: © 2007, Vincent Fourmond <fourmond@debian.org>
© 2011-2017, Giovanni Mascellani <gio@debian.org>
© 2011-2018, Giovanni Mascellani <gio@debian.org>
License: GPL-2+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
s/javax.xml.stream/stax/ stax-api * s/.*/debian/ * *
......@@ -4,28 +4,26 @@
<parent>
<groupId>com.fasterxml</groupId>
<artifactId>oss-parent</artifactId>
<version>19</version>
<version>32</version>
</parent>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId>
<name>Stax2 API</name>
<version>4.0.0</version>
<version>4.1</version>
<packaging>bundle</packaging>
<description>tax2 API is an extension to basic Stax 1.0 API that adds significant new functionality, such as full-featured bi-direction validation interface and high-performance Typed Access API.
</description>
<url>http://github.com/FasterXML/stax2-api</url>
<scm>
<connection>scm:git:git@github.com:FasterXML/stax2-api.git</connection>
<developerConnection>scm:git:git@github.com:FasterXML/stax2-api.git</developerConnection>
<url>http://github.com/FasterXML/stax2-api</url>
<tag>stax2-api-4.0.0</tag>
</scm>
<organization>
<name>fasterxml.com</name>
<url>http://fasterxml.com</url>
</organization>
<developers>
<developer>
<id>tatu</id>
<name>Tatu Saloranta</name>
<email>tatu@fasterxml.com</email>
</developer>
<developer>
<id>tatu</id>
<name>Tatu Saloranta</name>
<email>tatu@fasterxml.com</email>
</developer>
</developers>
<licenses>
<license>
......@@ -34,22 +32,27 @@
<distribution>repo</distribution>
</license>
</licenses>
<organization>
<name>fasterxml.com</name>
<url>http://fasterxml.com</url>
</organization>
<scm>
<connection>scm:git:git@github.com:FasterXML/stax2-api.git</connection>
<developerConnection>scm:git:git@github.com:FasterXML/stax2-api.git</developerConnection>
<url>http://github.com/FasterXML/stax2-api</url>
<tag>stax2-api-4.1</tag>
</scm>
<properties>
<!-- 4.1 adds "Automatic-Module-Name" for JDK 9 -->
<jdk.module.name>org.codehaus.stax2</jdk.module.name>
</properties>
<dependencies>
<!-- Since baseline with 4.0 is Java5, we still need to officially keep this in;
should drop once we go up to Java6 or 7
-->
<!-- With Java 6, already included: skip dependency
<dependency>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
<version>1.0-2</version>
<!-- at this point, with inclusion in JDK 1.6, this should be given -->
<scope>provided</scope>
</dependency>
-->
</dependencies>
<build>
......@@ -57,8 +60,9 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<!-- 1.6 since v4.1 -->
<source>1.6</source>
<target>1.6</target>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<optimize>true</optimize>
......@@ -79,15 +83,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${version.plugin.javadoc}</version>
<!-- 06-Jul-2013, tatu: When can we switch to 1.6?
-->
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<links>
<link>http://java.sun.com/javase/6/docs/api/</link>
<link>https://docs.oracle.com/javase/8/docs/api/</link>
</links>
</configuration>
<executions>
......@@ -107,6 +108,7 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Automatic-Module-Name>${jdk.module.name}</Automatic-Module-Name>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Vendor>fasterml.com</Bundle-Vendor>
<Import-Package>
......
......@@ -4,7 +4,13 @@ Project: Stax2 API
= Releases
------------------------------------------------------------------------
4.0.0: (not yet released)
4.1 (not yet released)
- Add `Automatic-Module-Name` for Java 9
- Upgrade JDK baseline requirement Java 6 (from Java 5);
remove `stax-api` dependency (since bundled on Java 6)
4.0.0: (01-Feb-2015)
- Update codebase to Java5 (add generics); minor related cleanup.
#3: Add LICENSE file that indicates BSD (2-clause) as the license
......
......@@ -56,7 +56,7 @@ public interface XMLEventReader2
* @return True, if the specified property was <b>succesfully</b>
* set to specified value; false if its value was not changed
*
* @throws InvalidArgumentException if the property is not supported
* @throws IllegalArgumentException if the property is not supported
* (or recognized) by the stream reader implementation
*
* @since 3.0
......
......@@ -14,7 +14,7 @@ import javax.xml.stream.XMLStreamReader;
* recognize, and preferably support. There are also some profile-based
* configuration methods which allow implementations to set proper goal-based
* values for custom properties.
*<br />
*<br>
* NOTE: although actual values for the property names are
* visible, implementations should try to use the symbolic constants
* defined here instead, to avoid typos.
......
......@@ -16,7 +16,7 @@ import org.codehaus.stax2.io.EscapingWriterFactory;
* Also contains extended standard properties that conforming stream
* writer factory and instance implementations should at least
* recognize, and preferably support.
*<br />
*<br>
* NOTE: although actual values for the property names are
* visible, implementations should try to use the symbolic constants
* defined here instead, to avoid typos.
......@@ -27,15 +27,15 @@ import org.codehaus.stax2.io.EscapingWriterFactory;
* Whether output classes should keep track of and output namespace
* information provided via write methods.
* When enabled (set to Boolean.TRUE), will use all namespace information
* provided, and does not allow colons in names (local name, prefix).<br />
* provided, and does not allow colons in names (local name, prefix).<br>
* What exactly is kept track
* of depends on other settings, specifically whether
* writer is in "repairing" mode or not.
* When disabled, will only make use of local name part, which
* may contain colons, and ignore prefix and namespace URI if any
* are passed.<br />
* are passed.<br>
* Turning this option off may improve performance if no namespace
* handling is needed.<br />
* handling is needed.<br>
* Default value for implementations should be 'true'; implementations
* are not required to implement 'false'.
* </li>
......
......@@ -67,7 +67,7 @@ public interface XMLStreamProperties
* Default value is implementation-specific, but recommended default
* value is <code>XSP_V_XMLID_TYPING</code> for implementations
* that do support Xml:id specification: those that do not, have to
* default to <code>XSP_V_XMLID_NONE.
* default to <code>XSP_V_XMLID_NONE</code>.
* For Xml:id-enabled implementations, typing support is the most
* logical default, since it
* provides the intuitive behavior of xml:id functionality, as well
......
......@@ -33,7 +33,7 @@ import org.codehaus.stax2.validation.Validatable;
* SOAP-messages).
*<p>
* The features supported via {@link #setFeature} are:
*<dt>
*<dl>
* <dt>FEATURE_DTD_OVERRIDE: (write-only)</dt>
* <dd>Feature used to specify the source for DTD external subset to use
* instead of DTD specified by the XML document itself (if any).
......@@ -41,10 +41,10 @@ import org.codehaus.stax2.validation.Validatable;
* essentially allows for injecting an alternate DOCTYPE declaration.
* Note that setting this value to null is both legal, and sometimes
* useful: it is equivalent of removing the DOCTYPE declaration.
* <br />Feature is write-only, since storing it after loading the DTD
* <br>Feature is write-only, since storing it after loading the DTD
* in question does not have much use.
* </dt>
*</dt>
* </dd>
*</dl>
*<p>
* Since version 3.0, stream writer will also implement "Typed Access API"
* on output side.
......@@ -62,6 +62,7 @@ public interface XMLStreamReader2
*
* @deprecated Use {@link XMLInputFactory2#P_DTD_OVERRIDE} instead.
*/
@Deprecated
public final static String FEATURE_DTD_OVERRIDE = XMLInputFactory2.P_DTD_OVERRIDE;
/*
......@@ -94,7 +95,7 @@ public interface XMLStreamReader2
* @return True, if the specified property was <b>succesfully</b>
* set to specified value; false if its value was not changed
*
* @throws InvalidArgumentException if the property is not supported
* @throws IllegalArgumentException if the property is not supported
* (or recognized) by the stream reader implementation
*/
public boolean setProperty(String name, Object value);
......@@ -115,6 +116,7 @@ public interface XMLStreamReader2
* @return Value of the feature (possibly null), if supported; null
* otherwise
*/
@Deprecated
public Object getFeature(String name);
/**
......@@ -132,6 +134,7 @@ public interface XMLStreamReader2
* @param name Name of the feature to set
* @param value Value to set feature to.
*/
@Deprecated
public void setFeature(String name, Object value);
/*
......@@ -240,7 +243,7 @@ public interface XMLStreamReader2
/**
* Method that can be used to check whether current START_ELEMENT
* event was created for an empty element (xml short-hand notation
* where one tag implies start and end, ending with "/>"), or not.
* where one tag implies start and end, ending with "/&gt;"), or not.
*<p>
* Note: method may need to read more data to know if the element
* is an empty one, and as such may throw an i/o or parsing exception
......
......@@ -54,7 +54,7 @@ public interface XMLStreamWriter2
* @return True, if the specified property was <b>succesfully</b>
* set to specified value; false if its value was not changed
*
* @throws InvalidArgumentException if the property is not supported
* @throws IllegalArgumentException if the property is not supported
* (or recognized) by the stream writer implementation
*/
public boolean setProperty(String name, Object value);
......
......@@ -23,7 +23,9 @@ public abstract class Stax2BlockResult
/////////////////////////////////////////
*/
@Override
public abstract Writer constructWriter() throws IOException;
@Override
public abstract OutputStream constructOutputStream() throws IOException;
}
......@@ -29,11 +29,14 @@ public abstract class Stax2BlockSource
* since they are in-memory data structures. Because of this, the
* base implementation just returns null.
*/
@Override
public URL getReference() {
return null;
}
@Override
public abstract Reader constructReader() throws IOException;
@Override
public abstract InputStream constructInputStream() throws IOException;
}
......@@ -38,22 +38,21 @@ public class Stax2ByteArraySource
/**
* Note: if encoding is not explicitly defined, UTF-8 is assumed.
*/
public Reader constructReader()
throws IOException
@Override
public Reader constructReader() throws IOException
{
String enc = getEncoding();
InputStream in = constructInputStream();
if (enc == null || enc.length() == 0) {
/* 11-Nov-2008, TSa: Used to rely on platform default encoding, which
* doesn't make sense. XML assumes UTF-8 anyway.
*/
enc = DEFAULT_ENCODING;
}
return new InputStreamReader(in, enc);
// 11-Nov-2008, TSa: Used to rely on platform default encoding, which
// doesn't make sense. XML assumes UTF-8 anyway.
enc = DEFAULT_ENCODING;
}
return new InputStreamReader(in, enc);
}
public InputStream constructInputStream()
throws IOException
@Override
public InputStream constructInputStream() throws IOException
{
return new ByteArrayInputStream(mBuffer, mStart, mLength);
}
......
......@@ -33,14 +33,14 @@ public class Stax2CharArraySource
/////////////////////////////////////////
*/
public Reader constructReader()
throws IOException
@Override
public Reader constructReader() throws IOException
{
return new CharArrayReader(mBuffer, mStart, mLength);
}
public InputStream constructInputStream()
throws IOException
@Override
public InputStream constructInputStream() throws IOException
{
/* No obvious/easy way; if caller really wants an InputStream, it
* can get a Reader, add an encoders, and so on.
......
......@@ -21,8 +21,8 @@ public class Stax2FileResult
/////////////////////////////////////////
*/
public Writer constructWriter()
throws IOException
@Override
public Writer constructWriter() throws IOException
{
String enc = getEncoding();
if (enc != null && enc.length() > 0) {
......@@ -32,8 +32,8 @@ public class Stax2FileResult
return new FileWriter(mFile);
}
public OutputStream constructOutputStream()
throws IOException
@Override
public OutputStream constructOutputStream() throws IOException
{
return new FileOutputStream(mFile);
}
......