Class TLcdWFSFeatureType

java.lang.Object
com.luciad.ogc.wfs.TLcdWFSFeatureType
All Implemented Interfaces:
ILcdWFSFeatureType, ILcdBounded

public class TLcdWFSFeatureType extends Object implements ILcdWFSFeatureType, ILcdBounded
An implementation of ILcdWFSFeatureType.
  • Constructor Details

    • TLcdWFSFeatureType

      public TLcdWFSFeatureType()
  • Method Details

    • getName

      public String 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 interface ILcdWFSFeatureType
      Returns:
      the name of this feature type.
      See Also:
    • getQName

      public QName 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 interface ILcdWFSFeatureType
      Returns:
      the qualified name of this feature type.
    • getSRS

      public String getSRS()
      Description copied from interface: ILcdWFSFeatureType
      Returns the SRS (Spatial Reference System) used by this feature type. This SRS name should match the ILcdModelReference of the ILcdModel returned by the ILcdOGCModelProvider that corresponds to this feature type.
      Specified by:
      getSRS in interface ILcdWFSFeatureType
      Returns:
      the SRS (Spatial Reference System) used by this feature type.
      See Also:
    • setName

      public void setName(String aName)
      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

      public void setQName(QName aName)
      Sets the qualified name of this feature type.
      Parameters:
      aName - The fully qualified name of this feature type.
    • getTitle

      public String getTitle()
      Description copied from interface: ILcdWFSFeatureType
      Returns the title of this feature type (may be null).
      Specified by:
      getTitle in interface ILcdWFSFeatureType
      Returns:
      the title of this feature type (may be null).
    • setTitle

      public void setTitle(String aTitle)
      Sets the title of this feature type.
      Parameters:
      aTitle - the title of this feature type.
    • getAbstract

      public String getAbstract()
      Description copied from interface: ILcdWFSFeatureType
      Returns an abstract of this feature type (may be null).
      Specified by:
      getAbstract in interface ILcdWFSFeatureType
      Returns:
      an abstract of this feature type (may be null).
    • setAbstract

      public void setAbstract(String aAbstract)
      Sets the abstract of this feature type.
      Parameters:
      aAbstract - the abstract of this feature type.
    • setSource

      public void setSource(String aSource)
      Sets the source path of this feature type.
      Parameters:
      aSource - The source path of this feature type.
    • getSource

      public String getSource()
      Description copied from interface: ILcdWFSFeatureType
      Returns the source name of this feature type. This source name can be used to retrieve an ILcdModel that corresponds to this feature type from an ILcdOGCModelProvider.
      Specified by:
      getSource in interface ILcdWFSFeatureType
      Returns:
      the source name of this feature type.
      See Also:
    • setSRS

      public void setSRS(String aSRS)
      Description copied from interface: ILcdWFSFeatureType
      Sets the SRS (Spatial Reference System) to be used by this feature type. This SRS name should match the ILcdModelReference of the ILcdModel returned by the ILcdOGCModelProvider that corresponds to this feature type.
      Specified by:
      setSRS in interface ILcdWFSFeatureType
      Parameters:
      aSRS - the SRS (Spatial Reference System) to be used by this feature type.
      See Also:
    • getBounds

      public ILcdBounds getBounds()
      Description copied from interface: ILcdBounded
      Returns the ILcdBounds by which the geometry of this ILcdBounded 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 of TLcdLonLatBounds or TLcdXYBounds.

      Specified by:
      getBounds in interface ILcdBounded
      Returns:
      the ILcdBounds by which the geometry of this ILcdBounded object is bounded.
      Since:
      2017.0
    • setBounds

      public void setBounds(ILcdBounds aBounds)
      Initializes the bounds of the WFS feature type.
      Since:
      2017.0
    • getFeatureIDRetriever

      public ILcdOGCFeatureIDRetriever getFeatureIDRetriever()
      Description copied from interface: ILcdWFSFeatureType
      Returns the feature ID retriever for this feature type.
      Specified by:
      getFeatureIDRetriever in interface ILcdWFSFeatureType
      Returns:
      the feature ID retriever for this feature type.
    • setFeatureIDRetriever

      public void setFeatureIDRetriever(ILcdOGCFeatureIDRetriever aFeatureIDRetriever)
      Sets the feature ID retriever to be used for this feature type.
      Parameters:
      aFeatureIDRetriever - An ILcdOGCFeatureIDRetriever.
    • getKeywordCount

      public int getKeywordCount()
      Description copied from interface: ILcdWFSFeatureType
      Returns the number of keywords associated with the feature type.
      Specified by:
      getKeywordCount in interface ILcdWFSFeatureType
      Returns:
      the number of keywords associated with the feature type.
    • getKeyword

      public String getKeyword(int aIndex) throws IndexOutOfBoundsException
      Description copied from interface: ILcdWFSFeatureType
      Returns the keyword at the given index.
      Specified by:
      getKeyword in interface ILcdWFSFeatureType
      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

      public void setKeywords(String[] aKeywords)
      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 interface ILcdWFSFeatureType
      Returns:
      the number of metadata URLs associated with this feature type.
    • getMetadataURL

      public TLcdWFSMetadataURL getMetadataURL(int aIndex) throws IndexOutOfBoundsException
      Description copied from interface: ILcdWFSFeatureType
      Returns the metadata URL at the specified index.
      Specified by:
      getMetadataURL in interface ILcdWFSFeatureType
      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

      public void setMetadataURLs(TLcdWFSMetadataURL[] aMetadataURLs)
      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 interface ILcdWFSFeatureType
      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 interface ILcdWFSFeatureType
      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 the Expires HTTP header on GetFeature and GetFeatureWithLock responses.
      Parameters:
      aDate - an expiry date for this feature type
      See Also:
    • getExpiryDate

      public Long 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

      public void setModificationDate(Long aDate)
      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 the Last-Modified HTTP header on GetFeature and GetFeatureWithLock responses.
      Parameters:
      aDate - a modification date for this feature type
      See Also:
    • getModificationDate

      public Long 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

      public void setSupportedOutputFormats(TLcdWFSOutputFormatList aSupportedOutputFormatList)
      Sets the supported output formats for this feature type.
      Parameters:
      aSupportedOutputFormatList - the supported output formats for this feature type.
      Since:
      2015.0
    • getSupportedOutputFormats

      public TLcdWFSOutputFormatList 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 by ILcdWFSClientModelEncoderFactory.getSupportedOutputFormat(int, com.luciad.ogc.wfs.TLcdWFSRequestContext) is used.
      Specified by:
      getSupportedOutputFormats in interface ILcdWFSFeatureType
      Returns:
      the supported output formats for this feature type.
      Since:
      2015.0
    • getUpdateSequence

      public String 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 a String 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 interface ILcdWFSFeatureType
      Returns:
      the update sequence value associated with this capabilities object, never null.
    • setUpdateSequence

      public void setUpdateSequence(String aUpdateSequence)
      Sets the update sequence of this WFS feature type. See getUpdateSequence() for more information.
      Parameters:
      aUpdateSequence - the new update sequence.
      Since:
      2017.0