Skip to main content

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

Hmm, I had already switched over to using an IHasMetadata, and even though we're moving createMetadataItem to IMetadata, I'm tempted to leave IHasMetadata. It makes it easier to keep consistency as things change. I was also thinking about doing something similar (but different) for relationships. There I was thinking of using generics to simplify things. I'll toy with it and send out any good stuff I come up with.
 
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