Hi Martin, Long time no chat! :)
How about making DefaultFeature leverage Apache Tika's Metadata [1] class? It's a key->multi-value structure, and uses Adobe XMP properties to represent the value distribution. Cheers, Chris [1] http://tika.apache.org/1.5/api/org/apache/tika/metadata/Metadata.html ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Chris Mattmann, Ph.D. Chief Architect Instrument Software and Science Data Systems Section (398) NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA Office: 171-283, Mailstop: 171-246 Email: [email protected] WWW: http://sunset.usc.edu/~mattmann/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Adjunct Associate Professor, Computer Science Department University of Southern California, Los Angeles, CA 90089 USA ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -----Original Message----- From: Martin Desruisseaux <[email protected]> Organization: Geomatys Reply-To: "[email protected]" <[email protected]> Date: Monday, February 24, 2014 8:33 AM To: Apache SIS <[email protected]> Subject: About DefaultFeature >Hello all > >Before to make proposal for the Shapefile reader, I would like to make >some for the DefaultFeature class [1]. This class will be central to >many future SIS developments. I would like to make it closer to ISO >19109, GML 3.2 and GeoAPI interfaces (while we will not implement GeoAPI >right now). > >A Feature is basically a map of (key, value) pairs where the key are >names and values can be any object. Compared to the current >DefaultFeature interface, I propose the following changes: > >* Replace the getRecord() and setRecord() methods by: > * getAttributeValue(String) : Object > * setAttributeValue(String, Object) >* Remove the getGeom() and setGeom() methods, which would be an >attribute like any other. > >The reason for the later is that some kind of features may have no >geometry, or more than one geometry with different name. > >The reason for the former is that the map type may not be Map<String, >String>. It may be something like Map<Name, Value> or >Collection<Property>, to be determined in a future version. But no >matter the approach selected later, it would probably be possible the >get/setAttributeValue(String, ...) methods as convenient methods. > >What do peoples thinks? > > Martin > >[1] >https://builds.apache.org/job/sis-jdk7/site/apidocs/org/apache/sis/feature >/DefaultFeature.html >
