Package org.jdesktop.wonderland.common

Examples of org.jdesktop.wonderland.common.ModuleURI


     */
    private CachedModule getCachedModule() {
        // Fetch some information about the asset: the base server URL of where
        // the module definition is located, the name of the module and the
        // asset path
        ModuleURI assetURI = (ModuleURI)getAssetURI();
        String moduleName = assetURI.getModuleName();
        String serverURL = assetURI.getServerURL();

        ServerCache serverCache = ServerCache.getServerCache(serverURL);
        if (serverCache == null) {
            logger.warning("Unable to locate cache of modules for the server " + serverURL);
            return null;
View Full Code Here


     */
    private String getDesiredChecksum(CachedModule cachedModule) {
        // Fetch some information about the asset: the base server URL of where
        // the module definition is located, the name of the module and the
        // asset path
        ModuleURI assetURI = (ModuleURI)getAssetURI();
        String path = assetURI.getRelativePathInModule();

        ChecksumList moduleChecksums = cachedModule.getModuleChecksums();
        if (moduleChecksums == null) {
            logger.warning("Unable to locate checksum information for " +
                    assetURI.toExternalForm());
            return null;
        }

        Checksum checksum = moduleChecksums.getChecksumMap().get(path);
        if (checksum == null) {
            logger.warning("Unable to locate checksum for path " + path +
                    " for " + assetURI.toExternalForm());
            return null;
        }
        return checksum.getChecksum();
    }
View Full Code Here

            return null;
        }

        // Assume the asset is of type ModuleURI and construct the URL based
        // upon the relative path of the asset
        ModuleURI moduleURI = (ModuleURI) getAssetURI();
        String path = moduleURI.getRelativePathInModule();
        String url = AssetManager.encodeSpaces(baseURL + "/" + path);
        return url;
    }
View Full Code Here

    @Override
    public InputStream getInputStream() throws IOException {
        try {
            // Since we know this asset belongs to a module, first create a
            // factory to handle its loading.
            ModuleURI uri = new ArtURI(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

TOP

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

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.