Adam Lally wrote:
On Jan 22, 2008 12:46 PM, Michael Baessler <[EMAIL PROTECTED]> wrote:
Minor changes for the interface....
the return values are now objects so that for a valid featurePath that
is not set "null" can be returned. In the old version this case must be
handled with an exception.
public interface FeaturePath {
public void initialize(String featurePath) throws
ResourceInitializationException;
public void typeSystemInit(Type featurePathType) throws
ResourceProcessException;
public String getValueAsString(FeatureStructure fs);
public Type getType(FeatureStructure fs);
public TypeClass getTypClass(FeatureStructure fs);
public String getFeaturePath();
public String getStringValue(FeatureStructure fs);
public Integer getIntValue(FeatureStructure fs);
public Boolean getBooleanValue(FeatureStructure fs);
public Byte getByteValue(FeatureStructure fs);
public Double getDoubleValue(FeatureStructure fs);
public Float getFloatValue(FeatureStructure fs);
public Long getLongValue(FeatureStructure fs);
public Short getShortValue(FeatureStructure fs);
public FeatureStructure getFSValue(FeatureStructure fs);
}
Seems OK to me. What about arrays, though? Should there be methods
to get array values? Also do we handle arrays in the middle of a path?
-Adam
Arrays are currently handled by getFSValue() or when using
getValueAsString() they are returned as comma separated value string.
Arrays in the middle of a featurePath are currently not supported. If
that use case comes up the feature path syntax can be extended to allow also
feature paths like /my/feature[23]/path. Do you think this is important?
-- Michael