Public: Load Asset by AssetURI and track it as a dependency.

 uri - AssetURI

 Returns Asset.
544191
def load(uri)
      asset = environment.load(uri)
      @dependencies.merge(asset.metadata[:dependencies])
      asset
    end
330437
def dependency(lib = nil)
      lib ? require(lib) : yield
    rescue LoadError, NameError => e
      self.load_error = e
    end
202245
def retrieve_asset(filename):
    

    record = model.Image.get(asset_name=filename)
    if not record:
        raise http_error.NotFound("File not found")
    if not record.is_asset:
        raise http_error.Forbidden()

    return flask.send_file(record.file_path, conditional=True)
599814
@Override
    public T add(Asset asset, ArchivePath target) throws IllegalArgumentException {
        this.getArchive().add(asset, target);
        return covarientReturn();
    }
443938
function asset(entry, opts, cb) {
    ss.bundler.loadFile(entry, opts, null,
      function(output) {
        switch(entry.bundle) {
          case 'html':
            return cb(ss.bundler.injectTailIfNeeded(output,opts));
          case 'css':
            return cb( client.includes.css? output:'');
          case 'worker':
            //TODO
            if (opts.compress && entry.file.indexOf('.min') === -1) {
              output = ss.bundler.minifyJSFile(output, entry.file);
            }
            break;

          default:
            //TODO with options compress saved to avoid double compression
            output = bundler.wrapCode(output, entry, opts);
            if (opts.compress && entry.file.indexOf('.min') === -1) {
              output = ss.bundler.minifyJSFile(output, entry.file);
            }
            return cb(output);
        }
      },
      function(err) {
        ss.log.clientIssue(client,options,err,entry);
        switch(entry.ext) {
          case 'html':
            return cb('Couldn\'t format ' + entry.file + err.userInfoHTML);
          case 'css':
            return cb('/* couldn\'t format ' + entry.file + err.userInfoText+' */');
          default:
            return cb('// couldn\'t format ' + entry.file + err.userInfoText);
        }
      });
  }
576013
function (asset) {
    var bundle = this.bundle;
    var requires = bundle.getRequiredFiles(asset.assetFilePath);
    if (requires.length > 0) {
      return requires.map(function (file) {
        return bundle.getAsset(file).logicalPath;
      });
    } else {
      return [asset.logicalPath];
    }
  }
1242424
def retrieve_asset(uri)
      uri = URI.join(full_source_uri, uri)
      cache(uri) do
        case
        when %w[http https].include?(uri.scheme)
          Net::HTTP.get(uri)
        when uri.scheme.eql?('file')
          File.read(uri.path)
        end
      end
    end
374934
@Override
    public Asset getAsset(final String assetId) throws IOException, BadVersionException, RequestFailureException {
        HttpURLConnection connection = createHttpURLConnectionToMassive("/assets/"
                                                                        + assetId);
        connection.setRequestMethod("GET");
        testResponseCode(connection);
        return JSONAssetConverter.readValue(connection.getInputStream());
    }
120431
def _from_deprecated_son(cls, id_dict, run):
        """"""
        cls._deprecation_warning()
        return AssetLocator._from_deprecated_son(id_dict, run)
793173
public function getAsset($asset)
    {
        if (!isset($this->assetCache[$asset])) {
            $this->assetCache[$asset] = $this->assetRepository->createAsset($asset);
        }
        return $this->assetCache[$asset];
    }
1066384
function(url) {
            var needle = url.replace(/^https?:/, '');
            var assets = µb.availableFilterLists, asset;
            for ( var assetKey in assets ) {
                asset = assets[assetKey];
                if ( asset.content !== 'filters' ) { continue; }
                if ( typeof asset.contentURL === 'string' ) {
                    if ( asset.contentURL.endsWith(needle) ) { return assetKey; }
                    continue;
                }
                if ( Array.isArray(asset.contentURL) === false ) { continue; }
                for ( i = 0, n = asset.contentURL.length; i < n; i++ ) {
                    if ( asset.contentURL[i].endsWith(needle) ) {
                        return assetKey;
                    }
                }
            }
            return url;
        }
446667
def resolve_asset_dependency(self):
        

        for node in self.asset.findall("./*[@file]"):
            file = node.get("file")
            abs_path = os.path.abspath(self.folder)
            abs_path = os.path.join(abs_path, file)
            node.set("file", abs_path)
572981
def check_dependency(self, dependency_path):
        """"""
        stored_hash = self._stamp_file_hashes.get(dependency_path)

        # This file was newly added, or we don't have a file
        # with stored hashes yet. Assume out of date.
        if not stored_hash:
            return False

        return stored_hash == _sha1_for_file(dependency_path)
126333
@GET
  @Path("/{asset: .+}")
  public Response getSwaggerUiAsset(@PathParam("asset") String assetPath) {
    if (!ASSETS.contains(assetPath)) {
      return Response.status(404).build();
    }

    InputStream stream = getClass().getResourceAsStream("ui-dist/" + assetPath);
    return Response.ok(stream).build();
  }
1225238
def use_comparative_asset_view(self):
        """"""
        self._object_views['asset'] = COMPARATIVE
        # self._get_provider_session('asset_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_asset_view()
            except AttributeError:
                pass
928044
def resolveURI(self, URI):
        
        ret = libxml2mod.xmlACatalogResolveURI(self._o, URI)
        return ret
1025363
function load(root, path, callback, errback) {
		resolve(root, path, function (realPath, contents) {
			process(realPath, contents, callback, errback);
		}, errback);
	}