Class ArcGISFeatureLayerInfo

java.lang.Object
com.esri.arcgisruntime.arcgisservices.ArcGISFeatureLayerInfo

public final class ArcGISFeatureLayerInfo extends Object
The metadata for an individual layer or table in an ArcGIS feature service.

An ArcGIS feature service is a data service that provides access to spatial features stored in layers and non-spatial features stored in tables. ArcGISFeatureLayerInfo provides basic information about an individual layer or table in this service, such as the description, geometry type, fields, drawing information, extent, feature templates, editor tracking fields, and whether it has attachments, z-values, or m-values.

You can obtain the ArcGISFeatureLayerInfo from a loaded ArcGISFeatureTable or from a loaded FeatureCollectionTable.

Since:
100.0.0
  • Method Details

    • getServiceSourceType

      public ServiceSourceType getServiceSourceType()
      Returns the ArcGIS service type which is the source of this metadata.
      Returns:
      the service source type
      Since:
      100.0.0
    • getAttribution

      public String getAttribution()
      Gets the attribution text information of the service.
      Returns:
      the attribution text
      Since:
      100.0.0
    • getDescription

      public String getDescription()
      Gets the description of the layer or table in the service.
      Returns:
      the description
      Since:
      100.0.0
    • getDisplayFieldName

      public String getDisplayFieldName()
      Gets the field which should be used to display a title for features from this layer.
      Returns:
      the display field name
      Since:
      100.0.0
    • getDrawingInfo

      public DrawingInfo getDrawingInfo()
      Gets the information about how features from this layer should be displayed on a map.
      Returns:
      the drawing info
      Since:
      100.0.0
    • getEffectiveMaxScale

      public double getEffectiveMaxScale()
      Gets the maximum scale at which this layer or any of its parents is visible. If the map is zoomed in beyond this scale, the layer will not be visible.
      Returns:
      the effective max scale
      Since:
      100.0.0
    • getEffectiveMinScale

      public double getEffectiveMinScale()
      Gets the minimum scale at which this layer or any of its parents is visible. If the map is zoomed out beyond this scale, the layer will not be visible.
      Returns:
      the effective min scale
      Since:
      100.0.0
    • getExtent

      public Envelope getExtent()
      Gets the geographic extent this layer covers.
      Returns:
      the extent
      Since:
      100.0.0
    • getFeatureTemplates

      public List<FeatureTemplate> getFeatureTemplates()
      Returns an unmodifiable list of FeatureTemplate objects representing feature templates for the layer. Usually only present if the layer does not contain feature sub-types. Only applicable for ArcGIS Server feature service layers.
      Returns:
      the feature templates as an unmodifiable list
      Since:
      100.0.0
    • getFeatureType

      public FeatureType getFeatureType(String name)
      Gets the feature type by name.
      Parameters:
      name - name
      Returns:
      the feature type
      Throws:
      IllegalArgumentException - if name is null or empty
      Since:
      100.0.0
    • getFeatureTypes

      public List<FeatureType> getFeatureTypes()
      Returns an unmodifiable list of FeatureType objects representing feature sub-types in the layer. For example, a roads layer may contain 2 feature sub-types : highways and streets.
      Returns:
      an unmodifiable list of the feature types
      Since:
      100.0.0
    • getGeometryType

      public GeometryType getGeometryType()
      Gets the type of geometry contained by features in the service.
      Returns:
      the geometry type
      Since:
      100.0.0
    • getServiceType

      public ArcGISFeatureLayerInfo.ServiceType getServiceType()
      Returns the layer type.
      Returns:
      the layer type
      Since:
      100.0.0
      See Also:
    • getMaxRecordCount

      public long getMaxRecordCount()
      Returns the maximum record count set on the service, which controls the number of features that may be returned from a query.
      Returns:
      the max record count
      Since:
      100.0.0
    • getMaxScale

      public double getMaxScale()
      Gets the maximum scale at which this layer is visible. If the map is zoomed in beyond this scale, the layer will not be visible.
      Returns:
      the max scale
      Since:
      100.0.0
    • getMinScale

      public double getMinScale()
      Gets the minimum scale at which this layer is visible. If the map is zoomed out beyond this scale, the layer will not be visible.
      Returns:
      the min scale
      Since:
      100.0.0
    • getOwnershipBasedAccessControl

      public OwnershipBasedAccessControlInfo getOwnershipBasedAccessControl()
      Gets the information about ownership-based access policies governing who can edit, delete, and query features.
      Returns:
      the ownership based access control, or null if not enabled on the service
      Since:
      100.0.0
    • getRelationshipInfos

      public List<RelationshipInfo> getRelationshipInfos()
      Gets an unmodifiable collection of RelationshipInfo objects that describe this layer/table's relationship with another layer or table in the service.
      Returns:
      an unmodifiable list of the relationship infos
      Since:
      100.1.0
    • getServiceLayerId

      public long getServiceLayerId()
      Gets the ID of the layer or table in the service.
      Returns:
      the service layer id
      Since:
      100.0.0
    • getServiceLayerName

      public String getServiceLayerName()
      Gets the name of the layer/table in the service.
      Returns:
      the service layer name
      Since:
      100.0.0
    • getTimeInfo

      public LayerTimeInfo getTimeInfo()
      Gets the Time information for the layer, such as start time field, end time field, track id field, layers time extent and the draw time interval. Only applicable if the layer is time aware.
      Returns:
      the time info for the layer
      Since:
      100.0.0
    • getTypeIdFieldName

      public String getTypeIdFieldName()
      Gets the name of the field that has the Type ID for the feature. Feature Service layer only.
      Returns:
      the type id field name
      Since:
      100.0.0
    • getVersion

      public String getVersion()
      Gets the version of the service.
      Returns:
      the version of the service
      Since:
      100.0.0
    • hasM

      public boolean hasM()
      Indicates whether features may contain M values.
      Returns:
      whether the source has m values
      Since:
      100.0.0
    • hasZ

      public boolean hasZ()
      Indicates whether features may contain z values.
      Returns:
      whether the source has z values
      Since:
      100.0.0
    • isDataVersioned

      public boolean isDataVersioned()
      Indicates whether data in the service is versioned.
      Returns:
      whether the data is versioned
      Since:
      100.0.0
    • hasDefaultVisibility

      public boolean hasDefaultVisibility()
      Indicates whether layer is visible by default.
      Returns:
      whether the layer is visible by default
      Since:
      100.0.0
    • hasAttachments

      public boolean hasAttachments()
      Indicates whether the features can store attachments.
      Returns:
      whether the features can store attachments
      Since:
      100.0.0
    • isSupportsAdvancedQueries

      public boolean isSupportsAdvancedQueries()
      Indicates whether the service supports advanced query operations (such as ordering results, or returning distinct results).
      Returns:
      whether the service supports advanced queries
      Since:
      100.0.0
    • isSupportsRollbackOnFailureParameter

      public boolean isSupportsRollbackOnFailureParameter()
      Indicates whether the service is capable of rolling back all edit operations in a batch if any one of the operations in the batch fails.
      Returns:
      true if the service supports rollback on failure, false otherwise
      Since:
      100.0.0
    • isSupportsStatistics

      public boolean isSupportsStatistics()
      Indicates whether the service is capable of returning statistics for query results.
      Returns:
      whether the service supports statistics
      Since:
      100.0.0
    • getCapabilities

      public FeatureServiceCapabilities getCapabilities()
      Gets the capabilities of the layer or table's ArcGIS feature service.
      Returns:
      the capabilities supported by the service
      Since:
      100.0.0
    • getEditFieldsInfo

      public EditFieldsInfo getEditFieldsInfo()
      Gets the layer's edit fields, which record who adds or edits the features and when the edits are made.

      If editor tracking has not been enabled, then these fields will be null. For more information, see Editor tracking for feature services.

      Returns:
      the edit fields info
      Since:
      100.0.0
    • getZDefault

      public double getZDefault()
      Gets the default z values for features created without a valid z value. Only applicable if isZDefaultsEnabled() is true. Returns NaN if isZDefaultsEnabled() is false.
      Returns:
      the z default value
      Since:
      100.0.0
    • isZDefaultsEnabled

      public boolean isZDefaultsEnabled()
      Indicates whether a default z value will be applied for features created without a z value.
      Returns:
      true if the z defaults is enabled, false otherwise
      Since:
      100.0.0
    • getGlobalIdFieldName

      public String getGlobalIdFieldName()
      Gets the name of field which contains the GLOBAL ID for each feature.
      Returns:
      the global id field name
      Since:
      100.0.0
    • getObjectIdFieldName

      public String getObjectIdFieldName()
      Gets the name of field which contains the OBJECT ID for each feature.
      Returns:
      the object id field name
      Since:
      100.0.0
    • isAllowGeometryUpdates

      public boolean isAllowGeometryUpdates()
      Returns true if the service supports editing the geometry, false otherwise.
      Returns:
      true if the service allows geometry updates
      Since:
      100.0.0
    • getField

      public Field getField(String fieldNameOrAlias)
      Finds the field with the given name.
      Parameters:
      fieldNameOrAlias - field name or alias
      Returns:
      the field with the given name
      Throws:
      IllegalArgumentException - if fieldNameOrAlias is null or empty
      Since:
      100.0.0
    • getFields

      public List<Field> getFields()
      Gets all the attribute fields of the features in the layer as an unmodifiable list.
      Returns:
      the fields as an unmodifiable list
      Since:
      100.0.0
    • getUrl

      public String getUrl()
      Gets the feature layer URL.
      Returns:
      the feature layer URL
      Since:
      100.0.0
    • isSupportsQueryExtent

      public boolean isSupportsQueryExtent()
      Gets whether the layer supports a query that only returns the extent for the queried features.

      This determines whether the FeatureTable.queryExtentAsync(QueryParameters) method can be used or not.

      Returns:
      true if the layer supports a query that only returns the extent for the queried features, otherwise false
      Since:
      100.2.0
    • isSupportsPagination

      public boolean isSupportsPagination()
      Gets whether the layer supports pagination of query results (with a max features count and result offset).
      Returns:
      true if the layer supports pagination of query results, otherwise false
      Since:
      100.2.1
    • isSupportsObacForAnonymousUsers

      public boolean isSupportsObacForAnonymousUsers()
      Gets whether the layer supports Ownership Based Access Control (OBAC) for anonymous users.
      Returns:
      true if the layer supports OBAC for anonymous users, otherwise false
      Since:
      100.3.0
    • getFeatureSubtypes

      public List<FeatureSubtype> getFeatureSubtypes()
      Gets an unmodifiable list of FeatureSubtype for this layer.
      Returns:
      an unmodifiable list of FeatureSubtype for this layer
      Since:
      100.3.0
      See Also:
    • getSubtypeField

      public String getSubtypeField()
      Gets the name of this layer's subtype field.
      Returns:
      the name of this layer's subtype field or an empty string if the feature subtype is not defined
      Since:
      100.3.0
    • getDefaultSubtypeCode

      public Object getDefaultSubtypeCode()
      Gets the layer's default subtype code.

      Subtypes are implemented by coded values, which are integers. Those integer values each represent a feature in the subtype. For example, the following codes in a subtype named RoadClass could represent valid classes in a feature class for streets:

      • 0 - Local Streets
      • 1 - Secondary Streets
      • 2 - Main Streets
      If the Main Streets feature subtype is defined as the default, the Integer 2 will be returned as the default code.
      Returns:
      the layer's default subtype code or null if no default subtype feature is defined
      Since:
      100.3.0