Class TLcdWFSFeatureType
- All Implemented Interfaces:
ILcdWFSFeatureType
,ILcdBounded
ILcdWFSFeatureType
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns an abstract of this feature type (may benull
).Returns theILcdBounds
by which the geometry of thisILcdBounded
object is bounded.Returns the expiry date of this feature type.Returns the feature ID retriever for this feature type.getKeyword
(int aIndex) Returns the keyword at the given index.int
Returns the number of keywords associated with the feature type.getMetadataURL
(int aIndex) Returns the metadata URL at the specified index.int
Returns the number of metadata URLs associated with this feature type.Returns the modification date of this feature type.getName()
Returns the name of this feature type.getQName()
Returns the qualified name of this feature type.Returns the source name of this feature type.getSRS()
Returns the SRS (Spatial Reference System) used by this feature type.Returns the supported output formats for this feature type.getTitle()
Returns the title of this feature type (may benull
).Returns the update sequence value associated with this capabilities object.boolean
Returns whether this feature type supports locking.boolean
Returns whether this feature type supports transactions.void
setAbstract
(String aAbstract) Sets the abstract of this feature type.void
setBounds
(ILcdBounds aBounds) Initializes the bounds of the WFS feature type.void
setExpiryDate
(long aDate) Sets an expiry date for this feature type.void
setFeatureIDRetriever
(ILcdOGCFeatureIDRetriever aFeatureIDRetriever) Sets the feature ID retriever to be used for this feature type.void
setKeywords
(String[] aKeywords) Sets the keywords associated with this feature type.void
setLockingEnabled
(boolean aLockingEnabled) Enables or disables locking for this type.void
setMetadataURLs
(TLcdWFSMetadataURL[] aMetadataURLs) Sets the metadata URLs associated with this feature type.void
setModificationDate
(Long aDate) Sets a modification date for this feature type.void
Sets the name of this feature type.void
Sets the qualified name of this feature type.void
Sets the source path of this feature type.void
Sets the SRS (Spatial Reference System) to be used by this feature type.void
setSupportedOutputFormats
(TLcdWFSOutputFormatList aSupportedOutputFormatList) Sets the supported output formats for this feature type.void
Sets the title of this feature type.void
setTransactionEnabled
(boolean aTransactionEnabled) Enables or disables transactions for this type.void
setUpdateSequence
(String aUpdateSequence) Sets the update sequence of this WFS feature type.
-
Constructor Details
-
TLcdWFSFeatureType
public TLcdWFSFeatureType()
-
-
Method Details
-
getName
Description copied from interface:ILcdWFSFeatureType
Returns the name of this feature type.The returned name corresponds to the local part of the qualified name of this feature type. To retrieve the qualified name,
ILcdWFSFeatureType.getQName()
should be used.- Specified by:
getName
in interfaceILcdWFSFeatureType
- Returns:
- the name of this feature type.
- See Also:
-
getQName
Description copied from interface:ILcdWFSFeatureType
Returns the qualified name of this feature type.
Note that this property can be used for caching purposes, together with the ILcdWFSFeatureType.getUpdateSequence().
- Specified by:
getQName
in interfaceILcdWFSFeatureType
- Returns:
- the qualified name of this feature type.
-
getSRS
Description copied from interface:ILcdWFSFeatureType
Returns the SRS (Spatial Reference System) used by this feature type. This SRS name should match theILcdModelReference
of theILcdModel
returned by theILcdOGCModelProvider
that corresponds to this feature type.- Specified by:
getSRS
in interfaceILcdWFSFeatureType
- Returns:
- the SRS (Spatial Reference System) used by this feature type.
- See Also:
-
setName
Sets the name of this feature type.This name corresponds to the local part of the qualified name of this feature type. To set a qualified name,
setQName(QName)
should be used.- Parameters:
aName
- The name of this feature type.- See Also:
-
setQName
Sets the qualified name of this feature type.- Parameters:
aName
- The fully qualified name of this feature type.
-
getTitle
Description copied from interface:ILcdWFSFeatureType
Returns the title of this feature type (may benull
).- Specified by:
getTitle
in interfaceILcdWFSFeatureType
- Returns:
- the title of this feature type (may be
null
).
-
setTitle
Sets the title of this feature type.- Parameters:
aTitle
- the title of this feature type.
-
getAbstract
Description copied from interface:ILcdWFSFeatureType
Returns an abstract of this feature type (may benull
).- Specified by:
getAbstract
in interfaceILcdWFSFeatureType
- Returns:
- an abstract of this feature type (may be
null
).
-
setAbstract
Sets the abstract of this feature type.- Parameters:
aAbstract
- the abstract of this feature type.
-
setSource
Sets the source path of this feature type.- Parameters:
aSource
- The source path of this feature type.
-
getSource
Description copied from interface:ILcdWFSFeatureType
Returns the source name of this feature type. This source name can be used to retrieve anILcdModel
that corresponds to this feature type from anILcdOGCModelProvider
.- Specified by:
getSource
in interfaceILcdWFSFeatureType
- Returns:
- the source name of this feature type.
- See Also:
-
setSRS
Description copied from interface:ILcdWFSFeatureType
Sets the SRS (Spatial Reference System) to be used by this feature type. This SRS name should match theILcdModelReference
of theILcdModel
returned by theILcdOGCModelProvider
that corresponds to this feature type.- Specified by:
setSRS
in interfaceILcdWFSFeatureType
- Parameters:
aSRS
- the SRS (Spatial Reference System) to be used by this feature type.- See Also:
-
getBounds
Description copied from interface:ILcdBounded
Returns theILcdBounds
by which the geometry of thisILcdBounded
object is bounded.If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points) the return value is unspecified. It is highly recommended to return an
undefined
bounds. You can create undefined bounds using the default constructors ofTLcdLonLatBounds
orTLcdXYBounds
.- Specified by:
getBounds
in interfaceILcdBounded
- Returns:
- the
ILcdBounds
by which the geometry of thisILcdBounded
object is bounded. - Since:
- 2017.0
-
setBounds
Initializes the bounds of the WFS feature type.- Since:
- 2017.0
-
getFeatureIDRetriever
Description copied from interface:ILcdWFSFeatureType
Returns the feature ID retriever for this feature type.- Specified by:
getFeatureIDRetriever
in interfaceILcdWFSFeatureType
- Returns:
- the feature ID retriever for this feature type.
-
setFeatureIDRetriever
Sets the feature ID retriever to be used for this feature type.- Parameters:
aFeatureIDRetriever
- AnILcdOGCFeatureIDRetriever
.
-
getKeywordCount
public int getKeywordCount()Description copied from interface:ILcdWFSFeatureType
Returns the number of keywords associated with the feature type.- Specified by:
getKeywordCount
in interfaceILcdWFSFeatureType
- Returns:
- the number of keywords associated with the feature type.
-
getKeyword
Description copied from interface:ILcdWFSFeatureType
Returns the keyword at the given index.- Specified by:
getKeyword
in interfaceILcdWFSFeatureType
- Parameters:
aIndex
- the index of the keyword to be retrieved- Returns:
- the keyword at the given index.
- Throws:
IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >= getKeywordCount()).
-
setKeywords
Sets the keywords associated with this feature type.- Parameters:
aKeywords
- an array of keywords
-
getMetadataURLCount
public int getMetadataURLCount()Description copied from interface:ILcdWFSFeatureType
Returns the number of metadata URLs associated with this feature type. Metadata URLs are published in the capabilities document of the WFS.- Specified by:
getMetadataURLCount
in interfaceILcdWFSFeatureType
- Returns:
- the number of metadata URLs associated with this feature type.
-
getMetadataURL
Description copied from interface:ILcdWFSFeatureType
Returns the metadata URL at the specified index.- Specified by:
getMetadataURL
in interfaceILcdWFSFeatureType
- Parameters:
aIndex
- the index of the URL to be returned- Returns:
- a TLcdWFSMetadataURL
- Throws:
IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >= getMetadataURLCount()).
-
setMetadataURLs
Sets the metadata URLs associated with this feature type.- Parameters:
aMetadataURLs
- an array of TLcdWFSMetadataURLs
-
isLockingEnabled
public boolean isLockingEnabled()Description copied from interface:ILcdWFSFeatureType
Returns whether this feature type supports locking.- Specified by:
isLockingEnabled
in interfaceILcdWFSFeatureType
- Returns:
- True if the features of this type can be locked, false otherwise.
-
setLockingEnabled
public void setLockingEnabled(boolean aLockingEnabled) Enables or disables locking for this type.- Parameters:
aLockingEnabled
- enables locking when true
-
isTransactionEnabled
public boolean isTransactionEnabled()Description copied from interface:ILcdWFSFeatureType
Returns whether this feature type supports transactions.- Specified by:
isTransactionEnabled
in interfaceILcdWFSFeatureType
- Returns:
- True if transactions are supported, false otherwise.
-
setTransactionEnabled
public void setTransactionEnabled(boolean aTransactionEnabled) Enables or disables transactions for this type.- Parameters:
aTransactionEnabled
- enables transactions when true.
-
setExpiryDate
public void setExpiryDate(long aDate) Sets an expiry date for this feature type. The date is expressed by the number of milliseconds since January 1, 1970, 00:00:00 GMT. When set, the date is used to fill in theExpires
HTTP header onGetFeature
andGetFeatureWithLock
responses.- Parameters:
aDate
- an expiry date for this feature type- See Also:
-
getExpiryDate
Returns the expiry date of this feature type. By default,null
is returned.- Returns:
- the expiry date associated of this feature type
- See Also:
-
setModificationDate
Sets a modification date for this feature type. The date is expressed by the number of milliseconds since January 1, 1970, 00:00:00 GMT. When set, the date is used to fill in theLast-Modified
HTTP header onGetFeature
andGetFeatureWithLock
responses.- Parameters:
aDate
- a modification date for this feature type- See Also:
-
getModificationDate
Returns the modification date of this feature type. By default,null
is returned.- Returns:
- the modification date associated with this feature type.
- See Also:
-
setSupportedOutputFormats
Sets the supported output formats for this feature type.- Parameters:
aSupportedOutputFormatList
- the supported output formats for this feature type.- Since:
- 2015.0
-
getSupportedOutputFormats
Returns the supported output formats for this feature type. By default,null
is returned, indicating that the global list of supported output formats defined byILcdWFSClientModelEncoderFactory.getSupportedOutputFormat(int, com.luciad.ogc.wfs.TLcdWFSRequestContext)
is used.- Specified by:
getSupportedOutputFormats
in interfaceILcdWFSFeatureType
- Returns:
- the supported output formats for this feature type.
- Since:
- 2015.0
-
getUpdateSequence
Description copied from interface:ILcdWFSFeatureType
Returns the update sequence value associated with this capabilities object. This update sequence identifies the state of the feature type, together with the
qName
.Note that this update sequence is not defined in the WFS specification. It is only used internally in the WFS server implementation to detect feature type changes (and clear caches if needed). So the update sequence will not be visible to a WFS client. The WFS specification does define an update sequence that is visible to clients as well, see
ALcdWFSCapabilities.setUpdateSequence
. WFS clients should use that update sequence to detect changes on the server.The update sequence should comply with a number of conditions:
- The sequence number should be different from all previous update sequences for this WFS feature type (if the WFS feature type has changed).
- If the WFS feature type is different, the sequence number should be different as well. Failing to do so will cause malfunctions in combination with caching.
- If the WFS feature type doesn't change, the sequence number should also remain the same. Failing to do so lowers the effect of caching, and will result in worse performance.
- The sequence number should be unique across sessions. Failing to do so may cause malfunctions in combination with caching. An easy mistake to make would for example be to use a counter that is reset when the server is restarted.
By default, this method always returns
"0"
. This means that the default implementation assumes that WFS feature types never change. If WFS feature types change, the update sequence should be modified.One way to generate update sequences would be to use a (persistent) counter that gets incremented on every change. Another way would be to use
System.currentTimeMillis()
from a correct clock. It is also an option to return aString
that is concatenated with update sequences from a number of underlying concepts, such as the source, qName, data, ...Note that it is not needed to take into account the update sequence of the data (see
ILcdOGCModelProvider.getModelUpdateSequence(java.lang.String, com.luciad.ogc.common.ALcdRequestContext)
) when implementing this method. Instead, any code that makes use of the feature type update sequence returned by this method should also take into account the update sequence of the model. An example are caches. A cache entry should be invalidated if the feature type update sequence changes, or if the model update sequence changes.- Specified by:
getUpdateSequence
in interfaceILcdWFSFeatureType
- Returns:
- the update sequence value associated with this capabilities object, never
null
.
-
setUpdateSequence
Sets the update sequence of this WFS feature type. SeegetUpdateSequence()
for more information.- Parameters:
aUpdateSequence
- the new update sequence.- Since:
- 2017.0
-