Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » FeatureMap definition
FeatureMap definition [message #506375] Thu, 07 January 2010 05:46 Go to next message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Hi all,

i currently investigate the differences between EMF FeatureMaps and UML
Subsets, so i have several question concerning FeatureMap definitions.
It would be nice, if someone may state some short answers to them:

1. Is it possible to let a feature participate in more than one feature
maps, like it is possible with subsets? In form of {subsets a, subsets
b, ...}?

2. Consider a generalization between class A and B, where A::c is a
feature, that participates in a feature map. Is it somehow possible to
define B::c', where c' will subset c and therefore traversly taking part
in the feature map of class A? I've contemplate about this more
intensively, and i think this won't be possible, since subsetting of one
feature is not possible with feature maps, where maps only intended to
act as a combining mechanism. Subsetting of single feature is not
covered, is it? So, this might be the main difference between feature
maps and subsets from my current point of knowledge. Real subsetting of
single features is not possible...

3. What about generalization behavior of a feature map. Is it possible
to let a feature of B be participate in the feature map of A? I'm pretty
sure, that this is possible.

Thanks a lot in advance, since it is sometime really confusing to me,
what feature maps are really intended for, respectively, in how the
differ from unions and subsets of MOF2.0.

Timothy
Re: FeatureMap definition [message #506401 is a reply to message #506375] Thu, 07 January 2010 11:48 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030700030205020706080903
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Timothy,

Comments below.


Timothy Marc wrote:
> Hi all,
>
> i currently investigate the differences between EMF FeatureMaps and
> UML Subsets, so i have several question concerning FeatureMap
> definitions. It would be nice, if someone may state some short answers
> to them:
>
> 1. Is it possible to let a feature participate in more than one
> feature maps, like it is possible with subsets? In form of {subsets a,
> subsets b, ...}?
Yes. If you look at the list method for create a "view" for some
feature you'll see for the case of a feature that itself is a feature
map, another feature map is created.

public <T> EList<T> list(EStructuralFeature feature)
{
return
FeatureMapUtil.isFeatureMap(feature) ?
(EList<T>)new FeatureMapUtil.FeatureFeatureMap(feature, this):
new FeatureMapUtil.FeatureEList<T>(feature, this);
}

>
> 2. Consider a generalization between class A and B, where A::c is a
> feature, that participates in a feature map. Is it somehow possible to
> define B::c', where c' will subset c and therefore traversly taking
> part in the feature map of class A? I've contemplate about this more
> intensively, and i think this won't be possible, since subsetting of
> one feature is not possible with feature maps, where maps only
> intended to act as a combining mechanism. Subsetting of single feature
> is not covered, is it? So, this might be the main difference between
> feature maps and subsets from my current point of knowledge. Real
> subsetting of single features is not possible...
Yes, I can't think of a way of mapping this to something that's possible
in XML schema. Certainly if A were a mixed content type there'd be an
overall feature map to which all element-based features would delegate
and both c and c' would participate in that, so I suppose that comes close.
>
> 3. What about generalization behavior of a feature map. Is it possible
> to let a feature of B be participate in the feature map of A? I'm
> pretty sure, that this is possible.
In the end, it's what the BasicFeatureMap.**getValidator(EClass
containingClass, EStructuralFeature eStructuralFeature) allows that
determines the valid content.
>
> Thanks a lot in advance, since it is sometime really confusing to me,
> what feature maps are really intended for, respectively, in how the
> differ from unions and subsets of MOF2.0.
They're intended primarily (one might say solely) to support XML Schema
features such as mixed content, substitution groups, and complex
particle structures that allow interleaving of different elements.
>
> Timothy
>

--------------030700030205020706080903
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Timothy,<br>
<br>
Comments below.<br>
<br>
<br>
Timothy Marc wrote:
<blockquote cite="mid:hi4djn$icf$1@build.eclipse.org" type="cite">Hi
all,
<br>
<br>
i currently investigate the differences between EMF FeatureMaps and UML
Subsets, so i have several question concerning FeatureMap definitions.
It would be nice, if someone may state some short answers to them:
<br>
<br>
1. Is it possible to let a feature participate in more than one feature
maps, like it is possible with subsets? In form of {subsets a, subsets
b, ...}?
<br>
</blockquote>
Yes.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: FeatureMap definition [message #506403 is a reply to message #506401] Thu, 07 January 2010 12:33 Go to previous messageGo to next message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Dear Ed, thanks for responding quickly... let me rerequest some parts of
your answers inline and let me ask another interesting question.

The feature map defines a container for features, that origin from a
particular reference (e.g. @orders, Supplier__Order from the book). In
that case, it should be still possible to add a subtype of Order (e.g.
SubOrder) directly into the feature map (by using the Supplier__Order
feature id). So in that case, the content of a feature map may contain
elements derived by the particpating features as well as elements,
depending on the feature (the type of the attribute itself).

(additional comments inline, as mentioned)

Ed Merks schrieb:
> Timothy,
>
> Comments below.
>
>
> Timothy Marc wrote:
>> Hi all,
>>
>> i currently investigate the differences between EMF FeatureMaps and
>> UML Subsets, so i have several question concerning FeatureMap
>> definitions. It would be nice, if someone may state some short answers
>> to them:
>>
>> 1. Is it possible to let a feature participate in more than one
>> feature maps, like it is possible with subsets? In form of {subsets a,
>> subsets b, ...}?
> Yes. If you look at the list method for create a "view" for some
> feature you'll see for the case of a feature that itself is a feature
> map, another feature map is created.
>
> public <T> EList<T> list(EStructuralFeature feature)
> {
> return
> FeatureMapUtil.isFeatureMap(feature) ?
> (EList<T>)new FeatureMapUtil.FeatureFeatureMap(feature, this):
> new FeatureMapUtil.FeatureEList<T>(feature, this);
> }
>
>>
>> 2. Consider a generalization between class A and B, where A::c is a
>> feature, that participates in a feature map. Is it somehow possible to
>> define B::c', where c' will subset c and therefore traversly taking
>> part in the feature map of class A? I've contemplate about this more
>> intensively, and i think this won't be possible, since subsetting of
>> one feature is not possible with feature maps, where maps only
>> intended to act as a combining mechanism. Subsetting of single feature
>> is not covered, is it? So, this might be the main difference between
>> feature maps and subsets from my current point of knowledge. Real
>> subsetting of single features is not possible...
>
> Yes, I can't think of a way of mapping this to something that's possible
> in XML schema. Certainly if A were a mixed content type there'd be an
> overall feature map to which all element-based features would delegate
> and both c and c' would participate in that, so I suppose that comes close.

Hmm... not directly, since all the elemnts of c' should also be
contained in c and the overall feature map. Correct me, if i'm wrong,
but the situation you described leads to a situation, where elements can
only occur in c and c', but not in c' as well as c.

>>
>> 3. What about generalization behavior of a feature map. Is it possible
>> to let a feature of B be participate in the feature map of A? I'm
>> pretty sure, that this is possible.
> In the end, it's what the BasicFeatureMap.**getValidator(EClass
> containingClass, EStructuralFeature eStructuralFeature) allows that
> determines the valid content.
>>
>> Thanks a lot in advance, since it is sometime really confusing to me,
>> what feature maps are really intended for, respectively, in how the
>> differ from unions and subsets of MOF2.0.
>
> They're intended primarily (one might say solely) to support XML Schema
> features such as mixed content, substitution groups, and complex
> particle structures that allow interleaving of different elements.

However, they are quite close to these MOF union/subset capabilities and
to some degree they help to create a more convenient API, from
implementors point of view. In the end, i still think, that the list
framework of UML2 project, which implements these capabilites directly,
is easier to understand for someone, who wants to dig into the code.

>>
>> Timothy
>>
Re: FeatureMap definition [message #506453 is a reply to message #506403] Thu, 07 January 2010 15:07 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Timothy,

Comments below.

Timothy Marc wrote:
> Dear Ed, thanks for responding quickly... let me rerequest some parts
> of your answers inline and let me ask another interesting question.
>
> The feature map defines a container for features, that origin from a
> particular reference (e.g. @orders, Supplier__Order from the book). In
> that case, it should be still possible to add a subtype of Order (e.g.
> SubOrder) directly into the feature map (by using the Supplier__Order
> feature id). So in that case, the content of a feature map may contain
> elements derived by the particpating features as well as elements,
> depending on the feature (the type of the attribute itself).
>
> (additional comments inline, as mentioned)
>
> Ed Merks schrieb:
>> Timothy,
>>
>> Comments below.
>>
>>
>> Timothy Marc wrote:
>>> Hi all,
>>>
>>> i currently investigate the differences between EMF FeatureMaps and
>>> UML Subsets, so i have several question concerning FeatureMap
>>> definitions. It would be nice, if someone may state some short
>>> answers to them:
>>>
>>> 1. Is it possible to let a feature participate in more than one
>>> feature maps, like it is possible with subsets? In form of {subsets
>>> a, subsets b, ...}?
>> Yes. If you look at the list method for create a "view" for some
>> feature you'll see for the case of a feature that itself is a feature
>> map, another feature map is created.
>>
>> public <T> EList<T> list(EStructuralFeature feature)
>> {
>> return
>> FeatureMapUtil.isFeatureMap(feature) ?
>> (EList<T>)new FeatureMapUtil.FeatureFeatureMap(feature, this):
>> new FeatureMapUtil.FeatureEList<T>(feature, this);
>> }
>>
>>>
>>> 2. Consider a generalization between class A and B, where A::c is a
>>> feature, that participates in a feature map. Is it somehow possible
>>> to define B::c', where c' will subset c and therefore traversly
>>> taking part in the feature map of class A? I've contemplate about
>>> this more intensively, and i think this won't be possible, since
>>> subsetting of one feature is not possible with feature maps, where
>>> maps only intended to act as a combining mechanism. Subsetting of
>>> single feature is not covered, is it? So, this might be the main
>>> difference between feature maps and subsets from my current point of
>>> knowledge. Real subsetting of single features is not possible...
> >
>> Yes, I can't think of a way of mapping this to something that's
>> possible in XML schema. Certainly if A were a mixed content type
>> there'd be an overall feature map to which all element-based features
>> would delegate and both c and c' would participate in that, so I
>> suppose that comes close.
>
> Hmm... not directly, since all the elemnts of c' should also be
> contained in c and the overall feature map. Correct me, if i'm wrong,
> but the situation you described leads to a situation, where elements
> can only occur in c and c', but not in c' as well as c.
We're talking at a pretty abstract level here. As I said it comes close,
but yes, I don't think it's a form of subsetting.
>
>>>
>>> 3. What about generalization behavior of a feature map. Is it
>>> possible to let a feature of B be participate in the feature map of
>>> A? I'm pretty sure, that this is possible.
>> In the end, it's what the BasicFeatureMap.**getValidator(EClass
>> containingClass, EStructuralFeature eStructuralFeature) allows that
>> determines the valid content.
>>>
>>> Thanks a lot in advance, since it is sometime really confusing to
>>> me, what feature maps are really intended for, respectively, in how
>>> the differ from unions and subsets of MOF2.0.
> >
>> They're intended primarily (one might say solely) to support XML
>> Schema features such as mixed content, substitution groups, and
>> complex particle structures that allow interleaving of different
>> elements.
>
> However, they are quite close to these MOF union/subset capabilities
> and to some degree they help to create a more convenient API, from
> implementors point of view. In the end, i still think, that the list
> framework of UML2 project, which implements these capabilites
> directly, is easier to understand for someone, who wants to dig into
> the code.
It was certainly designed to be an exact match for those concepts.
>
>>>
>>> Timothy
>>>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:EMF compare and merge
Next Topic:Re: teneo, databinding, model and a treeview
Goto Forum:
  


Current Time: Fri Apr 19 22:07:40 GMT 2024

Powered by FUDForum. Page generated in 0.02877 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top