RE: Preview of full latest Java Interface : Comments on SimpleService interface

As there may be some interest in seeing what the API might look like if "simple" was just part of the package names and not part of the class names, here is a summary of the API based on the most recent complete version that I've seen. (It does not, for example, have a factory for an evidence instance that takes no parameters in the constructor, though apparantly this may be needed.)
 
Changes to the names are not really material to the API itself, though the names can have an effect on the understanding that new developers will have when they encounter the API for the first time. The substantive discussions are really about the nature of the interfaces, their relationships to each other, their semantics and the signatures of methods.
 
So, here's the insubstantive name changing exercise to see what happens if "simple" is just part of the package name:
 
org.w3c.ddr.simple.Service
  void initialize(
    String defaultVocabularyIRI,
    Properties props
  )
  String getAPIVersion()
  String getDataVersion()
  PropertyRef[] listPropertyRefs()
  PropertyValue getPropertyValue(
    Evidence evidence, 
    PropertyRef propertyRef
  )
  PropertyValue getPropertyValue(
    Evidence evidence,
    String localPropertyName
  )
  PropertyValue getPropertyValue(
    Evidence evidence,
    String localAspectName,
    String localPropertyName
  )
  PropertyValue getPropertyValue(
    Evidence evidence,
    PropertyName propertyName
  )
  PropertyValues getPropertyValues(
    Evidence evidence
  )
  PropertyValues getPropertyValues(
    Evidence evidence,
    PropertyRef[] propertyRefs
  )
  PropertyValues getPropertyValues(
    Evidence evidence,
    String localAspectName
  )
  PropertyValues getPropertyValues(
    Evidence evidence,
    String aspectIRI,
    String localAspectName
  )
  PropertyRef newPropertyRef(
    String localPropertyName
  )
  PropertyRef newPropertyRef(
    String localAspectName,
    String localPropertyName
  )
  PropertyRef newPropertyRef(
    String vocabularyIRI,
    String localAspectName,
    String localPropertyName
  )
  PropertyRef newPropertyRef(
    String localAspectName,
    PropertyName propertyName
  )
  Evidence newHTTPEvidence(Map map)
 
org.w3c.ddr.simple.Evidence
  void put(
    String key,
    String value
  )
  Boolean exists(
    String key
  )
  String getValue(
    String key
  )
 
org.w3c.ddr.simple.PropertyName
  String getPropertyName()
  String getNamespace()
  PropertyRef newPropertyRef(
    String aspect
  )
 
org.w3c.ddr.simple.PropertyRef
  static final String NULL_ASPECT = "__NULL"
  String getPropertyName()
  String getAspectName()
  String getNamespace()
  PropertyName newPropertyName()
 
org.w3c.ddr.simple.PropertyValue
  double getDouble()
  long getLong()
  String getString()
  boolean getBoolean()
  int getInteger()
  String[] getEnumeration()
  float getFloat()
  boolean exists()
 
org.w3c.ddr.simple.PropertyValues
  PropertyValue[] getAll()
  PropertyValue getValue(PropertyRef prop)
 
org.w3c.ddr.simple.ServiceFactory  // Class
  static Service newService(
    String clazz,
    String defaultVocabulary,
    Properties configuration
  )
  public static Service newService(
    String defaultVocabulary,
    Properties configuration
  )
 
 
 
---Rotan
 

________________________________

From: public-ddwg-request@w3.org on behalf of Smith, Kevin, VF-Group
Sent: Wed 27/02/2008 09:19
To: Jo Rabin; public-ddwg@w3.org
Subject: RE: Preview of full latest Java Interface : Comments on SimpleService interface




+1 to removing the word Simple and streamlining the overloaded methods, for the same reasons given...
Kevin

[...]

Received on Wednesday, 27 February 2008 10:25:12 UTC