Examples of Asset


Examples of org.jdesktop.wonderland.client.assetmgr.Asset

            // 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) {
                throw new IOException("No such asset "+url);
            }
            return new AssetInputStream(asset);
        } catch (URISyntaxException excp) {
View Full Code Here

Examples of org.jdesktop.wonderland.client.assetmgr.Asset

            final int j = i;
            threads[i] = new Thread() {
                public void run() {
                    try {
                        AssetURI assetURI = new AssetURI(urls[j]);
                        Asset asset = assetManager.getAsset(assetURI, AssetType.FILE);
                        assertTrue(assetManager.waitForAsset(asset));
                        assertNull(asset.getFailureInfo());
                        assertNotNull(asset.getLocalCacheFile());
                        System.out.println("Done with: " + assetURI.toString());
                    } catch (java.net.URISyntaxException excp) {
                        System.out.println(excp.toString());
                    }
                }
View Full Code Here

Examples of org.sonatype.nexus.component.model.Asset

    assetDocument.field(EntityAdapter.P_ID, assetId.asUniqueString());
    assetDocument.field(P_FIRST_CREATED, blob.getMetrics().getCreationTime().toDate());
    assetDocument.field(P_COMPONENT, componentDocumentRid);
    Map<String, String> blobRefs = ImmutableMap.of(localBlobStoreId, blob.getId().asUniqueString());
    assetDocument.field(P_BLOB_REFS, blobRefs);
    Asset asset = (Asset) sourceAsset;
    assetDocument.field(P_CONTENT_TYPE, asset.getContentType());
    assetDocument.field(P_PATH, asset.getPath());

    // store and return asset document
    return assetDocument.save();
  }
View Full Code Here

Examples of org.terasology.asset.Asset

        return item.getURI().toSimpleString();
    }

    @Override
    public T getFromString(String representation) {
        Asset asset = Assets.resolve(type, representation);
        if (asset != null && assetClass.isAssignableFrom(asset.getClass())) {
            return assetClass.cast(asset);
        }
        return null;
    }
View Full Code Here

Examples of org.wkh.bateman.trade.Asset

        toyPrices.put(today.plusMinutes(2), new BigDecimal(11.3));
        toyPrices.put(today.plusMinutes(3), new BigDecimal(12));
        toyPrices.put(today.plusDays(1), new BigDecimal(10.1));
        toyPrices.put(today.plusDays(1).plusMinutes(1), new BigDecimal(9.5));
        series = new TimeSeries(toyPrices);
        asset = new Asset("FOO", series);

        account = new Account(new BigDecimal(1000), today.minusDays(6));

        conditions = new Conditions(BigDecimal.ZERO, BigDecimal.ZERO);
        moneyManager = new FixedPercentageAllocationStrategy(0.2, asset);
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.