Package gri.data.serializers.jdom

Examples of gri.data.serializers.jdom.JDOMSerializer


            }
        }
    }
   
    protected JDOMSerializer getSerializer(ParameterDef paramDef) throws IOException {
        JDOMSerializer serializer = serializerFactory.getSerializer(paramDef, this.config);
        if (serializer == null) {
            StringBuffer s = new StringBuffer()
              .append("No serializer found for parameter: ").append(paramDef.getName())
              .append(" (").append(paramDef.getDataType()).append(")");
            throw new IOException(s.toString());
View Full Code Here


            config.put("WORKFLOW_ID", req.getJobId());
            config.put("WORKFLOW_ID", wkflId);
            config.put("WORKING_DIRECTORY", jobInfo.getWorkingDirectory())//TODO: this is wrong
           
           
            JDOMSerializer paramSerializer = serializers
              .getWorkflowSerializerSet(wkflManager)
              .getOutputParameterSerializer(jobIndex, taskId, config);
           
            //serialize:
            Map outputs = wkflManager.getWorkflowOutputs(wkflId, jobIndex);
           
            Element elem = new Element("outputs");
            paramSerializer.write(outputs, elem);
            return xmlUtil.writeXML(elem);
        }
        catch (UnknownJobException e) {
            logger.warn("Unknown job in JobManagerService.getJobOutputs(): " + e.getJobId());
            return xmlUtil.writeFault(e);
View Full Code Here

  }
 
  public JDOMSerializer getSerializer(DataType type, Map config) {
      //System.out.println(type);
     
      JDOMSerializer serializer = (JDOMSerializer)typedSerializers.get(type);
      if (serializer != null)
    return serializer; 

      String content = type.getContentType();
View Full Code Here

   
    public void write(Object o, Element elem) throws IOException {
  String type = getSerializerType((TransferableFile)o);
  elem.setAttribute("parseType", type);
 
        JDOMSerializer serializer = getSerializer(type);
        serializer.write(o, elem);
    }
View Full Code Here

    public Object read(Element elem) throws IOException {
        String parseType = elem.getAttributeValue("parseType");
        if (parseType == null)
            parseType = this.defaultReadType;
       
        JDOMSerializer serializer = getSerializer(parseType);       
        return serializer.read(elem);
    }
View Full Code Here

TOP

Related Classes of gri.data.serializers.jdom.JDOMSerializer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.