Class RdeMarshaller

  • All Implemented Interfaces:
    java.io.Serializable

    @NotThreadSafe
    public final class RdeMarshaller
    extends java.lang.Object
    implements java.io.Serializable
    XML document fragment marshaller for RDE.
    See Also:
    Serialized Form
    • Constructor Detail

      • RdeMarshaller

        public RdeMarshaller​(ValidationMode validationMode)
    • Method Detail

      • makeHeader

        public java.lang.String makeHeader​(java.lang.String depositId,
                                           org.joda.time.DateTime watermark,
                                           java.util.Collection<java.lang.String> uris,
                                           int revision)
        Returns top-portion of XML document.
      • makeFooter

        public java.lang.String makeFooter()
        Returns bottom-portion of XML document.
      • marshal

        public java.lang.String marshal​(javax.xml.bind.JAXBElement<?> element)
                                 throws javax.xml.bind.MarshalException
        Turns XJC element into XML fragment, with schema validation unless in lenient mode.
        Throws:
        javax.xml.bind.MarshalException
      • marshalOrDie

        public java.lang.String marshalOrDie​(javax.xml.bind.JAXBElement<?> element)
        Turns XJC element into XML fragment, converting MarshalExceptions to RuntimeExceptions.
      • marshalSubordinateHost

        public DepositFragment marshalSubordinateHost​(Host host,
                                                      Domain superordinateDomain)
        Turns Host object into an XML fragment.
      • marshalExternalHost

        public DepositFragment marshalExternalHost​(Host host)
        Turns Host object into an XML fragment.
      • marshalIdn

        public java.lang.String marshalIdn​(IdnTable idn)
        Turns IdnTable object into an XML fragment.