Skip to content

Commit

Permalink
feat(#215): Add "since" tags for constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Jul 21, 2023
1 parent d95c40c commit 4f18e89
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/com/jcabi/xml/SaxonDocument.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public final class SaxonDocument implements XML {
/**
* Public constructor from XML as string text.
* @param text XML document body.
* @since 0.28.0
*/
public SaxonDocument(final String text) {
this(SaxonDocument.node(text));
Expand All @@ -96,6 +97,7 @@ public SaxonDocument(final String text) {
/**
* Public constructor from XML as byte array.
* @param data XML document body as byte array.
* @since 0.28.1
*/
public SaxonDocument(final byte[] data) {
this(SaxonDocument.node(new String(data, StandardCharsets.UTF_8)));
Expand All @@ -104,6 +106,7 @@ public SaxonDocument(final byte[] data) {
/**
* Public constructor from XML saved in a filesystem.
* @param path Path to XML file in a filesystem.
* @since 0.28.1
*/
public SaxonDocument(final Path path) {
this(path.toFile());
Expand All @@ -112,6 +115,7 @@ public SaxonDocument(final Path path) {
/**
* Public constructor from XML saved in a filesystem.
* @param file XML file in a filesystem.
* @since 0.28.1
*/
public SaxonDocument(final File file) {
this(SaxonDocument.node(new StreamSource(file)));
Expand All @@ -121,6 +125,7 @@ public SaxonDocument(final File file) {
* Public constructor from XML reached by URL.
* @param url URL of XML document.
* @throws IOException If fails.
* @since 0.28.1
*/
public SaxonDocument(final URL url) throws IOException {
this(SaxonDocument.node(new TextResource(url).toString()));
Expand All @@ -130,6 +135,7 @@ public SaxonDocument(final URL url) throws IOException {
* Public constructor from XML reached by URI.
* @param uri URI of XML document.
* @throws IOException If fails.
* @since 0.28.1
*/
public SaxonDocument(final URI uri) throws IOException {
this(SaxonDocument.node(new TextResource(uri).toString()));
Expand All @@ -138,6 +144,7 @@ public SaxonDocument(final URI uri) throws IOException {
/**
* Public constructor from XML as input stream.
* @param stream Input stream with XML document.
* @since 0.28.1
*/
public SaxonDocument(final InputStream stream) {
this(SaxonDocument.node(new StreamSource(stream)));
Expand All @@ -146,6 +153,7 @@ public SaxonDocument(final InputStream stream) {
/**
* Public constructor from Saxon XML document node.
* @param xml Saxon XML document node.
* @since 0.28.0
*/
public SaxonDocument(final XdmNode xml) {
this.xdm = xml;
Expand Down

0 comments on commit 4f18e89

Please sign in to comment.