Inner Classes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Inner Classes

Usman Bhatti
For nested types, I am setting the containing class to be the container entity of the nested class. I am trying to create a Tree View for my Moose entities. So, I have
Namespace
   Namespace
   Class
       Method ....
(Just to see my results are correct...)

Earlier I was using downcast to change container entity into a Namespace. That allowed me to navigate from a parent namespace to a child namespace using Namespace.getChildScope(). However, Container entity does not allow me to perform this navigation as the only thing available with ContainerEntity is belongsTo. My question is: Why cannot we ascertain the containing elements of a ContainerEntity?

thanx in advanace,

Usman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Inner Classes

Tudor Girba
Hi Usman,


On 12 May 2011, at 17:03, Usman Bhatti wrote:

> For nested types, I am setting the containing class to be the container entity of the nested class.

Good.

> I am trying to create a Tree View for my Moose entities. So, I have
> Namespace
>    Namespace
>    Class
>        Method ....
> (Just to see my results are correct...)
> Earlier I was using downcast to change container entity into a Namespace. That allowed me to navigate from a parent namespace to a child namespace using Namespace.getChildScope(). However, Container entity does not allow me to perform this navigation as the only thing available with ContainerEntity is belongsTo. My question is: Why cannot we ascertain the containing elements of a ContainerEntity?

There is no unified traversal from parent to children because there was no real use case until now. So you have to construct your tree manually.

Cheers,
Doru


> thanx in advanace,
>
> Usman
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Some battles are better lost than fought."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Inner Classes

Nicolas Anquetil
In reply to this post by Usman Bhatti


For nested types, I am setting the containing class to be the container entity of the nested class. I am trying to create a Tree View for my Moose entities. So, I have
Namespace
   Namespace
   Class
       Method ....
(Just to see my results are correct...)

Earlier I was using downcast to change container entity into a Namespace. That allowed me to navigate from a parent namespace to a child namespace using Namespace.getChildScope(). However, Container entity does not allow me to perform this navigation as the only thing available with ContainerEntity is belongsTo. My question is: Why cannot we ascertain the containing elements of a ContainerEntity?
you mean the conainED elements of an container?
Because you were talking of navigating from a parent namespace to a child ...

in containerEntity you have 'types' that gives you its childs
thanx in advanace,

Usman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Inner Classes

Tudor Girba
Hi,

On 12 May 2011, at 17:17, Nicolas Anquetil wrote:

>
>
> For nested types, I am setting the containing class to be the container entity of the nested class. I am trying to create a Tree View for my Moose entities. So, I have
> Namespace
>    Namespace
>    Class
>        Method ....
> (Just to see my results are correct...)
>
> Earlier I was using downcast to change container entity into a Namespace. That allowed me to navigate from a parent namespace to a child namespace using Namespace.getChildScope(). However, Container entity does not allow me to perform this navigation as the only thing available with ContainerEntity is belongsTo. My question is: Why cannot we ascertain the containing elements of a ContainerEntity?
> you mean the conainED elements of an container?
> Because you were talking of navigating from a parent namespace to a child ...
>
> in containerEntity you have 'types' that gives you its childs

I guess Usman would want a unified message that would retrieve the contained entities (the opposite of belongsTo). This does not exist for now, but it should not be so difficult to construct it manually.

Cheers,
Doru


> thanx in advanace,
>
> Usman
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Be rather willing to give than demanding to get."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev