Skip to content

Commit 5900104

Browse files
committed
doc(common): deprecate Metadata(String) constructor #284
Now that we have StringElement, people should make up their minds and use one of the elements provided. For backward compatibility until the next major release we keep the constructor, but mark it deprecated so folks start migrating.
1 parent 85e1e7c commit 5900104

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • xoai-common/src/main/java/io/gdcc/xoai/model/oaipmh/results/record

xoai-common/src/main/java/io/gdcc/xoai/model/oaipmh/results/record/Metadata.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ public Metadata(final XOAIMetadata value) {
4040
this.element = value;
4141
}
4242

43+
/**
44+
* Constructs a new instance wrapping the provided {@link String} value as an {@link
45+
* EchoElement}.
46+
*
47+
* @param value The string representation of the metadata content to be wrapped in an {@link
48+
* EchoElement}. This value is parsed and managed for later XML handling operations.
49+
* @deprecated Note that this constructor is deprecated and may be removed in a future release.
50+
* Please use {@link Metadata(EchoElement)} (or others) instead.
51+
*/
52+
@Deprecated(forRemoval = true, since = "5.3.0")
4353
public Metadata(final String value) {
4454
this.element = new EchoElement(value);
4555
}

0 commit comments

Comments
 (0)