Interface ILcdWFSFeatureType

All Known Implementing Classes:
TLcdWFSFeatureType

public interface ILcdWFSFeatureType

Interface for classes that represent a WFS feature type.

Note that the qName and update sequence of this feature type can be used for caching purposes. These two properties should completely identify the state of a feature type.

  • Method Details

    • getName

      String getName()
      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, getQName() should be used.

      Returns:
      the name of this feature type.
      See Also:
    • getQName

      QName getQName()

      Returns the qualified name of this feature type.

      Note that this property can be used for caching purposes, together with the getUpdateSequence().

      Returns:
      the qualified name of this feature type.
    • getTitle

      String getTitle()
      Returns the title of this feature type (may be null).
      Returns:
      the title of this feature type (may be null).
    • getAbstract

      String getAbstract()
      Returns an abstract of this feature type (may be null).
      Returns:
      an abstract of this feature type (may be null).
    • getSource

      String getSource()
      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.
      Returns:
      the source name of this feature type.
      See Also:
    • getSRS

      String getSRS()
      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.
      Returns:
      the SRS (Spatial Reference System) used by this feature type.
      See Also:
    • getFeatureIDRetriever

      ILcdOGCFeatureIDRetriever getFeatureIDRetriever()
      Returns the feature ID retriever for this feature type.
      Returns:
      the feature ID retriever for this feature type.
    • setSRS

      void setSRS(String aSRS)
      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.
      Parameters:
      aSRS - the SRS (Spatial Reference System) to be used by this feature type.
      See Also:
    • getKeywordCount

      int getKeywordCount()
      Returns the number of keywords associated with the feature type.
      Returns:
      the number of keywords associated with the feature type.
    • getKeyword

      String getKeyword(int aIndex) throws IndexOutOfBoundsException
      Returns the keyword at the given index.
      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()).
    • getMetadataURLCount

      int getMetadataURLCount()
      Returns the number of metadata URLs associated with this feature type. Metadata URLs are published in the capabilities document of the WFS.
      Returns:
      the number of metadata URLs associated with this feature type.
    • getMetadataURL

      TLcdWFSMetadataURL getMetadataURL(int aIndex) throws IndexOutOfBoundsException
      Returns the metadata URL at the specified index.
      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()).
    • isTransactionEnabled

      boolean isTransactionEnabled()
      Returns whether this feature type supports transactions.
      Returns:
      True if transactions are supported, false otherwise.
      Since:
      10.0
    • isLockingEnabled

      boolean isLockingEnabled()
      Returns whether this feature type supports locking.
      Returns:
      True if the features of this type can be locked, false otherwise.
      Since:
      10.0
    • getSupportedOutputFormats

      TLcdWFSOutputFormatList getSupportedOutputFormats()
      Returns the supported output formats for this feature type. If null is returned, the global list of supported output formats defined by ILcdWFSClientModelEncoderFactory.getSupportedOutputFormat(int, com.luciad.ogc.wfs.TLcdWFSRequestContext) is used.
      Returns:
      the supported output formats for this feature type or null if the global list applies.
      Since:
      2015.0
    • getUpdateSequence

      default String getUpdateSequence()

      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.

      Returns:
      the update sequence value associated with this capabilities object, never null.
      Since:
      2017.0