コード例 #1
0
 /**
  * Marshalls the analyses that have been loaded.
  *
  * @return the marshalled analyses.
  * @throws WorkflowException if the analysis can't be marshalled.
  */
 private JSONObject marshallAnalyses() {
   JSONObject json = new JSONObject();
   JSONArray array = new JSONArray();
   try {
     for (TransformationActivity analysis :
         nameRegistry.getRegisteredObjects(TransformationActivity.class)) {
       array.put(marshaller.marshal(analysis));
     }
     json.put("analyses", array);
   } catch (Exception e) {
     throw new WorkflowException("unable to convert the analyses.", e);
   }
   return json;
 }
コード例 #2
0
 /** Initializes the object used to generate the outgoing JSON. */
 private void initializeMarshaller() {
   marshaller = new UiAnalysisMarshaler(daoFactory);
   marshaller.setRegistry(idRegistry);
 }