-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Marc21XmlEncoder #531
Add Marc21XmlEncoder #531
Conversation
Marc21XmlEncoder acts as a wrapper. It makes use of Marc21Encoder, Marc21Decoder and MarcXmlEncoder to ensure a proper MarcXml, especially regarding the leader. Also - in contrast to MarcXmlEncoder - the record id (field 001) is mandatory.
There may be a better way of implementing this. Probably at least regarding the tests. To understand the difference between Another difference is that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having both encode-marcxml
and encode-marc21xml
might be confusing. I would have preferred an option on encode-marcxml
(whose default could be flipped with the next major version). But if you feel that it's too complicated to implement, I'm okay with it.
metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/AbstractMarcXmlEncoder.java
Outdated
Show resolved
Hide resolved
metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/AbstractMarcXmlEncoder.java
Outdated
Show resolved
Hide resolved
metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/Marc21XmlEncoder.java
Outdated
Show resolved
Hide resolved
metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/Marc21XmlEncoder.java
Outdated
Show resolved
Hide resolved
metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/MarcXmlEncoder.java
Outdated
Show resolved
Hide resolved
metafacture-biblio/src/test/java/org/metafacture/biblio/marc21/Marc21XmlEncoderTest.java
Outdated
Show resolved
Hide resolved
metafacture-biblio/src/test/java/org/metafacture/biblio/marc21/Marc21XmlEncoderTest.java
Outdated
Show resolved
Hide resolved
metafacture-biblio/src/test/java/org/metafacture/biblio/marc21/Marc21XmlEncoderTest.java
Outdated
Show resolved
Hide resolved
metafacture-biblio/src/test/java/org/metafacture/biblio/marc21/MarcXmlEncoderTest.java
Outdated
Show resolved
Hide resolved
metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/MarcXmlEncoder.java
Outdated
Show resolved
Hide resolved
…/Marc21XmlEncoder.java Co-authored-by: Jens Wille <[email protected]>
…/MarcXmlEncoder.java Co-authored-by: Jens Wille <[email protected]>
…/MarcXmlEncoder.java Co-authored-by: Jens Wille <[email protected]>
38d0d2e
to
dc81abe
Compare
dc81abe
to
c7f0c28
Compare
c7f0c28
to
a74d265
Compare
a74d265
to
3611be6
Compare
3611be6
to
e75fd57
Compare
With fde6ba1 comes the incorporation of the new feature into |
The outer class is responsible for routing the stream into the appropriate pipe, the inner class contains the actual (previous) implementation.
Not sure if this is so much better, but it may be helpful to separate the concerns more clearly. See c1f8f98 (with some additional fixes/cleanup). |
…etafacture/metafacture-core
Thx - your changes are very good, i.a. the encoder is threadable again 👍 |
Resolves #527.
Marc21XmlEncoder acts as a wrapper. It makes use of Marc21Encoder, Marc21Decoder and MarcXmlEncoder to ensure a proper MarcXml, especially regarding the leader. Also - in contrast to MarcXmlEncoder - the record id (field 001) is mandatory.