On Mon, 23 Apr 2001 17:52:05 -0700
Kimbro Staken <[EMAIL PROTECTED]> wrote:
> As I've been working on the implementation of the API I've come across a
> few things that should probably change. I wanted to outline them here
> for discussion before making the changes.
>
> The Collection interface should have setResourceType and getResouceType
> methods. These had been piggybacked on set/getProperty but this is
> important enough functionality that it should probably be a regular
> method.
Why the Collection interface needs setter/getter for ResourceType? Does
a Collection can not contain different Resources, e.g. DOM and Binary?
Did I overlooked something here?
> The Resource interface should have a getResourceType method so that you
> can know what kind of resource it encapsulates.
sounds reasonable
> In Collection there should probably be a getChildCollection method to
> retrieve a collection relative to the current collection.
>
> In Collection there is currently a getChildCollections method that
> returns a list of Collection instances. This would probably be better as
> a listChildCollections method that returns a list of child collection
> names instead of actual collection instances. You could then use
> getChildCollection to retrieve the Collection instances as needed.
>
> In Collection there should probably be a way to test for the existance
> of a Resource prior to retrieving/changing/deleting it.
>
> In Collection there should probably be a way to test for the existence
> of a particular service.
Well I see the advantages of dedicated "exists" methods but I'm not sure
whether they're really necessary?!
1. proceeding you request:
if (collection.serviceExists("XPathQueryService", "1.0")) {
Service service = collection.getService("XPathQueryService",
"1.0");
service.setCollection(collection);
....
}
or 2. current proceeding:
Service service = null;
if ((service = collection.getService("XPathQueryService", "1.0"))
!= null) {
service.setCollection(collection);
....
}
Same for Resources....
> I think that's it for now.
>
> --
> Kimbro Staken
> Chief Technology Officer
> dbXML Group L.L.C
> http://www.dbxmlgroup.com
>
> ----------------------------------------------------------------------
> Post a message: mailto:[EMAIL PROTECTED]
> Unsubscribe: mailto:[EMAIL PROTECTED]
> Contact adminstrator: mailto:[EMAIL PROTECTED]
> Read archived messages: http://archive.xmldb.org/
> ----------------------------------------------------------------------
--
______________________________________________________________________
Lars Martin mailto:[EMAIL PROTECTED]
SMB GmbH http://www.smb-tec.com
----------------------------------------------------------------------
Post a message: mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Contact adminstrator: mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------