Examples of download()


Examples of net.sf.jabref.net.URLDownload.download()

    }

    protected String getCitationsFromUrl(String urlQuery, List<String> ids) throws IOException {
        URL url = new URL(urlQuery);
        URLDownload ud = new URLDownload(url);
        ud.download();

        String cont = ud.getStringContent();
        //String entirePage = cont;
        Matcher m = linkPattern.matcher(cont);
        if (m.find()) {
View Full Code Here

Examples of net.sf.jabref.net.URLDownload.download()

                            if ((mimeType != null) && (mimeType.toLowerCase().equals("application/pdf"))) {
                                return new FindResult(result, url);
                            }
                            else {
                                udl = new URLDownload(null, result, new File("page.html"));
                                udl.download();
                                return new FindResult(WRONG_MIME_TYPE, url);
                            }
                        } catch (IOException ex) {
                            ex.printStackTrace();
                            return new FindResult(IO_EXCEPTION, url);
View Full Code Here

Examples of net.sf.jabref.net.URLDownload.download()

                            .getField(BibtexFields.KEY_FIELD)
                            + ".pdf");
                    URLDownload udl = new URLDownload(editor, url,
                            file);
                    frame.output(Globals.lang("Downloading..."));
                    udl.download();
                    frame.output(Globals.lang("Download completed"));
                    feditor.setText(file.toURI().toURL().toString());
                    editor.updateField(feditor);

                }catch (IOException ioex){
View Full Code Here

Examples of net.sf.jabref.net.URLDownload.download()

        try {
            temp = File.createTempFile("jabref-link", "."+fileType.getExtension());
            temp.deleteOnExit();
            System.out.println("Downloading to '"+temp.getPath()+"'");
            URLDownload ud = new URLDownload(null, new URL(link), temp);
            ud.download();
            System.out.println("Done");
        } catch (MalformedURLException ex) {
            ex.printStackTrace();
        } catch (IOException ex) {
            ex.printStackTrace();
View Full Code Here

Examples of net.sf.jabref.net.URLDownload.download()

        //System.out.println("Time: "+(System.currentTimeMillis()-time));
        (new Thread() {
            public void run() {

                try {
                    udlF.download();
                } catch (IOException e2) {
                    dontShowDialog = true;
                    if ((editor != null) && (editor.isVisible()))
                        editor.setVisible(false, false);
                    JOptionPane.showMessageDialog(frame, Globals.lang("Invalid URL")+": "
View Full Code Here

Examples of net.sf.jftp.net.FtpConnection.download()

  // if you want non-blocking, multithreaded io, just use
  //
  // con.handleDownload(file);
  //
  // which spawns a new thread for the download
  con.download(file);

  time = (System.currentTimeMillis()-current);

  System.out.println("Download took "+time+"ms.");
}
View Full Code Here

Examples of net.sf.jftp.net.wrappers.SmbConnection.download()

            Log.debug("Insomniac: Connected, downloading to: " +
                      Settings.defaultWorkDir);
            JFtp.statusP.jftp.ensureLogging();
            con.setLocalPath(dir.getText().trim());

            if(con.download(url) >= 0)
            {
                Log.debug("Insomniac: Finished download.");
            }
            else
            {
View Full Code Here

Examples of org.apache.ivy.core.cache.RepositoryCacheManager.download()

        RepositoryCacheManager cacheManager = getRepositoryCacheManager();

        clearArtifactAttempts();
        DownloadReport dr = new DownloadReport();
        for (int i = 0; i < artifacts.length; i++) {
            ArtifactDownloadReport adr = cacheManager.download(artifacts[i],
                artifactResourceResolver, downloader, getCacheDownloadOptions(options));
            if (DownloadStatus.FAILED == adr.getDownloadStatus()) {
                if (!ArtifactDownloadReport.MISSING_ARTIFACT.equals(adr.getDownloadDetails())) {
                    Message.warn("\t" + adr);
                }
View Full Code Here

Examples of org.apache.ivy.plugins.resolver.DependencyResolver.download()

            if (!dependencies[i].isCompletelyEvicted() && !dependencies[i].hasProblem()
                    && dependencies[i].getModuleRevision() != null) {
                DependencyResolver resolver = dependencies[i].getModuleRevision()
                        .getArtifactResolver();
                Artifact[] selectedArtifacts = dependencies[i].getSelectedArtifacts(artifactFilter);
                DownloadReport dReport = resolver.download(selectedArtifacts, options);
                ArtifactDownloadReport[] adrs = dReport.getArtifactsReports();
                for (int j = 0; j < adrs.length; j++) {
                    if (adrs[j].getDownloadStatus() == DownloadStatus.FAILED) {
                        if (adrs[j].getArtifact().getExtraAttribute("ivy:merged") != null) {
                            Message.warn("\tmerged artifact not found: " + adrs[j].getArtifact()
View Full Code Here

Examples of org.apache.ivy.plugins.resolver.DependencyResolver.download()

     * @return a report concerning the download
     * @see #download(ArtifactOrigin, DownloadOptions)
     */
    public ArtifactDownloadReport download(Artifact artifact, DownloadOptions options) {
        DependencyResolver resolver = settings.getResolver(artifact.getModuleRevisionId());
        DownloadReport r = resolver.download(new Artifact[] {artifact}, options);
        return r.getArtifactReport(artifact);
    }

    /**
     * Locates an artifact in dependency resolvers, and return its location if it can be located and
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.