Package org.jdesktop.wonderland.common

Examples of org.jdesktop.wonderland.common.ContentURI


            return null;
        }

        // Otherwise, formulate the URL to open. We need to add the base url
        // of the repository to the relative path of the asset.
        ContentURI contentURI = (ContentURI)assetURI;
        String path = contentURI.getRelativePath();
        String url = AssetManager.encodeSpaces(baseURL + path);
        return url;
    }
View Full Code Here


     */
    @Override
    public AssetRepository[] getAssetRepositories() {
        // We need to get the base URL of the server in order to find the
        // content repository.
        ContentURI uri = (ContentURI)getAssetURI();
        String serverURL = "http://" + uri.getHostName() + ":" + uri.getHostPort();
        String baseURL = serverURL + "/webdav/content/";
      
        // Create the one asset repository for the base URL of the server
        AssetRepository[] assetRepositories = new AssetRepository[1];
        String checksum = getDesiredChecksum();
View Full Code Here

   
    @Override
    public InputStream getInputStream() throws IOException {
        try {
            // First create a factory to handle the loading from a url
            ContentURI uri = new ContentURI(this.url.toExternalForm());

            // Next, we ask the asset manager for the asset and wait for it to
            // be loaded
            Asset asset = AssetManager.getAssetManager().getAsset(uri);
            if (asset == null || AssetManager.getAssetManager().waitForAsset(asset) == false) {
View Full Code Here

        // The URI needs to correspond to a content repository URI
        if (!(assetURI instanceof ContentURI)) {
            logger.warning("URI is not a content uri " + uri);
            return null;
        }
        ContentURI contentURI = (ContentURI)assetURI;
        String root = contentURI.getRoot();
        String assetPath = contentURI.getAssetPath();

        // If the given server session is null, use the primary one
        if (session == null) {
            session = LoginManager.getPrimary();
        }
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.common.ContentURI

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.