Search in sources :

Example 6 with GenericDOMData

use of xades4j.properties.data.GenericDOMData in project xades4j by luisgoncalves.

the class BaseJAXBMarshaller method marshallUnknownProps.

private void marshallUnknownProps(Collection<PropertyDataObject> unknownProps, Element parent) throws MarshalException {
    for (PropertyDataObject pData : unknownProps) {
        if (!(pData instanceof GenericDOMData)) {
            throw new UnsupportedDataObjectException(pData);
        }
        Node propElem = ((GenericDOMData) pData).getPropertyElement();
        if (propElem.getOwnerDocument() != parent.getOwnerDocument()) {
            propElem = parent.getOwnerDocument().importNode(propElem, true);
        }
        parent.appendChild(propElem);
    }
}
Also used : GenericDOMData(xades4j.properties.data.GenericDOMData) Node(org.w3c.dom.Node) PropertyDataObject(xades4j.properties.data.PropertyDataObject)

Aggregations

GenericDOMData (xades4j.properties.data.GenericDOMData)6 QName (javax.xml.namespace.QName)2 Test (org.junit.Test)2 Element (org.w3c.dom.Element)2 TypeLiteral (com.google.inject.TypeLiteral)1 InputStream (java.io.InputStream)1 Node (org.w3c.dom.Node)1 XAdES4jException (xades4j.XAdES4jException)1 ObjectIdentifier (xades4j.properties.ObjectIdentifier)1 QualifyingProperty (xades4j.properties.QualifyingProperty)1 PropertyDataObject (xades4j.properties.data.PropertyDataObject)1 MessageDigestEngineProvider (xades4j.providers.MessageDigestEngineProvider)1 SignaturePolicyDocumentProvider (xades4j.providers.SignaturePolicyDocumentProvider)1 TimeStampVerificationProvider (xades4j.providers.TimeStampVerificationProvider)1 DefaultTimeStampVerificationProvider (xades4j.providers.impl.DefaultTimeStampVerificationProvider)1 XmlAnyType (xades4j.xml.bind.xades.XmlAnyType)1