Skip to main content

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

From what I've gathered, we want metadata on the Context, Digital Subject, Attribute, Attribute Values, and even elements of complex Attribute Values.
 
One unresolved issue is how to get the HOWL to represent metadata on an Attribute as a whole.  Of course, some CPs will not be able to represent metadata at all these levels, and as usual, they'll fail if people try to add it where not supported.
 
Anyway, if we do this, we'll need to make a few changes to IdAS.  Today, the only thing below an IDigitalSubject that has metadata is IAttribute. Further, the only difference between an IAttribute and an IProperty was that IAttribute had medatata. It's easy to add metadata to IPropertyValue. It's more tricky to add it to elements of a complex attribute (as those are just IPropertys).
 
We could say that all IPropertys have metadata, but oops, IMetadata is an IProperty (IMetadata doesn't even add functionality -- it's just a marker interface).  I don't think we want metadata on metadata. If we want to continue to allow metadata to be essentially the same as other properties (multi-valued, simple or complex), then we'll need to tease apart the notion of properties with metadata and properties without.
 
I started writing up what this would take and it's a major PITA due to lack of generics. This is because I'm making metadata just as robust as attributes except with no metadata on the metadata, no metadata on the metadata's values, no metadata on the metadata's value's elements (when the value is complex).  Basically, I'll have to duplicate APIs all the way down.  One set having metadata all the way down, and one without.
 
maybe I need sleep.
 
proposal 1
IValue (Same methods as today's IPropertyValue)
ISimpleValue implements IValue  (same methods as today's ISimpleValue)
IComplexValue implements IHasTypedValues (same methods as today's IComplexValue)
 
ITypedValues (same methods as today's IProperty but contains IValue and sub-interfaces)
ITypedValue implements ITypedValues (same methods as today's ISingleValuedProperty)
IHasTypedValues (like other IHas* but contains ITypedValues)
 
IMetadata implements ITypedValues {
 public IMetadataModel getMetadataModel();
}
ISingleValuedMetadata implements IMetadata, ITypedValue {} 
 
// Can't do this -- need to implement some kind of ITypedValueWithMetadata as well as IHasMetadata.  Meaning, need to build a sibling class hierarchy for IValue and sub interfaces, ITypedValues and sub interfaces.
IProperty implements ITypedValues, IHasMetadata (same methods as today's IProperty)
ISingleValuedProperty implements  IProperty {} (same as today's ISingleValuedProperty)
 
IAttribute implements ITypedValues, IHasMetadata (same methods as today's IProperty)
 public IAttributeModel getAttributeModel();
}
ISingleValuedAttribute implements IMetadata, ITypedValue {}
 
IPropertyValue implements IHasMetadata (same methods as today's IPropertyValue)
ISimpleValue implements IPropertyValue  (same methods as today's ISimpleValue)
IComplexValue implements IHasProperties (same methods as today's IComplexValue)
 

Back to the top