Class ArcGISMapServiceSublayerInfo
- java.lang.Object
-
- com.esri.arcgisruntime.arcgisservices.ArcGISMapServiceSublayerInfo
-
- All Implemented Interfaces:
JsonSerializable
public final class ArcGISMapServiceSublayerInfo extends Object implements JsonSerializable
Represents the metadata for an ArcGIS Map Service sublayer, indicating a range of appearance and behaviour properties as defined by the referenced map service.Certain properties of a sublayer can be changed programmatically by calling methods on the parent ArcGISMapImageSublayer class, or the root ArcGISMapImageLayer; for example
hasDefaultVisibility()
indicates the initial, default visibility, which can then be changed at runtime usingArcGISMapImageLayer.setVisible(boolean)
orArcGISMapImageSublayer.setVisible(boolean)
, depending on the value ofLayerContent.canChangeVisibility()
.- Since:
- 100.1.0
- See Also:
ArcGISMapImageSublayer.getMapServiceSublayerInfo()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ArcGISMapServiceSublayerInfo.ServiceType
An enumeration of the different types of the ArcGIS Map Service sublayer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canModifyLayer()
Indicates whether the sublayer supports modifying its renderer and/or its data source.boolean
canScaleSymbols()
Returns whether the text and symbols on the sublayer will change as the map scale varies.static ArcGISMapServiceSublayerInfo
fromJson(String json)
Creates an ArcGISMapServiceSublayerInfo instance from a JSON string.String
getAttribution()
Gets the attribution text of the sublayer.MapServiceCapabilities
getCapabilities()
Gets the capabilities supported by the sublayer.Object
getDefaultSubtypeCode()
Gets the sublayer's default subtype code.String
getDefinitionExpression()
Gets the definition expression for the sublayer by which data in the layer is filtered.String
getDescription()
Gets the description of the sublayer.String
getDisplayFieldName()
Gets the name of the display field for the sublayer.DrawingInfo
getDrawingInfo()
Gets the drawing information for the sublayer.double
getEffectiveMaxScale()
Gets the maximum scale at which the sublayer is visible, taking into account the visible scale range of this sublayer's ancestors.double
getEffectiveMinScale()
Gets the minimum scale at which the sublayer is visible, taking into account the visible scale range of this sublayer's ancestors.Envelope
getExtent()
Gets the geographic extent that the sublayer covers.List<FeatureSubtype>
getFeatureSubtypes()
Gets an unmodifiable list of FeatureSubtype for this sublayer.List<FeatureType>
getFeatureTypes()
Gets an unmodifiable list ofFeatureType
objects representing feature subtypes in the sublayer.Field
getField(String fieldNameOrAlias)
Gets the definition of the field with a given name or alias.List<Field>
getFields()
Gets an unmodifiable list ofField
objects representing the fields in the sublayer.GeometryType
getGeometryType()
Gets the type of geometry contained by features in the sublayer.long
getMaxRecordCount()
Gets the maximum record count set on the sublayer.double
getMaxScale()
Gets the maximum scale at which the sublayer is visible.double
getMinScale()
Gets the minimum scale at which the sublayer is visible.OwnershipBasedAccessControlInfo
getOwnershipBasedAccessControl()
Gets the information about ownership-based access control governing who can edit, delete, and query features.IdInfo
getParentLayerInfo()
Gets information that identifies the sublayer's parent layer.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.long
getServiceLayerId()
Gets the service layer ID of the sublayer.String
getServiceLayerName()
Gets the service layer name of the sublayer.ArcGISMapServiceSublayerInfo.ServiceType
getServiceType()
Gets the service type of the sublayer.List<IdInfo>
getSublayerInfos()
Gets information that identifies the sublayers of this sublayer.String
getSubtypeField()
Gets the name of the sublayer's subtype field.LayerTimeInfo
getTimeInfo()
Gets the time information for the sublayer.String
getTypeIdFieldName()
Gets the name of the field containing the Type ID.Map<String,Object>
getUnknownJson()
If this object was created from JSON, this method gets unknown data from the source JSON.Map<String,Object>
getUnsupportedJson()
If this object was created from JSON, this method gets unsupported data from the source JSON.String
getUrl()
Gets the URL of the sublayer.String
getVersion()
Gets the version of the sublayer.boolean
hasAttachments()
Indicates whether the features in the sublayer can have attachments.boolean
hasDefaultVisibility()
Indicates whether the sublayer is visible by default.boolean
hasLabels()
Indicates whether the sublayer has labels defined on it.boolean
hasM()
Indicates whether the sublayer geometry contains m values.boolean
hasZ()
Indicates whether the sublayer geometry contains z values.boolean
isDataVersioned()
Indicates whether data in the sublayer is versioned.boolean
isSupportsAdvancedQueries()
Indicates whether the sublayer supports advanced query operations (such as ordering results, or returning distinct results).boolean
isSupportsStatistics()
Indicates whether the sublayer supports statistical functions in query operations.boolean
isUseStandardizedQueries()
Indicates whether the sublayer requires the use of standardized queries.String
toJson()
Serializes an ArcGISMapServiceSublayerInfo to a JSON string.
-
-
-
Method Detail
-
fromJson
public static ArcGISMapServiceSublayerInfo fromJson(String json)
Creates an ArcGISMapServiceSublayerInfo instance from a JSON string.- Parameters:
json
- a JSON string that represents an ArcGISMapServiceSublayerInfo- Returns:
- an ArcGISMapServiceSublayerInfo instance
- Throws:
IllegalArgumentException
- if json is null or empty- Since:
- 100.1.0
-
toJson
public String toJson()
Serializes an ArcGISMapServiceSublayerInfo to a JSON string.- Specified by:
toJson
in interfaceJsonSerializable
- Returns:
- a JSON string
- Since:
- 100.1.0
-
getUnknownJson
public Map<String,Object> getUnknownJson()
Description copied from interface:JsonSerializable
If this object was created from JSON, this method gets unknown data from the source JSON. Unknown JSON is a Map of values that were in the source JSON but are not known by the Runtime and therefore not exposed in the API.- Specified by:
getUnknownJson
in interfaceJsonSerializable
- Returns:
- an unmodifiable Map containing unknown JSON data. The keys are Strings containing names. The types of
the values depend on the types of tokens within the JSON as follows:
- a
Map<String, Object>
represents an object in the JSON - a
List<Object>
represents an array in the JSON - a
String
represents a string in the JSON - a
Double
represents a number in the JSON - a
Boolean
represents true or false in the JSON null
represents null in the JSON
- a
-
getUnsupportedJson
public Map<String,Object> getUnsupportedJson()
Description copied from interface:JsonSerializable
If this object was created from JSON, this method gets unsupported data from the source JSON. Unsupported JSON is a Map of values that are supported by webmaps and known to the version of the webmap specification the API supports (see system requirements), but are not explicitly exposed through the Runtime API.- Specified by:
getUnsupportedJson
in interfaceJsonSerializable
- Returns:
- an unmodifiable Map containing unsupported JSON data. The keys are Strings containing names. The types of
the values depend on the types of tokens within the JSON as follows:
- a
Map<String, Object>
represents an object in the JSON - a
List<Object>
represents an array in the JSON - a
String
represents a string in the JSON - a
Double
represents a number in the JSON - a
Boolean
represents true or false in the JSON null
represents null in the JSON
- a
-
getAttribution
public String getAttribution()
Gets the attribution text of the sublayer.- Returns:
- the attribution text
- Since:
- 100.1.0
-
getCapabilities
public MapServiceCapabilities getCapabilities()
Gets the capabilities supported by the sublayer.- Returns:
- the capabilities
- Since:
- 100.1.0
-
getDefinitionExpression
public String getDefinitionExpression()
Gets the definition expression for the sublayer by which data in the layer is filtered.The definition expression string uses the SQL-92
where
clause syntax. Be sure to escape special characters in the expression string as required for your platform. The DATE keyword expects the date format yyyy-mm-dd and the TIMESTAMP keyword expects the time stamp format yyyy-mm-dd hh:mm:ss. See the ArcGIS Blog article entitled "Querying Feature Services Date-Time Queries" for more information.- Returns:
- the definition expression
- Since:
- 100.1.0
-
getDescription
public String getDescription()
Gets the description of the sublayer.- Returns:
- the description
- Since:
- 100.1.0
-
getDisplayFieldName
public String getDisplayFieldName()
Gets the name of the display field for the sublayer.- Returns:
- the display field name
- Since:
- 100.1.0
-
getDrawingInfo
public DrawingInfo getDrawingInfo()
Gets the drawing information for the sublayer.- Returns:
- the drawing information
- Since:
- 100.1.0
-
getEffectiveMaxScale
public double getEffectiveMaxScale()
Gets the maximum scale at which the sublayer is visible, taking into account the visible scale range of this sublayer's ancestors. If the map is zoomed in beyond this scale (theMapView.getMapScale()
is smaller than this number), the sublayer will not be visible.- Returns:
- the effective maximum scale, or Double.NaN if this is not specified
- Since:
- 100.1.0
-
getEffectiveMinScale
public double getEffectiveMinScale()
Gets the minimum scale at which the sublayer is visible, taking into account the visible scale range of this sublayer's ancestors. If the map is zoomed out beyond this scale (theMapView.getMapScale()
is larger than this number) this sublayer will not be visible.- Returns:
- the effective minimum scale, or Double.NaN if this is not specified
- Since:
- 100.1.0
-
getExtent
public Envelope getExtent()
Gets the geographic extent that the sublayer covers.- Returns:
- the extent
- Since:
- 100.1.0
-
getFeatureTypes
public List<FeatureType> getFeatureTypes()
Gets an unmodifiable list ofFeatureType
objects representing feature subtypes in the sublayer. For example, a roads layer may contain 2 feature subtypes: highways and streets.- Returns:
- an unmodifiable list of the feature subtypes
- Since:
- 100.1.0
-
getField
public Field getField(String fieldNameOrAlias)
Gets the definition of the field with a given name or alias.- Parameters:
fieldNameOrAlias
- the field name or alias- Returns:
- the field definition
- Throws:
IllegalArgumentException
- if fieldNameOrAlias is null or empty- Since:
- 100.1.0
-
getFields
public List<Field> getFields()
Gets an unmodifiable list ofField
objects representing the fields in the sublayer.- Returns:
- an unmodifiable list of the fields
- Since:
- 100.1.0
-
getGeometryType
public GeometryType getGeometryType()
Gets the type of geometry contained by features in the sublayer.- Returns:
- the geometry type
- Since:
- 100.1.0
-
getMaxRecordCount
public long getMaxRecordCount()
Gets the maximum record count set on the sublayer. This represents the maximum number of records that can be returned from a query.- Returns:
- the maximum record count, or -1 if this is not specified
- Since:
- 100.1.0
-
getMaxScale
public double getMaxScale()
Gets the maximum scale at which the sublayer is visible. If the map is zoomed in beyond this scale, the sublayer will not be visible.- Returns:
- the maximum scale
- Since:
- 100.1.0
- See Also:
getEffectiveMaxScale()
,LayerContent.isVisibleAtScale(double)
-
getMinScale
public double getMinScale()
Gets the minimum scale at which the sublayer is visible. If the map is zoomed out beyond this scale, the sublayer will not be visible.- Returns:
- the minimum scale
- Since:
- 100.1.0
- See Also:
getEffectiveMinScale()
,LayerContent.isVisibleAtScale(double)
-
getOwnershipBasedAccessControl
public OwnershipBasedAccessControlInfo getOwnershipBasedAccessControl()
Gets the information about ownership-based access control governing who can edit, delete, and query features.- Returns:
- the ownership based access control information, or null if not enabled on the service
- Since:
- 100.1.0
-
getParentLayerInfo
public IdInfo getParentLayerInfo()
Gets information that identifies the sublayer's parent layer.- Returns:
- an IdInfo that identifies the parent layer, or null if there is no parent layer
- Since:
- 100.1.0
-
getServiceLayerId
public long getServiceLayerId()
Gets the service layer ID of the sublayer.- Returns:
- the service layer ID
- Since:
- 100.1.0
-
getServiceLayerName
public String getServiceLayerName()
Gets the service layer name of the sublayer.- Returns:
- the service layer name
- Since:
- 100.1.0
-
getServiceType
public ArcGISMapServiceSublayerInfo.ServiceType getServiceType()
Gets the service type of the sublayer.- Returns:
- the service type
- Since:
- 100.1.0
- See Also:
ArcGISMapServiceSublayerInfo.ServiceType
-
getSublayerInfos
public List<IdInfo> getSublayerInfos()
Gets information that identifies the sublayers of this sublayer.- Returns:
- an unmodifiable list of IdInfo objects for the sublayers of this sublayer
- Since:
- 100.1.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
-
getTimeInfo
public LayerTimeInfo getTimeInfo()
Gets the time information for the sublayer. Only applicable if the sublayer is time aware.- Returns:
- the time information, or null if the sublayer is not time aware
- Since:
- 100.1.0
-
getTypeIdFieldName
public String getTypeIdFieldName()
Gets the name of the field containing the Type ID.- Returns:
- the type ID field name
- Since:
- 100.1.0
-
getUrl
public String getUrl()
Gets the URL of the sublayer.- Returns:
- the URL
- Since:
- 100.1.0
-
getVersion
public String getVersion()
Gets the version of the sublayer.- Returns:
- the version
- Since:
- 100.1.0
- See Also:
isDataVersioned()
-
canModifyLayer
public boolean canModifyLayer()
Indicates whether the sublayer supports modifying its renderer and/or its data source.- Returns:
- true if the sublayer can be modified, false otherwise
- Since:
- 100.1.0
- See Also:
ArcGISMapImageSublayer.getRenderer()
-
canScaleSymbols
public boolean canScaleSymbols()
Returns whether the text and symbols on the sublayer will change as the map scale varies.- Returns:
- true if the text and symbols will change as the map scale varies, false otherwise
- Since:
- 100.1.0
-
hasAttachments
public boolean hasAttachments()
Indicates whether the features in the sublayer can have attachments.- Returns:
- true if the features can have attachments, false otherwise
- Since:
- 100.1.0
- See Also:
ArcGISFeature.fetchAttachmentsAsync()
-
hasDefaultVisibility
public boolean hasDefaultVisibility()
Indicates whether the sublayer is visible by default.- Returns:
- true if the sublayer is visible by default, false otherwise
- Since:
- 100.1.0
- See Also:
LayerContent.canChangeVisibility()
,ArcGISMapImageLayer.setVisible(boolean)
,ArcGISMapImageSublayer.setVisible (boolean)
-
hasLabels
public boolean hasLabels()
Indicates whether the sublayer has labels defined on it.- Returns:
- true if the sublayer has labels, false otherwise
- Since:
- 100.1.0
-
hasM
public boolean hasM()
Indicates whether the sublayer geometry contains m values.- Returns:
- true if the geometry contains m values, false otherwise
- Since:
- 100.1.0
- See Also:
Geometry.hasM()
-
hasZ
public boolean hasZ()
Indicates whether the sublayer geometry contains z values.- Returns:
- true if the geometry contains z values, false otherwise
- Since:
- 100.1.0
- See Also:
Geometry.hasZ()
-
isDataVersioned
public boolean isDataVersioned()
Indicates whether data in the sublayer is versioned.- Returns:
- true if the data is versioned, false otherwise
- Since:
- 100.1.0
- See Also:
getVersion()
-
isSupportsAdvancedQueries
public boolean isSupportsAdvancedQueries()
Indicates whether the sublayer supports advanced query operations (such as ordering results, or returning distinct results).- Returns:
- true if the sublayer supports advanced queries, false otherwise
- Since:
- 100.1.0
-
isSupportsStatistics
public boolean isSupportsStatistics()
Indicates whether the sublayer supports statistical functions in query operations.- Returns:
- true if the sublayer supports statistics, false otherwise
- Since:
- 100.1.0
-
isUseStandardizedQueries
public boolean isUseStandardizedQueries()
Indicates whether the sublayer requires the use of standardized queries.- Returns:
- true if standardized queries are required, false otherwise
- Since:
- 100.1.0
-
getSubtypeField
public String getSubtypeField()
Gets the name of the sublayer's subtype field.- Returns:
- the name of the sublayer's subtype field or an empty string if the feature subtype is not defined
- Since:
- 100.3.0
-
getDefaultSubtypeCode
public Object getDefaultSubtypeCode()
Gets the sublayer'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
- Returns:
- the sublayer's default subtype code or null if no default subtype feature is defined
- Since:
- 100.3.0
-
getFeatureSubtypes
public List<FeatureSubtype> getFeatureSubtypes()
Gets an unmodifiable list of FeatureSubtype for this sublayer.- Returns:
- an unmodifiable list of FeatureSubtype for this sublayer
- Since:
- 100.3.0
-
-