Class ResourceIdImpl

  • All Implemented Interfaces:
    FeatureId, Identifier, ResourceId

    public class ResourceIdImpl
    extends FeatureIdVersionedImpl
    implements ResourceId
    Implementation of ResourceId used for Query.

    This class is mutable under one condition only; during a commit a datastore can update the internal fid to reflect the real identify assigned by the database or wfs.

    Since:
    8.0
    Author:
    Justin Deoliveira, The Open Planning Project
    • Constructor Detail

      • ResourceIdImpl

        public ResourceIdImpl​(String fid,
                              String featureVersion,
                              Version version)
        Obtain a ResourceId based on version lookup.
        Parameters:
        fid - feature being queried
        featureVersion - version used as a reference point
        version - scope of version based query (first, last, index, all, date, etc...)
      • ResourceIdImpl

        public ResourceIdImpl​(String fid,
                              String featureVersion)
        Obtain a ResourceId that represents an explicit request for feature id and feature version (essentially the quivalent of FeatureId)
      • ResourceIdImpl

        public ResourceIdImpl​(String fid,
                              Date start,
                              Date end)
        Date range constructor for a feature id; none or one of start and end can be null, making for an unconstrained date range at either of the ends.
        Parameters:
        fid - feature id, non null;
        start - lower end of the time range, inclusive, or null only if end != null
        end - upper end of the time range, inclusive, or null only if start != null
    • Method Detail

      • setRid

        public void setRid​(String rid)
      • setPreviousRid

        public void setPreviousRid​(String previousRid)
      • setVersion

        public void setVersion​(Version version)
      • getStartTime

        public Date getStartTime()
        Description copied from interface: ResourceId
        Used to select versions of a resource between start and end time.
        Specified by:
        getStartTime in interface ResourceId
        Returns:
        start time for a time based query; or null if using version or an end time was provided but the start time is unconstrained TODO: consider using an org.geotools.util.Range instead of both start and end time?
      • setStartTime

        public void setStartTime​(Date startTime)
      • getEndTime

        public Date getEndTime()
        Description copied from interface: ResourceId
        Used to select versions of a resource between start and end time.
        Specified by:
        getEndTime in interface ResourceId
        Returns:
        end time for a time based query; or null if using version or an start time was provided but the end time is unconstrained TODO: consider using an org.geotools.util.Range instead of both start and end time?
      • setEndTime

        public void setEndTime​(Date endTime)
      • getVersion

        public Version getVersion()
        Description copied from interface: ResourceId
        Used to navigate versions of a resource.

        Specified by:
        getVersion in interface ResourceId
        Returns:
        Version based resource query; non null but possibly empty if used a date range query or asked for a specific feature id + version id
      • equals

        public boolean equals​(Object obj)
        Description copied from interface: Identifier
        Identifier is a data object, equals is based just on getID()
        Specified by:
        equals in interface Identifier
        Overrides:
        equals in class FeatureIdVersionedImpl
        Returns:
        true if obj is an Identifier with the same getID()