Codota Logo
ResourceStatus
Code IndexAdd Codota to your IDE (free)

How to use
ResourceStatus
in
edu.usc.irds.sparkler.model

Best Java code snippets using edu.usc.irds.sparkler.model.ResourceStatus (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: USCDataScience/sparkler

public Resource(String url, String group, JobContext sparklerJob, Date fetchTimestamp, Integer numTries,
        Integer numFetches, ResourceStatus status) {
  this(url, group, sparklerJob, fetchTimestamp);
  //this.numFetches = numFetches;
  this.status = status.toString();
}
origin: USCDataScience/sparkler

public Resource(String url, Integer discoverDepth, JobContext sparklerJob, ResourceStatus status) throws MalformedURLException {
  this(url, new URL(url).getHost(), sparklerJob);
  this.indexedAt = new Date();
  this.id = resourceId(url, sparklerJob, this.indexedAt);
  this.discoverDepth = discoverDepth;
  this.status = status.toString();
}
origin: USCDataScience/sparkler

public Resource(String url, Integer discoverDepth, JobContext sparklerJob, ResourceStatus status,
        String parent, Map<String, Double> score) throws MalformedURLException {
  this(url, new URL(url).getHost(), sparklerJob);
  this.indexedAt = new Date();
  this.id = resourceId(url, sparklerJob, this.indexedAt);
  this.discoverDepth = discoverDepth;
  this.status = status.toString();
  this.parent = parent;
  this.score = score;
}
origin: USCDataScience/sparkler

public Resource(String url, Integer discoverDepth, JobContext sparklerJob, ResourceStatus status,
        Date fetchTimestamp, String parent) throws MalformedURLException {
  this(url, new URL(url).getHost(), sparklerJob);
  this.id = resourceId(url, sparklerJob, fetchTimestamp);
  this.discoverDepth = discoverDepth;
  this.status = status.toString();
  this.parent = parent;
}
origin: USCDataScience/sparkler

  @Override
  public FetchedData apply(Resource resource) {
    try {
      return this.fetch(resource);
    } catch (Exception e) {
      int statusCode =  DEFAULT_ERROR_CODE;
      if (e instanceof FileNotFoundException){
        statusCode = 404;
      }
      LOG.warn("FETCH-ERROR {}", resource.getUrl());
      LOG.debug(e.getMessage(), e);
      FetchedData fetchedData = new FetchedData(new byte[0], "", statusCode);
      resource.setStatus(ResourceStatus.ERROR.toString());
      fetchedData.setResource(resource);
      return fetchedData;
    }
  }
}
origin: USCDataScience/sparkler

IOUtils.closeQuietly(bufferOutStream);
FetchedData fetchedData = new FetchedData(rawData, urlConn.getContentType(), responseCode);
resource.setStatus(ResourceStatus.FETCHED.toString());
fetchedData.setResource(resource);
fetchedData.setHeaders(urlConn.getHeaderFields());
origin: USCDataScience/sparkler

resource.setStatus(ResourceStatus.FETCHED.toString());
fetchedData.setResource(resource);
return fetchedData;
origin: USCDataScience/sparkler

resource.setStatus(ResourceStatus.FETCHED.toString());
LOG.warn(e.getMessage(), e);
fetchedData = new FetchedData(new byte[0], "unknown/unknown", 0); // fixme: use proper status code
resource.setStatus(ResourceStatus.ERROR.toString());
edu.usc.irds.sparkler.modelResourceStatus

Javadoc

Created by karanjeetsingh on 10/22/16.

Most used methods

  • toString

Popular in Java

  • Making http post requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • findViewById (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • JList (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now