java.lang.Object
com.esri.arcgisruntime.mapping.Item
- All Implemented Interfaces:
Loadable
- Direct Known Subclasses:
LocalItem
,PortalItem
Abstract base class for items of geographic information, providing metadata and also access to the item content.
The item may reside in an ArcGIS portal, or locally on disk.
- Since:
- 100.0.0
- See Also:
-
Property Summary
Properties inherited from interface com.esri.arcgisruntime.loadable.Loadable
loadError, loadStatus
-
Method Summary
Modifier and TypeMethodDescriptionabstract ListenableFuture
<InputStream> Executes an asynchronous operation to fetch the item data.abstract ListenableFuture
<byte[]> Executes an asynchronous operation to fetch the thumbnail for the item.Gets information on the source of this item and its copyright status.Gets the date this item was created.Gets the description of this item.Gets the extent of this item.Gets the ID of this item.Gets the date this item was last modified.getName()
Gets the name of this item.Gets the summary description snippet of this item.Gets the name of the spatial reference of this item.getTags()
Gets the list of tags associated with this item.Gets the terms of use for this item.abstract byte[]
Gets the thumbnail data for this item.getTitle()
Gets the title of this item.Gets a list of keywords that further describe the type of this item.void
setAccessInformation
(String accessInformation) Sets information on the source of this item and its copyright status.void
setDescription
(String description) Sets the description of this item.void
Sets the extent of this item.void
setSnippet
(String snippet) Sets the summary description snippet of this item.void
setTermsOfUse
(String termsOfUse) Sets the terms of use for this item.abstract void
setThumbnailData
(byte[] thumbnailData) Sets the thumbnail data for this item.void
Sets the title of this item.abstract ListenableFuture
<Void> Executes an asynchronous operation to update any item properties that have been changed (using the setter methods).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.esri.arcgisruntime.loadable.Loadable
addDoneLoadingListener, addLoadStatusChangedListener, cancelLoad, getLoadError, getLoadStatus, loadAsync, loadErrorProperty, loadStatusProperty, removeDoneLoadingListener, removeLoadStatusChangedListener, retryLoadAsync
-
Method Details
-
getAccessInformation
Gets information on the source of this item and its copyright status.- Returns:
- text describing the source of this item and its copyright status
- Since:
- 100.0.0
-
getCreated
Gets the date this item was created.- Returns:
- the date this item was created; always a GregorianCalendar using UTC time zone and English locale
- Since:
- 100.0.0
-
getDescription
Gets the description of this item.- Returns:
- the description of this item
- Since:
- 100.0.0
-
getExtent
Gets the extent of this item.- Returns:
- an Envelope defining the extent of this item, using WGS84 coordinates
- Since:
- 100.0.0
-
getItemId
Gets the ID of this item. Item ID can only be set on a not loaded item.- Returns:
- the ID of this item
- Since:
- 100.0.0
-
getModified
Gets the date this item was last modified.- Returns:
- the date this item was last modified; always a GregorianCalendar using UTC time zone and English locale
- Since:
- 100.0.0
-
getName
Gets the name of this item.- Returns:
- the name of this item, or null if none
- Since:
- 100.5.0
-
getSnippet
Gets the summary description snippet of this item.- Returns:
- the summary description snippet of this item
- Since:
- 100.0.0
-
getSpatialReferenceName
Gets the name of the spatial reference of this item.- Returns:
- the spatial reference name
- Since:
- 100.0.0
-
getTags
Gets the list of tags associated with this item. The returned List object is modifiable and changes made to it will affect the tags used by this Item object.- Returns:
- the list of tags associated with this item
- Since:
- 100.0.0
-
getTermsOfUse
Gets the terms of use for this item. This may include HTML markup.- Returns:
- the terms of use
- Since:
- 100.4.0
-
getThumbnailData
public abstract byte[] getThumbnailData()Gets the thumbnail data for this item.- Returns:
- the thumbnail data
- Since:
- 100.0.0
-
getTitle
Gets the title of this item.- Returns:
- the title of this item
- Since:
- 100.0.0
-
getTypeKeywords
Gets a list of keywords that further describe the type of this item. Each item is tagged with a set of type keywords that are derived based on its primary type.The returned list is modifiable and changes made to it will affect the type keywords used by this item. Update this list only if you wish to add additional type keywords.
- Returns:
- the list of type keywords for this item
- Since:
- 100.5.0
-
setAccessInformation
Sets information on the source of this item and its copyright status.- Parameters:
accessInformation
- text describing the source of this item and its copyright status- Since:
- 100.0.0
-
setDescription
Sets the description of this item.- Parameters:
description
- the description of this item- Since:
- 100.0.0
-
setExtent
Sets the extent of this item.- Parameters:
extent
- an Envelope defining the new extent; z- and m values, if any, are ignored- Throws:
IllegalArgumentException
- if extent is null or if it has no SpatialReference- Since:
- 100.2.0
-
setSnippet
Sets the summary description snippet of this item.- Parameters:
snippet
- the summary description snippet of this item- Since:
- 100.0.0
-
setTermsOfUse
Sets the terms of use for this item. This may include HTML markup.- Parameters:
termsOfUse
- the terms of use- Since:
- 100.4.0
-
setThumbnailData
public abstract void setThumbnailData(byte[] thumbnailData) Sets the thumbnail data for this item.- Parameters:
thumbnailData
- a byte array representing the thumbnail, or null to set no thumbnail- Since:
- 100.0.0
-
setTitle
Sets the title of this item.- Parameters:
title
- the title of this item- Throws:
IllegalArgumentException
- if title is null or empty- Since:
- 100.0.0
-
fetchDataAsync
Executes an asynchronous operation to fetch the item data. The result is an InputStream object. You are responsible for closing the InputStream after using it.- Returns:
- a ListenableFuture for tracking when the operation is done and getting the result; also allows
cancellation. Calling
get()
on the returned future may throw an ExecutionException with its cause set to an exception as follows:IOException
if the data cannot be fetched
- Since:
- 100.0.0
-
fetchThumbnailAsync
Executes an asynchronous operation to fetch the thumbnail for the item. The result is a byte[] containing the thumbnail data, or null if there is no thumbnail for the item.- Returns:
- a ListenableFuture for tracking when the operation is done and getting the result; also allows
cancellation. Calling
get()
on the returned future may throw an ExecutionException with its cause set to an exception as follows:IOException
if the thumbnail cannot be fetched
- Since:
- 100.0.0
-
updateItemPropertiesAsync
Executes an asynchronous operation to update any item properties that have been changed (using the setter methods). This causes the values that have been changed to be updated on the portal (forPortalItem
s) or on disk (forLocalItem
s).Updating properties can be only done for local items that are unpacked. For example, a mobile map package file (.mmpk) can be unpacked using
MobileMapPackage.unpackAsync(String, String)
. Once unpacked, local items within the package can be updated seeMobileMapPackage.getItem()
and for any maps useGeoModel.getItem()
. As well as packages, the local item available from an item resource cache can be updated. This is accessed withItemResourceCache.getItem()
.- Returns:
- a ListenableFuture for tracking when the operation is done and getting the result; also allows cancellation
- Since:
- 100.4.0
-