Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be 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 1: Line 1:
There was three problems in the previous IdAS model:
+
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:
 
'''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:

Revision as of 10:06, 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

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