From be6e802f7ccaba1ca5faa7e55c1e6f2e3aa0dc26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Wed, 9 Oct 2024 14:54:53 +0200 Subject: [PATCH 1/4] Improve handle-generic-xml documentation #497 --- .../main/java/org/metafacture/xml/GenericXmlHandler.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java b/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java index 3fbe15da..b28aaea7 100644 --- a/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java +++ b/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java @@ -34,7 +34,11 @@ * @author Markus Michael Geipel * */ -@Description("A generic xml reader") +@Description("A generic xml reader. Separates XML data in distrinct records with the defined record tag name (default: `recordtagname=\"record\"`)" + + "If no matching record tag is found, the output will be empty." + + "The handler breaks down XML elements with simple string values and optional attributes" + + "into entities with a value subfield (name configurable) and additional subfields for each attribute." + + "Record tag and value tag names can be configured, also attributes can get get an attributeMarker.") @In(XmlReceiver.class) @Out(StreamReceiver.class) @FluxCommand("handle-generic-xml") From e6a86b4e4a78fb6c307a06f50eb032e2933e8963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Wed, 9 Oct 2024 15:37:28 +0200 Subject: [PATCH 2/4] Improve documentation for encode-xml. #497 --- .../src/main/java/org/metafacture/xml/SimpleXmlEncoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metafacture-xml/src/main/java/org/metafacture/xml/SimpleXmlEncoder.java b/metafacture-xml/src/main/java/org/metafacture/xml/SimpleXmlEncoder.java index 485ed7c6..3010c804 100644 --- a/metafacture-xml/src/main/java/org/metafacture/xml/SimpleXmlEncoder.java +++ b/metafacture-xml/src/main/java/org/metafacture/xml/SimpleXmlEncoder.java @@ -47,7 +47,7 @@ * @author Christoph Böhme * */ -@Description("Encodes a stream as xml") +@Description("Encodes a stream as xml. Defaults: `rootTag=\"records\"`, `recordTag=\"record\"`, no attributeMarker.") @In(StreamReceiver.class) @Out(String.class) @FluxCommand("stream-to-xml") From c69e8942335ed7d77af277fd31355ad0c0f893a2 Mon Sep 17 00:00:00 2001 From: TobiasNx <61879957+TobiasNx@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:31:47 +0200 Subject: [PATCH 3/4] Apply suggestions from code review By @dr0i Co-authored-by: Pascal Christoph --- .../src/main/java/org/metafacture/xml/GenericXmlHandler.java | 4 ++-- .../src/main/java/org/metafacture/xml/SimpleXmlEncoder.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java b/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java index b28aaea7..6c406ffa 100644 --- a/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java +++ b/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java @@ -34,11 +34,11 @@ * @author Markus Michael Geipel * */ -@Description("A generic xml reader. Separates XML data in distrinct records with the defined record tag name (default: `recordtagname=\"record\"`)" + +@Description("A generic XML reader. Separates XML data in distinct records with the defined record tag name (default: `recordtagname=\"record\"`)" + "If no matching record tag is found, the output will be empty." + "The handler breaks down XML elements with simple string values and optional attributes" + "into entities with a value subfield (name configurable) and additional subfields for each attribute." + - "Record tag and value tag names can be configured, also attributes can get get an attributeMarker.") + "Record tag and value tag names can be configured. Attributes can get an attributeMarker.") @In(XmlReceiver.class) @Out(StreamReceiver.class) @FluxCommand("handle-generic-xml") diff --git a/metafacture-xml/src/main/java/org/metafacture/xml/SimpleXmlEncoder.java b/metafacture-xml/src/main/java/org/metafacture/xml/SimpleXmlEncoder.java index 3010c804..eb39d667 100644 --- a/metafacture-xml/src/main/java/org/metafacture/xml/SimpleXmlEncoder.java +++ b/metafacture-xml/src/main/java/org/metafacture/xml/SimpleXmlEncoder.java @@ -47,7 +47,7 @@ * @author Christoph Böhme * */ -@Description("Encodes a stream as xml. Defaults: `rootTag=\"records\"`, `recordTag=\"record\"`, no attributeMarker.") +@Description("Encodes a stream as XML. Defaults: `rootTag=\"records\"`, `recordTag=\"record\"`, no attributeMarker.") @In(StreamReceiver.class) @Out(String.class) @FluxCommand("stream-to-xml") From 32741b7bf32f0a3c65d29175ccf62b09a94e65b5 Mon Sep 17 00:00:00 2001 From: TobiasNx <61879957+TobiasNx@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:35:45 +0200 Subject: [PATCH 4/4] Add whitespaces in Description As suggested by @blackwinter --- .../main/java/org/metafacture/xml/GenericXmlHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java b/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java index 6c406ffa..6bfd7259 100644 --- a/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java +++ b/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java @@ -34,10 +34,10 @@ * @author Markus Michael Geipel * */ -@Description("A generic XML reader. Separates XML data in distinct records with the defined record tag name (default: `recordtagname=\"record\"`)" + - "If no matching record tag is found, the output will be empty." + - "The handler breaks down XML elements with simple string values and optional attributes" + - "into entities with a value subfield (name configurable) and additional subfields for each attribute." + +@Description("A generic XML reader. Separates XML data in distinct records with the defined record tag name (default: `recordtagname=\"record\"`) " + + "If no matching record tag is found, the output will be empty. " + + "The handler breaks down XML elements with simple string values and optional attributes " + + "into entities with a value subfield (name configurable) and additional subfields for each attribute. " + "Record tag and value tag names can be configured. Attributes can get an attributeMarker.") @In(XmlReceiver.class) @Out(StreamReceiver.class)