java.lang.Object
com.esri.arcgisruntime.mapping.Item
All Implemented Interfaces:
Loadable
Direct Known Subclasses:
LocalItem, PortalItem

public abstract class Item extends Object implements Loadable
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:
  • Method Details

    • getAccessInformation

      public String 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

      public Calendar 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

      public String getDescription()
      Gets the description of this item.
      Returns:
      the description of this item
      Since:
      100.0.0
    • getExtent

      public Envelope getExtent()
      Gets the extent of this item.
      Returns:
      an Envelope defining the extent of this item, using WGS84 coordinates
      Since:
      100.0.0
    • getItemId

      public String 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

      public Calendar 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

      public String getName()
      Gets the name of this item.
      Returns:
      the name of this item, or null if none
      Since:
      100.5.0
    • getSnippet

      public String getSnippet()
      Gets the summary description snippet of this item.
      Returns:
      the summary description snippet of this item
      Since:
      100.0.0
    • getSpatialReferenceName

      public String getSpatialReferenceName()
      Gets the name of the spatial reference of this item.
      Returns:
      the spatial reference name
      Since:
      100.0.0
    • getTags

      public List<String> 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

      public String 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

      public String getTitle()
      Gets the title of this item.
      Returns:
      the title of this item
      Since:
      100.0.0
    • getTypeKeywords

      public List<String> 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

      public void setAccessInformation(String accessInformation)
      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

      public void setDescription(String description)
      Sets the description of this item.
      Parameters:
      description - the description of this item
      Since:
      100.0.0
    • setExtent

      public void setExtent(Envelope extent)
      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

      public void setSnippet(String snippet)
      Sets the summary description snippet of this item.
      Parameters:
      snippet - the summary description snippet of this item
      Since:
      100.0.0
    • setTermsOfUse

      public void setTermsOfUse(String termsOfUse)
      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

      public void setTitle(String title)
      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

      public abstract ListenableFuture<InputStream> 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:
      Since:
      100.0.0
    • fetchThumbnailAsync

      public abstract ListenableFuture<byte[]> 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:
      Since:
      100.0.0
    • updateItemPropertiesAsync

      public abstract ListenableFuture<Void> 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 (for PortalItems) or on disk (for LocalItems).

      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 see MobileMapPackage.getItem() and for any maps use GeoModel.getItem(). As well as packages, the local item available from an item resource cache can be updated. This is accessed with ItemResourceCache.getItem().

      Returns:
      a ListenableFuture for tracking when the operation is done and getting the result; also allows cancellation
      Since:
      100.4.0