MyCoRe-Org / libmeta

Java APIs and models for common library standards
GNU Lesser General Public License v3.0
0 stars 2 forks source link

[libmeta-mods]: How to create physicalDescription/digitalOrigin element? #5

Closed datazuul closed 1 year ago

datazuul commented 1 year ago

I want to create subelement mods:digitalOrigin in physicalDescription:

<mods:physicalDescription>
            <mods:digitalOrigin>reformatted digital</mods:digitalOrigin>
          </mods:physicalDescription>

There is enum DigitalOrigin.REFORMATTED_DIGITAL, but how to pass it to builder, which is expecting a IPhysicalDescriptionSubelement at addContent(...)...

PhysicalDescription physicalDescription =
        PhysicalDescription.builderForPhysicalDescription().addContent(???).build();
rsteph-de commented 1 year ago

I simply forgot to specify the interface IPhysicalDescriptionSubelement for the DigitalOrigin enum.

While writing the test I fixed another Issue with the Form builder.

rsteph-de commented 1 year ago

@datazuul
Please test the development branch and close this issue, if it works for you. If you need a new released version, let me know.

datazuul commented 1 year ago

yes, works:

PhysicalDescription physicalDescription =
        PhysicalDescription.builderForPhysicalDescription()
            .addContent(DigitalOrigin.REFORMATTED_DIGITAL)
            .build();

thank you, snapshot ok for now