Class Item

    • Method Detail

      • getAccessInformation

        public java.lang.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 java.util.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 java.lang.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 java.lang.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 java.util.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 java.lang.String getName()
        Gets the name of this item.
        Returns:
        the name of this item, or null if none
        Since:
        100.5.0
      • getSnippet

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

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

        public java.util.List<java.lang.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 java.lang.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 java.lang.String getTitle()
        Gets the title of this item.
        Returns:
        the title of this item
        Since:
        100.0.0
      • getTypeKeywords

        public java.util.List<java.lang.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​(java.lang.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​(java.lang.String description)
        Sets the description of this item.
        Parameters:
        description - the description of this item
        Since:
        100.0.0
      • setExtent

        @Deprecated
        public void setExtent​(double x1,
                              double y1,
                              double x2,
                              double y2)
        Deprecated.
        As of 100.2.0, replaced by setExtent(Envelope).
        Sets the extent of this item, using WGS84 coordinates.

        If x1 is larger than x2 it is used as the maximum x coordinate of the new extent, and vice versa. The same applies to the y coordinates.

        Parameters:
        x1 - the first x coordinate of the new extent
        y1 - the first y coordinate of the new extent
        x2 - the second x coordinate of the new extent
        y2 - the second y coordinate of the new extent
        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:
        java.lang.IllegalArgumentException - if extent is null or if it has no SpatialReference
        Since:
        100.2.0
      • setSnippet

        public void setSnippet​(java.lang.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​(java.lang.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​(java.lang.String title)
        Sets the title of this item.
        Parameters:
        title - the title of this item
        Throws:
        java.lang.IllegalArgumentException - if title is null or empty
        Since:
        100.0.0
      • fetchDataAsync

        public abstract ListenableFuture<java.io.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:
        • IOException if the data cannot be fetched
        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:
        • IOException if the thumbnail cannot be fetched
        Since:
        100.0.0
      • updateItemPropertiesAsync

        public abstract ListenableFuture<java.lang.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