org.geotools.filter.identity
Class FeatureIdImpl

Object
  extended by FeatureIdImpl
All Implemented Interfaces:
FeatureId, Identifier
Direct Known Subclasses:
FeatureIdVersionedImpl

public class FeatureIdImpl
extends Object
implements FeatureId

Implementation of FeatureId

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:
2.5
Author:
Justin Deoliveira, The Open Planning Project

Field Summary
protected  String fid
          underlying fid
protected  String origionalFid
           
 
Fields inherited from interface FeatureId
VERSION_SEPARATOR
 
Constructor Summary
FeatureIdImpl(String fid)
           
 
Method Summary
 boolean equals(Object obj)
          Identifier is a data object, equals is based just on getID()
 boolean equalsExact(FeatureId id)
          Check if the provided FeatureId is an exact match (including any optional version information).
 boolean equalsFID(FeatureId id)
          Checks if the provided FeatureId reflects the same feature.
 String getFeatureVersion()
          Version identifier for the feature instance, may be null
 String getID()
          The identifier value, which is a string.
 String getPreviousRid()
          previousRid attribute may be used, in implementations that support versioning, to report the previous identifier of a resource.
 String getRid()
          id of the resource that shall be selected by the predicate.
 int hashCode()
          Identifier is a data object, hashCode is based just on getID()
 boolean matches(Feature feature)
           
 boolean matches(Object object)
          Evaluates the identifer value against the given feature.
 void setID(String id)
           
 String toString()
          Returns a string representation of the identifier.
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

fid

protected String fid
underlying fid


origionalFid

protected String origionalFid
Constructor Detail

FeatureIdImpl

public FeatureIdImpl(String fid)
Method Detail

getID

public String getID()
Description copied from interface: FeatureId
The identifier value, which is a string.

Specified by:
getID in interface FeatureId
Specified by:
getID in interface Identifier

setID

public void setID(String id)

matches

public boolean matches(Feature feature)

matches

public boolean matches(Object object)
Description copied from interface: FeatureId
Evaluates the identifer value against the given feature.

Specified by:
matches in interface FeatureId
Specified by:
matches in interface Identifier
Parameters:
object - The feature to be tested.
Returns:
true if a match, otherwise false.

toString

public String toString()
Description copied from interface: Identifier
Returns a string representation of the identifier.

Specified by:
toString in interface Identifier
Overrides:
toString in class Object
Returns:
getID().toString()

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 Object
Returns:
true if obj is an Identifier with the same getID()

hashCode

public int hashCode()
Description copied from interface: Identifier
Identifier is a data object, hashCode is based just on getID()

Specified by:
hashCode in interface Identifier
Overrides:
hashCode in class Object
Returns:
hashCode based on getID()

equalsExact

public boolean equalsExact(FeatureId id)
Description copied from interface: FeatureId
Check if the provided FeatureId is an exact match (including any optional version information).

Specified by:
equalsExact in interface FeatureId
Returns:
true if this is an exact match (including any optional version information)

equalsFID

public boolean equalsFID(FeatureId id)
Description copied from interface: FeatureId
Checks if the provided FeatureId reflects the same feature.

This comparison does not compare any optional version information.

Specified by:
equalsFID in interface FeatureId
Returns:
true if both identifiers describe the same feature (does not compare version information).

getRid

public String getRid()
Description copied from interface: FeatureId
id of the resource that shall be selected by the predicate.

Equals to FeatureId.getID() if no feature version is provided, or getID() + "@" + getFeatureVersion() if getFeatureVersion() != null

If an implementation that references this International Standard supports versioning, the rid shall be a system generated hash containing a logical resource identifier and a version number. The specific details of the hash are implementation dependant and shall be opaque to a client

If versioning is not supported, the same value than FeatureId.getID() shall be returned.

Specified by:
getRid in interface FeatureId
Returns:
Resource identifier made up of FID (combined with FeatureVersion if available)

getPreviousRid

public String getPreviousRid()
Description copied from interface: FeatureId
previousRid attribute may be used, in implementations that support versioning, to report the previous identifier of a resource.

Specified by:
getPreviousRid in interface FeatureId
Returns:
Previous rid if available; or null

getFeatureVersion

public String getFeatureVersion()
Description copied from interface: FeatureId
Version identifier for the feature instance, may be null

Specified by:
getFeatureVersion in interface FeatureId
Returns:
Optional version information; null if not available
See Also:
FeatureId.getID(), FeatureId.getRid()


Copyright © 1996-2014 Geotools. All Rights Reserved.