protected Map < String , Object > getSendableData ( ) { Map < String , Object > doc = new LinkedHashMap < String , Object > ( ) ; MapUtil . put ( doc , docTypeField , docType ) ; MapUtil . put ( doc , docVersionField , docVersion ) ; MapUtil . put ( doc , activeField , true ) ; MapUtil . put ( doc , resourceDataTypeField , resourceDataType ) ; Map < String , Object > docId = new HashMap < String , Object > ( ) ; MapUtil . put ( docId , submitterTypeField , submitterType ) ; MapUtil . put ( docId , submitterField , submitter ) ; MapUtil . put ( docId , curatorField , curator ) ; MapUtil . put ( docId , ownerField , owner ) ; MapUtil . put ( docId , signerField , signer ) ; MapUtil . put ( doc , identityField , docId ) ; MapUtil . put ( doc , submitterTTLField , submitterTTL ) ; Map < String , Object > docTOS = new HashMap < String , Object > ( ) ; MapUtil . put ( docTOS , submissionTOSField , submissionTOS ) ; MapUtil . put ( docTOS , submissionAttributionField , submissionAttribution ) ; MapUtil . put ( doc , TOSField , docTOS ) ; MapUtil . put ( doc , resourceLocatorField , resourceLocator ) ; MapUtil . put ( doc , payloadPlacementField , payloadPlacement ) ; MapUtil . put ( doc , payloadSchemaField , payloadSchema ) ; MapUtil . put ( doc , payloadSchemaLocatorField , payloadSchemaLocator ) ; MapUtil . put ( doc , keysField , tags ) ; MapUtil . put ( doc , resourceDataField , getEncodedResourceData ( ) ) ; MapUtil . put ( doc , replacesField , replaces ) ; if ( signed ) { Map < String , Object > sig = new HashMap < String , Object > ( ) ; String [ ] keys = { publicKeyLocation } ; MapUtil . put ( sig , keyLocationField , keys ) ; MapUtil . put ( sig , signingMethodField , signingMethod ) ; MapUtil . put ( sig , signatureField , clearSignedMessage ) ; MapUtil . put ( doc , digitalSignatureField , sig ) ; } return doc ; }
Builds and returns a map of the envelope data including any signing data suitable for sending to a Learning Registry node