Examples of asURL()


Examples of com.fasterxml.clustermate.std.JdkHttpClientPathBuilder.asURL()

        try {
            JdkHttpClientPathBuilder path = _server.rootPath();
            path = _pathFinder.appendStoreEntryInfoPath(path);
            path = _keyConverter.appendToPath(path, contentId);
            URL url = path.asURL();
            conn = (HttpURLConnection) url.openConnection();

            int statusCode = sendRequest("GET", conn, path, timeoutMsecs);
            handleHeaders(_server, conn, startTime);
View Full Code Here

Examples of com.fasterxml.clustermate.std.JdkHttpClientPathBuilder.asURL()

        }
        try {
            JdkHttpClientPathBuilder path = _server.rootPath();
            path = _pathFinder.appendPath(path, PathType.STORE_ENTRY);
            path = _keyConverter.appendToPath(path, contentId);
            URL url = path.asURL();
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("GET");
            // plus, allow use of GZIP and LZF
            conn.setRequestProperty(ClusterMateConstants.HTTP_HEADER_ACCEPT_COMPRESSION,
                    "lzf, gzip, identity");
View Full Code Here

Examples of com.fasterxml.clustermate.std.JdkHttpClientPathBuilder.asURL()

                if (hash == HashConstants.NO_CHECKSUM) {
                    hash = _keyConverter.contentHashFor(bc);
                    content.setContentHash(hash);
                }
                path = addChecksum(path, hash);
                URL url = path.asURL();
                conn = (HttpURLConnection) url.openConnection();
                conn.setDoOutput(true);
                conn.setFixedLengthStreamingMode(bc.byteLength());
                conn = initRequest("PUT", conn, path, timeoutMsecs);
                out = conn.getOutputStream();
View Full Code Here

Examples of ptolemy.data.expr.FileParameter.asURL()

     */
    protected void _help() {
        try {
            FileParameter helpAttribute = (FileParameter) getModel()
                    .getAttribute("_help", FileParameter.class);
            URL doc = helpAttribute.asURL();
            getConfiguration().openModel(null, doc, doc.toExternalForm());
        } catch (Exception ex) {
            super._help();
        }
    }
View Full Code Here

Examples of ptolemy.data.expr.FileParameter.asURL()

            FileParameter helpAttribute = (FileParameter) configuration
                    .getAttribute("_helpDocViewer", FileParameter.class);
            URL doc;

            if (helpAttribute != null) {
                doc = helpAttribute.asURL();
            } else {
                doc = getClass().getClassLoader().getResource(helpFile);
            }

            configuration.openModel(null, doc, doc.toExternalForm());
View Full Code Here

Examples of ptolemy.data.expr.FileParameter.asURL()

        // attribute of the configuration.
        // If we don't have an _about, or _about returns
        // no models, then look in the complete demos location

        if (aboutAttribute != null) {
            baseURL = aboutAttribute.asURL();
            String aboutURLString = baseURL.toExternalForm();
            String base = aboutURLString.substring(0,
                    aboutURLString.lastIndexOf("/"));
            baseURL = MoMLApplication.specToURL(base + "/intro.htm");
            System.out.println("HTMLAbout._expandLibrary(): looking in about URL: " + baseURL);
View Full Code Here

Examples of ptolemy.data.expr.FileParameter.asURL()

            if (fileOrURLParameter == null) {
                throw new InternalErrorException(object, null,
                        "No \"fileOrURL\" attribute.");
            } else {
                try {
                    if (fileOrURLParameter.asURL() == null) {
                        ModelDirectory directory = configuration.getDirectory();

                        StringParameter initialDefaultContentsParameter = (StringParameter) object
                                .getAttribute("initialDefaultContents");
                        String defaultText = "";
View Full Code Here

Examples of ptolemy.data.expr.FileParameter.asURL()

        _icon = new ImageIcon(this, "_icon");
        _icon.setPersistent(false);
        FileParameter source = new FileParameter(this, "source");
        source
                .setExpression("$CLASSPATH/ptolemy/vergil/kernel/attributes/ptIIplanetIcon.gif");
        URL url = source.asURL();
        Toolkit tk = Toolkit.getDefaultToolkit();
        Image image = tk.getImage(url);
        _icon.setImage(image);
    }
View Full Code Here

Examples of ptolemy.data.expr.FileParameter.asURL()

                FileParameter aboutAttribute = (FileParameter) configuration
                        .getAttribute("_about", FileParameter.class);
                URL doc;

                if (aboutAttribute != null) {
                    doc = aboutAttribute.asURL();
                } else {
                    doc = getClass().getClassLoader().getResource(aboutFile);
                }

                // The usual mechanism for opening a file is:
View Full Code Here

Examples of ptolemy.data.expr.FileParameter.asURL()

                Configuration configuration = getConfiguration();
                FileParameter iconAttribute = (FileParameter) configuration
                        .getAttribute("_applicationIcon", FileParameter.class);

                if (iconAttribute != null) {
                    url = iconAttribute.asURL();
                }
            } catch (Throwable ex) {
                // Ignore, we will set url to the default.
            }
            if (url == null) {
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.