Examples of FileParameter


Examples of org.ribax.parameters.FileParameter

                        }
                        StringPart part = new StringPart(pair.getName(),pair.getValue());
                        content.add(part);
                        length += mp.getContentLength(part);
                    } else if (o instanceof FileParameter) {
                        FileParameter fp = (FileParameter)o;
                        pair = fp.getNameValuePair();

                        if (pair == null || pair.getName() == null || pair.getValue() == null) {
                            nullParameterWarning(pair);
                            continue;
                        }

                        File f = new File(pair.getValue());

                        if (f == null) {
                            requestLog.warn(Messages.getString("WebDataSource.19")+pair.getValue()); //$NON-NLS-1$
                            continue;
                        }
                        FilePart part = new FilePart(pair.getName(),f);
                        content.add(part);
                        length += mp.getContentLength(part);
                    } else if (o instanceof FileDataItem) {
                        FileDataItem fp = (FileDataItem)o;
                        pair = fp.getNameValuePair();

                        if (pair == null || pair.getName() == null || pair.getValue() == null) {
                            nullParameterWarning(pair);
                            continue;
                        }

                        File f = new File(pair.getValue());

                        if (f == null){
                            requestLog.warn(Messages.getString("WebDataSource.20")+pair.getValue()); //$NON-NLS-1$
                            continue;
                        }

                        FilePart part = new FilePart(pair.getName(),f);
                        content.add(part);
                        length += mp.getContentLength(part);
                    } else if (o instanceof DataItem) {
                        DataItem fp = (DataItem)o;
                        pair = fp.getNameValuePair();

                        if (pair == null || pair.getName() == null || pair.getValue() == null) {
                            nullParameterWarning(pair);
                            continue;
                        }
View Full Code Here

Examples of ptolemy.data.expr.FileParameter

        inputArray = new TypedIOPort(this, "inputArray", true, false);
        inputArray.setTypeAtLeast(ArrayType.ARRAY_BOTTOM);
        outputArray = new TypedIOPort(this, "outputArray", false, true);
        outputArray.setTypeSameAs(inputArray);

        modelFileOrURL = new FileParameter(this, "modelFileOrURL");
        maxOutputLength = new Parameter(this, "maxOutputLength");
        maxOutputLength.setTypeEquals(BaseType.INT);
        maxOutputLength.setExpression("1");
    }
View Full Code Here

Examples of ptolemy.data.expr.FileParameter

     *   actor with this name.
     */
    public ModelDisplay(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        modelURL = new FileParameter(this, "modelURL");
        input = new TypedIOPort(this, "input", true, false);
        input.setTypeEquals(BaseType.STRING);
    }
View Full Code Here

Examples of ptolemy.data.expr.FileParameter

     */
    public JAIImageReader(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        output.setTypeEquals(BaseType.OBJECT);
        fileOrURL = new FileParameter(this, "fileOrURL");
        fileOrURL.setExpression("$CLASSPATH/doc/img/PtolemyII.jpg");
    }
View Full Code Here

Examples of ptolemy.data.expr.FileParameter

    public JAIWriter(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        input.setTypeEquals(BaseType.OBJECT);

        fileName = new FileParameter(this, "fileName");

        confirmOverwrite = new Parameter(this, "confirmOverwrite");
        confirmOverwrite.setTypeEquals(BaseType.BOOLEAN);
        confirmOverwrite.setToken(BooleanToken.TRUE);
    }
View Full Code Here

Examples of ptolemy.data.expr.FileParameter

        // Set the type of the output port.
        //output.setMultiport(true);
        output.setTypeEquals(BaseType.OBJECT);

        fileOrURL = new FileParameter(this, "fileOrURL");
    }
View Full Code Here

Examples of ptolemy.data.expr.FileParameter

        createFileOrURLIfNecessary = new Parameter(this,
                "createFileOrURLIfNecessary");
        createFileOrURLIfNecessary.setExpression("true");
        createFileOrURLIfNecessary.setTypeEquals(BaseType.BOOLEAN);

        fileOrURL = new FileParameter(this, "fileOrURL");

        // To create the initial default KeyStore, do
        // cd $PTII; make ptKeystore
        // or set createFileOrURLIfNecessary to true.
        fileOrURL.setExpression("$PTII/ptKeystore");
View Full Code Here

Examples of ptolemy.data.expr.FileParameter

    public MovieWriter(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        input.setTypeEquals(BaseType.OBJECT);

        fileOrURL = new FileParameter(this, "fileOrURL");
        fileOrURL.setExpression("$TMPDIR/movieOut.mov");

        confirmOverwrite = new Parameter(this, "confirmOverwrite");
        confirmOverwrite.setTypeEquals(BaseType.BOOLEAN);
        confirmOverwrite.setToken(BooleanToken.TRUE);
View Full Code Here

Examples of ptolemy.data.expr.FileParameter

     */
    public StreamLoader(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        output.setTypeEquals(BaseType.OBJECT);
        fileOrURL = new FileParameter(this, "fileOrURL");
    }
View Full Code Here

Examples of ptolemy.data.expr.FileParameter

     */
    public MovieReader(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        output.setTypeEquals(BaseType.OBJECT);
        fileOrURL = new FileParameter(this, "fileOrURL");
        fileOrURL
                .setExpression("$CLASSPATH/ptolemy/actor/lib/jmf/MrPtolemy.mov");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.