congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
DereferenceException
Code IndexAdd Tabnine to your IDE (free)

How to use
DereferenceException
in
net.sf.taverna.t2.reference

Best Java code snippets using net.sf.taverna.t2.reference.DereferenceException (Showing top 10 results out of 315)

origin: net.sf.taverna.t2/t2reference-core-extensions

public InputStream openStream(ReferenceContext context)
    throws DereferenceException {
  throw new DereferenceException("Can't dereference VM objects");
}
origin: net.sf.taverna.t2.core/reference-core-extensions

/**
 * Return the data at the {@link URL} represented by this external reference
 */
public InputStream openStream(ReferenceContext context)
    throws DereferenceException {
  try {
    return httpUrl.openStream();
  } catch (IOException e) {
    throw new DereferenceException(e);
  }
}
origin: net.sf.taverna.t2/t2reference-core-extensions

/**
 * Return the data at the {@link URL} represented by this external reference
 */
public InputStream openStream(ReferenceContext context)
    throws DereferenceException {
  try {
    return httpUrl.openStream();
  } catch (IOException e) {
    throw new DereferenceException(e);
  }
}
origin: net.sf.taverna.t2/reference-core-extensions

/**
 * Return the data at the {@link URL} represented by this external reference
 */
public InputStream openStream(ReferenceContext context)
    throws DereferenceException {
  try {
    return httpUrl.openStream();
  } catch (IOException e) {
    throw new DereferenceException(e);
  }
}
origin: net.sf.taverna.t2/reference-core-extensions

/**
 * Fakes a de-reference operation, returning a byte stream over the string
 * data.
 */
public InputStream openStream(ReferenceContext arg0) {
  try {
    return new ByteArrayInputStream(this.contents
        .getBytes(getCharset()));
  } catch (UnsupportedEncodingException e) {
    throw new DereferenceException(e);
  }
}
origin: net.sf.taverna.t2/t2reference-core-extensions

/**
 * Fakes a de-reference operation, returning a byte stream over the string
 * data.
 */
public InputStream openStream(ReferenceContext arg0) {
  try {
    return new ByteArrayInputStream(this.contents
        .getBytes(getCharset()));
  } catch (UnsupportedEncodingException e) {
    throw new DereferenceException(e);
  }
}
origin: net.sf.taverna.t2.core/reference-core-extensions

/**
 * Fakes a de-reference operation, returning a byte stream over the string
 * data.
 */
public InputStream openStream(ReferenceContext arg0) {
  try {
    return new ByteArrayInputStream(this.contents
        .getBytes(getCharset()));
  } catch (UnsupportedEncodingException e) {
    throw new DereferenceException(e);
  }
}
origin: net.sf.taverna.t2/reference-core-extensions

/**
 * {@inheritDoc}
 */
@Override
public String getCharset() throws DereferenceException {
  if (!httpUrl.getProtocol().equals("http")) {
    return null; // Don't know
  }
  HeadMethod method = new HeadMethod(httpUrl.toExternalForm());
  HttpClient httpClient = new HttpClient();
  try {
    httpClient.executeMethod(method);
    return method.getResponseCharSet();
  } catch (HttpException e) {
    throw new DereferenceException(e);
  } catch (IOException e) {
    throw new DereferenceException(e);
  } finally {
    method.releaseConnection();
  }
}
origin: net.sf.taverna.t2/t2reference-core-extensions

/**
 * {@inheritDoc}
 */
@Override
public String getCharset() throws DereferenceException {
  if (!httpUrl.getProtocol().equals("http")) {
    return null; // Don't know
  }
  HeadMethod method = new HeadMethod(httpUrl.toExternalForm());
  HttpClient httpClient = new HttpClient();
  try {
    httpClient.executeMethod(method);
    return method.getResponseCharSet();
  } catch (HttpException e) {
    throw new DereferenceException(e);
  } catch (IOException e) {
    throw new DereferenceException(e);
  } finally {
    method.releaseConnection();
  }
}
origin: net.sf.taverna.t2.activities/sadi-activity

/**
 * Fakes a de-reference operation, returning a byte stream over the node.
 */
public InputStream openStream(ReferenceContext context) {
  try {
    String result = "";
    if (node == null) {
      result = "";
    } else if (node.isLiteral()) {
      result = ((Literal) node).getLexicalForm();
    } else if (node.isResource()) {
      Resource resource = (Resource) node;
      if (resource.isURIResource()) {
        result = resource.getURI();
      } else {
        Model model = ResourceUtils.reachableClosure(resource);
        StringWriter stringWriter = new StringWriter();
        model.write(stringWriter, "RDF/XML-ABBREV");
        result = stringWriter.toString();
      }
    }
    return new ByteArrayInputStream(result.getBytes(getCharset()));
  } catch (UnsupportedEncodingException e) {
    throw new DereferenceException(e);
  }
}
net.sf.taverna.t2.referenceDereferenceException

Javadoc

Thrown when a problem occurs during de-reference of an ExternalReferenceSPI implementation. This include operations which implicitly de-reference the reference such as those infering character set or data natures.

Most used methods

  • <init>

Popular in Java

  • Creating JSON documents from java classes using gson
  • compareTo (BigDecimal)
  • putExtra (Intent)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • JFileChooser (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now