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

(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, InvalidTypeException;
 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;
 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 getType() throws IdASException;
 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 type) throws IdASException, InvalidTypeException; 
 IAttribute addAttribute(IAttribute copyFrom) throws IdASException; 
}
 
public interface IDigitalSubject extends IHasMetadata, IHasAttributes
{
 public IContext getContext() throws IdASException;
 public String getUniqueID() 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