Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] IdAS: metadata on attribute values

I like proposal 4 the most followed by proposal 2.  Just in case it's not implied, I don't like proposals 1 or 3.

I made proposal 2 to Jim as I worked on the update tracking functionality I need to complete the update functionality in some of our Context Providers.  Jim morphed that into proposal 4 which I think is also quite nice and would be happy with.

At any rate, we need to expedite the consensus process on this so that I can complete the update tracking and update application functionality for our Context Providers.  I don't want to try to implement this under the current model because I think it's way too complicated (part of the motivation for my proposal) and we needed metadata to be allowed more places.  I already have an update tracking design worked out that I could use under proposal 4 (and with a few small mods, proposal 2) if we can get a consensus.

Anyway, we need to move fast on this.  Votes?

Tom

>>> "Jim Sermersheim" <jimse@xxxxxxxxxx> 5/9/2007 3:16 PM >>>
Two things: 1) I made a difference between the terms "type" and "ID" in the proposal below to make more sense.
2) I like this proposal because it's very familiar to any XML-aware users. A Digital Subject is like an XML element, and Attributes are like XML sub-elements of the subject element. Metadata is like XML attributes.
 
Jim 

>>> "Jim Sermersheim" <jimse@xxxxxxxxxx> 5/9/07 3:56 PM >>>
(oops, I didn't mean to say IMetadataValue extends IValue)
 
Anyway, now a small refinement on proposal 3.  Here we combine IMetadata and IMetadataValue, the rest is just like Proposal 3
 
I think I like this the best (but I'm assuming people will accept the notion of metadata being constrained to single, simple values)
 
Proposal 4:
 
public interface IMetadata {
 public URI getID() throws IdASException; // the metadata ID (creationTime, creatorName, etc.)
 public URI getType() throws IdASException; // The simple type (string, integer, etc.)
 public String getLexical() throws IdASException;
 public String getCanonical() throws IdASException;
 public Object getData() throws IdASException;
 void setData(Object data) throws IdASException;
 void remove() throws IdASException;
 public IMetadataModel getModel() throws IdASException;
}
 
public interface IHasMetadata {
 public Iterator getMetadataSet() throws IdASException; // Iterator of IMetadata
 public IMetadata getMetadata(URI metadataID) throws IdASException;
 IMetadata addMetadata(URI metadataID) throws IdASException, InvalidMetadataException;
 IMetadata addMetadata(IMetadata copyFrom) throws IdASException;
}
 
/**
 * not intended to be instantiated (only used as a super-interface)
 */
public interface IValue extends IHasMetadata {
 public boolean isSimple() throws IdASException;
 public URI getType() throws IdASException; // like string, int, address
 void remove() throws IdASException;
}

public interface ISimpleValue extends IValue {
 public String getLexical() throws IdASException;
 public String getCanonical() throws IdASException;
 public Object getData() throws IdASException;
 void setData(Object data) throws IdASException;
}
 
public interface IComplexValue extends IValue, IHasAttributes { 
}
 
public interface IAttribute extends IHasMetadata {
 public URI getAttrID() throws IdASException; // like hobbies, hatSize, homeAddress
 public Iterator getValues() throws IdASException;
 IValue addValue(URI type) throws IdASException, InvalidTypeException;
 IValue addValue(IValue copyFrom) throws IdASException;
 ISimpleValue addSimpleValue(URI type, Object data) throws IdASException, InvalidTypeException;
 IComplexValue addComplexValue(URI type) throws IdASException, InvalidTypeException;
 void remove() throws IdASException;
 public IAttributeModel getModel() throws IdASException;
 public boolean isSingleValued() throws IdASException;
}
 
public interface ISingleValuedAttribute extends IAttribute {
 public IValue getValue() throws IdASException;
}
 
public interface IHasAttributes
{
 public Iterator getAttributes() throws IdASException;
 public IAttribute getAttribute(URI attrID) throws IdASException;
 IAttribute addAttribute(URI attrID) throws IdASException, InvalidAttributeException; 
 IAttribute addAttribute(IAttribute copyFrom) throws IdASException; 
}
 
public interface IDigitalSubject extends IHasMetadata, IHasAttributes
{
 public IContext getContext() throws IdASException;
 public String getSubjectID() throws IdASException;
 public URI getType() throws IdASException;
 void remove() throws IdASException; 
 void applyUpdates() throws IdASException; // this is moving to IContext
 public IDigitalSubjectModel getModel() throws IdASException;
}


<snip>


Back to the top