Unico Hommes wrote:



-----Original Message-----
From: Guido Casper [mailto:[EMAIL PROTECTED]
Sent: donderdag 23 oktober 2003 20:22
To: [EMAIL PROTECTED]
Subject: Re: repository block (was Re: [RT] Source extensions)

Unico Hommes <[EMAIL PROTECTED]> wrote:


-Adding a setSourceProperty() method to the


SourceInspector interface


Already have it on my local copy. :-)


Cool! So I leave this to you :-)



Actually I think it's better to define a subinterface named
SourceDescriptor that defines these methods. This would create the
distinction between read-only properties and read/write properties
nicely. Otherwise the read-only inspectors would need to throw some
kind of exception for those modifying methods.

This would also mean that SourceInspectorManager becomes
SourceDescriptionManager and throws an exception when it is asked to
perform a persistent operation for a read-only property. To allow
clients to asses whether a SourceProperty is read-only I propose to
add an isModifiable() method on the SourceProperty. To avoid that
users think SourceProperty.setValue() will persist their
modifications perhaps it is better to remove that method.


All this makes sense IMO.



A related change I need to make is described here:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23699 this will


not


only improve performance of querying for a specific property but is
prerequisite for setting properties via the


SourceDescriptionManager.


I'm not sure.
What exactly is the meaning of the returned Strings?



They identify a property type: namespace + "#" + propname. The previous implementation of the inspector manager's getSourceProperty() method was looping over all registered inspectors until it found the property it was looking for.



You're proposing an RDF-ish syntax. Have you considered the JAXP syntax, i.e. "{namespace}property" (see [1]). It has IMO the advantage of being less ambiguous, at distinction between a namespaced and non-namespaced property is done only on the first character (is it a '{' or not).


Unless, of course, every property _has_ to be namespaced.

Sylvain

[1] http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/Transformer.html#setOutputProperty(java.lang.String,%20java.lang.String)

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com




Reply via email to