public class ConfigurableDataResource_impl extends Resource_ImplBase implements DataResource
DataResource implementation that can read data from a file via a URL. There is
 an attribute for specifying the location of a local cache for a remote file, but this is not
 currently being used.PARAM_RELATIVE_PATH_RESOLVERPARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_MANAGER, PARAM_CONFIG_PARAM_SETTINGS, PARAM_EXTERNAL_OVERRIDE_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT| Constructor and Description | 
|---|
| ConfigurableDataResource_impl() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | destroy()Releases all resources held by this  Resource. | 
| boolean | equals(Object obj)Determines if this  DataResourceis equal to anotherDataResource. | 
| InputStream | getInputStream()Gets an  InputStreamto the data. | 
| protected File | getLocalCache()Gets the file name of the local cache for a remote resource file, if any. | 
| URI | getUri()Gets the URI of the data. | 
| URL | getUrl()Gets the URL where the data is stored. | 
| int | hashCode()Gest the hash code for this  DataResource. | 
| boolean | initialize(ResourceSpecifier aSpecifier,
          Map<String,Object> aAdditionalParams)Initializes this DataResource. | 
getCasManager, getLogger, getMetaData, getRelativePathResolver, getResourceManager, getUimaContext, getUimaContextAdmin, loadUserClass, loadUserClassOrThrow, setContextHolder, setContextHolderX, setLogger, setMetaData, withContextHolderclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLoggerpublic boolean initialize(ResourceSpecifier aSpecifier, Map<String,Object> aAdditionalParams) throws ResourceInitializationException
initialize in interface Resourceinitialize in class Resource_ImplBaseaSpecifier - describes how to create this DataResource. Must (at least for now) be a
          FileResourceSpecifier.aAdditionalParams - not currently usedResourceSpecifier.ResourceInitializationException - if a failure occurs during initialization.Resource.initialize(ResourceSpecifier, Map)public void destroy()
ResourceResource.destroy in interface Resourcedestroy in class Resource_ImplBaseResource.destroy()public InputStream getInputStream() throws IOException
DataResourceInputStream to the data. It is the caller's responsibility to close this input
 stream when finished with it.getInputStream in interface DataResourceIOException - if an I/O error occurred when trying to open the streamDataResource.getInputStream()public URI getUri()
DataResourceDataResource.getUrl(). However, in the case where DataResource.getUrl() 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.getUri in interface DataResourcepublic URL getUrl()
DataResourceDataResource.getInputStream() method be used whenever possible - see the class comment for more
 information.getUrl in interface DataResourceDataResource.getUrl()protected File getLocalCache()
public boolean equals(Object obj)
DataResourceDataResource is equal to another DataResource. It
 is important that DataResource implementations override this method appropriately,
 because the ResourceManager can make use of this method to determine when cached data
 can be reused. Two DataResources that are equal according to this
 method will be considered to provide access to the same data; therefore, a common cache can be
 used.equals in interface DataResourceequals in class Objectobj - the object to compare toaObj is a DataResource and provides
         access to the same data as this object.DataResource.equals(java.lang.Object)public int hashCode()
DataResourceDataResource. As always, if the
 DataResource.equals(Object) method is overridden, this method should also be overridden. Two
 objects that are equal must have the same hash code.hashCode in interface DataResourcehashCode in class ObjectDataResource.hashCode()Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.