Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] Metadata creation

Putting it on IMetadata works for me. I assume, like I think other create* methods do, this would both create and add to the set.
 
Jim

>>> Greg Byrd <gbyrd@xxxxxxxx> 7/13/06 6:15 AM >>>
Jim Sermersheim wrote:

> In the new IdAS interfaces, we added createMetadataItem to
> IDigitalSubject. IIRC, we did this so a consumer has a way of creating
> metadata for digital subjects.

> Don't we need the same method on all other interfaces holding metadata
> (IContext, IContextProvider, IAttribute, IRelationship)?


I may have misplaced that.  I thought that createMetadataItem was part
of IMetdata.  You're correct that the current version is certainly wrong.

> If so, we may as well define another interface like:

> public interface IHasMetadata {
>     public IMetadata getMetadata();
>     public void setMetadata(IMetadata metadata);
>     IMetadataItem createMetadataItem(URI type, Object value);
> }

> and just make the above interfaces extend that.


I don't think we need for every interface to have createMetadataItem. 
The programmer should only have to implement that once, unless we think
that different interfaces will have need for different classes of
MetadataItem.  I don't think so, and I would opt for moving the create
method to the IMetadata interface.

Without the create, all that's left is get/set, so I don't think there's
a need for IHasMetadata.

...Greg

_______________________________________________
higgins-dev mailing list
higgins-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/higgins-dev

Back to the top