Class TLcdWFSFeatureType
- All Implemented Interfaces:
ILcdWFSFeatureType,ILcdBounded
ILcdWFSFeatureType.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an abstract of this feature type (may benull).Returns theILcdBoundsby which the geometry of thisILcdBoundedobject 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.intReturns the number of keywords associated with the feature type.getMetadataURL(int aIndex) Returns the metadata URL at the specified index.intReturns 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.booleanReturns whether this feature type supports locking.booleanReturns whether this feature type supports transactions.voidsetAbstract(String aAbstract) Sets the abstract of this feature type.voidsetBounds(ILcdBounds aBounds) Initializes the bounds of the WFS feature type.voidsetExpiryDate(long aDate) Sets an expiry date for this feature type.voidsetFeatureIDRetriever(ILcdOGCFeatureIDRetriever aFeatureIDRetriever) Sets the feature ID retriever to be used for this feature type.voidsetKeywords(String[] aKeywords) Sets the keywords associated with this feature type.voidsetLockingEnabled(boolean aLockingEnabled) Enables or disables locking for this type.voidsetMetadataURLs(TLcdWFSMetadataURL[] aMetadataURLs) Sets the metadata URLs associated with this feature type.voidsetModificationDate(Long aDate) Sets a modification date for this feature type.voidSets the name of this feature type.voidSets the qualified name of this feature type.voidSets the source path of this feature type.voidSets the SRS (Spatial Reference System) to be used by this feature type.voidsetSupportedOutputFormats(TLcdWFSOutputFormatList aSupportedOutputFormatList) Sets the supported output formats for this feature type.voidSets the title of this feature type.voidsetTransactionEnabled(boolean aTransactionEnabled) Enables or disables transactions for this type.voidsetUpdateSequence(String aUpdateSequence) Sets the update sequence of this WFS feature type.
-
Constructor Details
-
TLcdWFSFeatureType
public TLcdWFSFeatureType()
-
-
Method Details
-
getName
Description copied from interface:ILcdWFSFeatureTypeReturns 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:
getNamein interfaceILcdWFSFeatureType- Returns:
- the name of this feature type.
- See Also:
-
getQName
Description copied from interface:ILcdWFSFeatureTypeReturns the qualified name of this feature type.
Note that this property can be used for caching purposes, together with the ILcdWFSFeatureType.getUpdateSequence().
- Specified by:
getQNamein interfaceILcdWFSFeatureType- Returns:
- the qualified name of this feature type.
-
getSRS
Description copied from interface:ILcdWFSFeatureTypeReturns the SRS (Spatial Reference System) used by this feature type. This SRS name should match theILcdModelReferenceof theILcdModelreturned by theILcdOGCModelProviderthat corresponds to this feature type.- Specified by:
getSRSin 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:ILcdWFSFeatureTypeReturns the title of this feature type (may benull).- Specified by:
getTitlein 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:ILcdWFSFeatureTypeReturns an abstract of this feature type (may benull).- Specified by:
getAbstractin 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:ILcdWFSFeatureTypeReturns the source name of this feature type. This source name can be used to retrieve anILcdModelthat corresponds to this feature type from anILcdOGCModelProvider.- Specified by:
getSourcein interfaceILcdWFSFeatureType- Returns:
- the source name of this feature type.
- See Also:
-
setSRS
Description copied from interface:ILcdWFSFeatureTypeSets the SRS (Spatial Reference System) to be used by this feature type. This SRS name should match theILcdModelReferenceof theILcdModelreturned by theILcdOGCModelProviderthat corresponds to this feature type.- Specified by:
setSRSin interfaceILcdWFSFeatureType- Parameters:
aSRS- the SRS (Spatial Reference System) to be used by this feature type.- See Also:
-
getBounds
Description copied from interface:ILcdBoundedReturns theILcdBoundsby which the geometry of thisILcdBoundedobject 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
undefinedbounds. You can create undefined bounds using the default constructors ofTLcdLonLatBoundsorTLcdXYBounds.- Specified by:
getBoundsin interfaceILcdBounded- Returns:
- the
ILcdBoundsby which the geometry of thisILcdBoundedobject is bounded. - Since:
- 2017.0
-
setBounds
Initializes the bounds of the WFS feature type.- Since:
- 2017.0
-
getFeatureIDRetriever
Description copied from interface:ILcdWFSFeatureTypeReturns the feature ID retriever for this feature type.- Specified by:
getFeatureIDRetrieverin 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:ILcdWFSFeatureTypeReturns the number of keywords associated with the feature type.- Specified by:
getKeywordCountin interfaceILcdWFSFeatureType- Returns:
- the number of keywords associated with the feature type.
-
getKeyword
Description copied from interface:ILcdWFSFeatureTypeReturns the keyword at the given index.- Specified by:
getKeywordin 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:ILcdWFSFeatureTypeReturns the number of metadata URLs associated with this feature type. Metadata URLs are published in the capabilities document of the WFS.- Specified by:
getMetadataURLCountin interfaceILcdWFSFeatureType- Returns:
- the number of metadata URLs associated with this feature type.
-
getMetadataURL
Description copied from interface:ILcdWFSFeatureTypeReturns the metadata URL at the specified index.- Specified by:
getMetadataURLin 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:ILcdWFSFeatureTypeReturns whether this feature type supports locking.- Specified by:
isLockingEnabledin 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:ILcdWFSFeatureTypeReturns whether this feature type supports transactions.- Specified by:
isTransactionEnabledin 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 theExpiresHTTP header onGetFeatureandGetFeatureWithLockresponses.- Parameters:
aDate- an expiry date for this feature type- See Also:
-
getExpiryDate
Returns the expiry date of this feature type. By default,nullis 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-ModifiedHTTP header onGetFeatureandGetFeatureWithLockresponses.- Parameters:
aDate- a modification date for this feature type- See Also:
-
getModificationDate
Returns the modification date of this feature type. By default,nullis 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,nullis returned, indicating that the global list of supported output formats defined byILcdWFSClientModelEncoderFactory.getSupportedOutputFormat(int, com.luciad.ogc.wfs.TLcdWFSRequestContext)is used.- Specified by:
getSupportedOutputFormatsin interfaceILcdWFSFeatureType- Returns:
- the supported output formats for this feature type.
- Since:
- 2015.0
-
getUpdateSequence
Description copied from interface:ILcdWFSFeatureTypeReturns 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 aStringthat 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:
getUpdateSequencein 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
-