Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "IdAS Update Proposals 2"

Line 40: Line 40:
 
[[Image:complexValueCurrent.jpg]]
 
[[Image:complexValueCurrent.jpg]]
  
We need to add some intermediary owl-class between pwa:postalAddress (attribute property) and pwa:PostalAddress (complex value class), like pwa:postalAddress_container on the figure below.
+
On this picture digital subject (pwa:Person class) contains attribute (pwa:postalAddress property) with complex value (pwa:PostalAddress class). If we want to add one more value (individual of pwa:PostalAddress class) we can only add new attribute, because the same attribute can not contain two complex values (pwa:postalAddress property can not refer to two individauls of pwa:PostalAddress class). We need to add some intermediary owl-class between pwa:postalAddress (attribute property) and pwa:PostalAddress (complex value class), like pwa:postalAddress_container on the figure below.  
  
 
[[Image:complexValueProposed.jpg]]
 
[[Image:complexValueProposed.jpg]]

Revision as of 10:36, 17 April 2007

There were three problems in the previous IdAS model:

1. IAttribute (IProperty) has two methods - getValues() and getValue(), and can store/return as single value as multiple value. We propose to add the following changes to IdAS interfaces to remove this ambiguity:

interface IPropertyValue {

         boolean isSingle();
         boolean isComplex();
         boolean isList();
         URI getType();

}

interface ISimpleValue extends IPripertyValue {

         Object getValue();
         void setValue(Object value);

}

interface IComplexValue extends IPropertyValue, IHasProperties { }

interface IValueList extends IPropertyValue {

         Iterator getValues();
         void setValues(Iterator newValues);
         void addValue(IPropertyValue value);
         void removeValue(IPropertyValue value);

}

interface IProperty {

         IPropertyValue getValue();
         void setValue(IPropertyValue value);

}

By default IAttribute (IProperty) should retrun IValueList instance. If we want to define this attribute as single, we should set cardinality = 1 for appropriate attribute property in the higgins OWL schema and in this case IProperty should return single ISimpleValue or IComplexValue instance. As a result, using cardinality mechanism of higgins OWL schema, we will able to define which value single or multiple is used for attribute.



2. Complex Attriburte can not contain more than one complex value because of restrictions of used OWL schema. Figure below shows current schema:


ComplexValueCurrent.jpg

On this picture digital subject (pwa:Person class) contains attribute (pwa:postalAddress property) with complex value (pwa:PostalAddress class). If we want to add one more value (individual of pwa:PostalAddress class) we can only add new attribute, because the same attribute can not contain two complex values (pwa:postalAddress property can not refer to two individauls of pwa:PostalAddress class). We need to add some intermediary owl-class between pwa:postalAddress (attribute property) and pwa:PostalAddress (complex value class), like pwa:postalAddress_container on the figure below.

ComplexValueProposed.jpg



3. We need some transaction mechanism to update IContext (or IDigitalSubject at the least) safely. We think it will be most useful to add transaction support on IContext level. We propose to add the following methods:

a) commit() - this method will be used by user to commit a set of changes made in the context;

b) rollback() - this method will be used by user to rollback his changes for some resons (because of non-IdAS exeptions, for example);

c) setAutocommit(boolean) - this method will be used by user to set\reset transaction mode (if true - user should use commit() method to save changes, if false - each change will be saved immediately).

Back to the top