blob: d3fe3e11ce31e59e85c1b1ef319d28b79dc5744b [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DataResource (Apache UIMA Java SDK 2.10.3 User-Level API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DataResource (Apache UIMA Java SDK 2.10.3 User-Level API Documentation)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DataResource.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/uima/resource/CustomResourceSpecifier.html" title="interface in org.apache.uima.resource"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/uima/resource/ExternalResourceDependency.html" title="interface in org.apache.uima.resource"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/uima/resource/DataResource.html" target="_top">Frames</a></li>
<li><a href="DataResource.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.uima.resource</div>
<h2 title="Interface DataResource" class="title">Interface DataResource</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../../../org/apache/uima/resource/Resource.html" title="interface in org.apache.uima.resource">Resource</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">DataResource</span>
extends <a href="../../../../org/apache/uima/resource/Resource.html" title="interface in org.apache.uima.resource">Resource</a></pre>
<div class="block"><code>DataResource</code> is a simple resource that provides access to data. All
<code>DataResource</code>s will implement the <a href="../../../../org/apache/uima/resource/DataResource.html#getInputStream--"><code>getInputStream()</code></a> method to provide
access to their data.
<p>
<code>DataResource</code>s may optionally implement <a href="../../../../org/apache/uima/resource/DataResource.html#getUrl--"><code>getUrl()</code></a>, which would return the
URL where the data is located. This may be necessary for some applications, but it is strongly
recommended the <a href="../../../../org/apache/uima/resource/DataResource.html#getInputStream--"><code>getInputStream()</code></a> be used whenever possible, because accessing the data
directly via the URL does not allow the ResourceManager to assist in caching or sharing of data.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/uima/resource/DataResource.html#PARAM_RELATIVE_PATH_RESOLVER">PARAM_RELATIVE_PATH_RESOLVER</a></span></code>
<div class="block">Key for the initialization parameter whose value is a reference to the
<a href="../../../../org/apache/uima/resource/RelativePathResolver.html" title="interface in org.apache.uima.resource"><code>RelativePathResolver</code></a> that this DataResource should use to resolve relative resource
URLs.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.uima.resource.Resource">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;org.apache.uima.resource.<a href="../../../../org/apache/uima/resource/Resource.html" title="interface in org.apache.uima.resource">Resource</a></h3>
<code><a href="../../../../org/apache/uima/resource/Resource.html#PARAM_AGGREGATE_SOFA_MAPPINGS">PARAM_AGGREGATE_SOFA_MAPPINGS</a>, <a href="../../../../org/apache/uima/resource/Resource.html#PARAM_CONFIG_MANAGER">PARAM_CONFIG_MANAGER</a>, <a href="../../../../org/apache/uima/resource/Resource.html#PARAM_CONFIG_PARAM_SETTINGS">PARAM_CONFIG_PARAM_SETTINGS</a>, <a href="../../../../org/apache/uima/resource/Resource.html#PARAM_EXTERNAL_OVERRIDE_SETTINGS">PARAM_EXTERNAL_OVERRIDE_SETTINGS</a>, <a href="../../../../org/apache/uima/resource/Resource.html#PARAM_PERFORMANCE_TUNING_SETTINGS">PARAM_PERFORMANCE_TUNING_SETTINGS</a>, <a href="../../../../org/apache/uima/resource/Resource.html#PARAM_RESOURCE_MANAGER">PARAM_RESOURCE_MANAGER</a>, <a href="../../../../org/apache/uima/resource/Resource.html#PARAM_UIMA_CONTEXT">PARAM_UIMA_CONTEXT</a></code></li>
</ul>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/uima/resource/DataResource.html#equals-java.lang.Object-">equals</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;aObj)</code>
<div class="block">Determines if this <code>DataResource</code> is equal to another <code>DataResource</code>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/uima/resource/DataResource.html#getInputStream--">getInputStream</a></span>()</code>
<div class="block">Gets an <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a> to the data.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/uima/resource/DataResource.html#getUri--">getUri</a></span>()</code>
<div class="block">Gets the URI of the data.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/uima/resource/DataResource.html#getUrl--">getUrl</a></span>()</code>
<div class="block">Gets the URL where the data is stored.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/uima/resource/DataResource.html#hashCode--">hashCode</a></span>()</code>
<div class="block">Gest the hash code for this <code>DataResource</code>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.uima.resource.Resource">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.uima.resource.<a href="../../../../org/apache/uima/resource/Resource.html" title="interface in org.apache.uima.resource">Resource</a></h3>
<code><a href="../../../../org/apache/uima/resource/Resource.html#destroy--">destroy</a>, <a href="../../../../org/apache/uima/resource/Resource.html#getLogger--">getLogger</a>, <a href="../../../../org/apache/uima/resource/Resource.html#getMetaData--">getMetaData</a>, <a href="../../../../org/apache/uima/resource/Resource.html#getResourceManager--">getResourceManager</a>, <a href="../../../../org/apache/uima/resource/Resource.html#getUimaContext--">getUimaContext</a>, <a href="../../../../org/apache/uima/resource/Resource.html#getUimaContextAdmin--">getUimaContextAdmin</a>, <a href="../../../../org/apache/uima/resource/Resource.html#initialize-org.apache.uima.resource.ResourceSpecifier-java.util.Map-">initialize</a>, <a href="../../../../org/apache/uima/resource/Resource.html#setLogger-org.apache.uima.util.Logger-">setLogger</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="PARAM_RELATIVE_PATH_RESOLVER">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PARAM_RELATIVE_PATH_RESOLVER</h4>
<pre>static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> PARAM_RELATIVE_PATH_RESOLVER</pre>
<div class="block">Key for the initialization parameter whose value is a reference to the
<a href="../../../../org/apache/uima/resource/RelativePathResolver.html" title="interface in org.apache.uima.resource"><code>RelativePathResolver</code></a> that this DataResource should use to resolve relative resource
URLs. This value is used as a key in the <code>aAdditionalParams</code> Map that is passed to
the <a href="../../../../org/apache/uima/resource/Resource.html#initialize-org.apache.uima.resource.ResourceSpecifier-java.util.Map-"><code>Resource.initialize(ResourceSpecifier,Map)</code></a> method.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.uima.resource.DataResource.PARAM_RELATIVE_PATH_RESOLVER">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getInputStream--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInputStream</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;getInputStream()
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Gets an <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a> to the data. It is the caller's responsibility to close this input
stream when finished with it.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an InputStream to the data</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurred when trying to open the stream</dd>
</dl>
</li>
</ul>
<a name="getUri--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUri</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;getUri()</pre>
<div class="block">Gets the URI of the data. In general, this method will return a URI that is equivalent to the
URL returned by <a href="../../../../org/apache/uima/resource/DataResource.html#getUrl--"><code>getUrl()</code></a>. However, in the case where <a href="../../../../org/apache/uima/resource/DataResource.html#getUrl--"><code>getUrl()</code></a> returns null
(indicating no URL available), this method may still return a URI. This can be the case if the
URI does not use a standard protocol such as http or file.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The URI of the data</dd>
</dl>
</li>
</ul>
<a name="getUrl--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUrl</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;getUrl()</pre>
<div class="block">Gets the URL where the data is stored. This method may return null if there is no appropriate
URL (for example if the data is stored in a relational database). It is recommended that the
<a href="../../../../org/apache/uima/resource/DataResource.html#getInputStream--"><code>getInputStream()</code></a> method be used whenever possible - see the class comment for more
information.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the URL where the data is stored, or null if this is not available.</dd>
</dl>
</li>
</ul>
<a name="equals-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>boolean&nbsp;equals(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;aObj)</pre>
<div class="block">Determines if this <code>DataResource</code> is equal to another <code>DataResource</code>.
It is important that <code>DataResource</code> implementations override this method
appropriately, because the <a href="../../../../org/apache/uima/resource/ResourceManager.html" title="interface in org.apache.uima.resource"><code>ResourceManager</code></a> can make use of this method to determine
when cached data can be reused. Two <code>DataResource</code>s that are <code>equal</code>
according to this method will be considered to provide access to the same data; therefore, a
common cache can be used.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>aObj</code> - the object to compare to</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if and only if <code>aObj</code> is a <code>DataResource</code> and provides
access to the same data as this object.</dd>
</dl>
</li>
</ul>
<a name="hashCode--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>hashCode</h4>
<pre>int&nbsp;hashCode()</pre>
<div class="block">Gest the hash code for this <code>DataResource</code>. As always, if the
<a href="../../../../org/apache/uima/resource/DataResource.html#equals-java.lang.Object-"><code>equals(Object)</code></a> method is overridden, this method should also be overridden. Two
objects that are <code>equal</code> must have the same hash code.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the hash code for this object</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DataResource.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/uima/resource/CustomResourceSpecifier.html" title="interface in org.apache.uima.resource"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/uima/resource/ExternalResourceDependency.html" title="interface in org.apache.uima.resource"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/uima/resource/DataResource.html" target="_top">Frames</a></li>
<li><a href="DataResource.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2006&#x2013;2018 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>