Package eu.scape_project.planning.model

Examples of eu.scape_project.planning.model.ByteStream


        DigitalObject d = new DigitalObject();
        d.setContentType("application/vnd.taverna.t2flow+xml");
        d.setFullname("workflow.t2flow");
        d.setPid("pid-experiment-workflow");

        ByteStream bs = new ByteStream();
        bs.setData("workflowdata".getBytes());
        d.setData(bs);

        return d;
    }
View Full Code Here


     *
     * @param object
     */
    public void setData(Object object) {
        try {
            ByteStream data = new ByteStream();
            data.setData(value);
            data.setSize(value.length);
            Method setData = object.getClass().getMethod(methodName, ByteStream.class);
            setData.invoke(object, new Object[] {data});
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

     *             if the method could not be invoked
     * @throws InvocationTargetException
     *             if the method could not be invoked
     */
    public void setData(Object object) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
        ByteStream bs = new ByteStream();
        bs.setData(data);
        Method setDataMethod = object.getClass().getMethod(methodName, ByteStream.class);
        setDataMethod.invoke(object, new Object[] {bs});
    }
View Full Code Here

     * @throws InvocationTargetException
     *             if the method could not be invoked
     */
    public void setString(Object object) throws NoSuchMethodException, IllegalAccessException,
        InvocationTargetException {
        ByteStream bs = new ByteStream();
        bs.setData(data);
        Method setDataMethod = object.getClass().getMethod(methodName, String.class);
        String dataString = new String(data);
        setDataMethod.invoke(object, new Object[] {dataString});
    }
View Full Code Here

        if ((object.getPid() == null) || (object.getPid().equals(""))) {
            throw new InvalidParameterException("DigitalObject must have a pid set to be retrievable from a storage");
        }

        byte[] digitalObjectBytes = byteStreamManager.load(object.getPid());
        ByteStream digitalObjectByteStream = new ByteStream();
        digitalObjectByteStream.setData(digitalObjectBytes);

        // return a new digital object instance - because otherwise the now
        // retrieved bytestream would be put into the current object tree
        // (originating from plan)
        // which would fill up the memory. Because we do not want this - we
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.model.ByteStream

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.