private DigitalObject process ( DigitalObject in , String jsonConfig ) throws TransformerException { String oid = in . getId ( ) ; // Workflow payload JsonSimple workflow = null ; try { Payload workflowPayload = in . getPayload ( "workflow.metadata" ) ; workflow = new JsonSimple ( workflowPayload . open ( ) ) ; workflowPayload . close ( ) ; } catch ( StorageException ex ) { error ( "Error accessing workflow data from Object!\nOID: '" + oid + "'" , ex ) ; } catch ( IOException ex ) { error ( "Error parsing workflow data from Object!\nOID: '" + oid + "'" , ex ) ; } // Make sure it is live String step = workflow . getString ( null , "step" ) ; if ( step == null || ! step . equals ( "live" ) ) { log . warn ( "Object is not live! '{}'" , oid ) ; return in ; } // Make sure we have a title String title = workflow . getString ( null , Strings . NODE_FORMDATA , "title" ) ; if ( title == null ) { error ( "No title provided in Object form data!\nOID: '" + oid + "'" ) ; } // Object metadata Properties metadata = null ; try { metadata = in . getMetadata ( ) ; } catch ( StorageException ex ) { error ( "Error reading Object metadata!\nOID: '" + oid + "'" , ex ) ; } // Now that we have all the data we need, go do the real work return processObject ( in , workflow , metadata ) ; }
Top level wrapping method for a processing an object .