On Wed, Jun 5, 2013 at 9:51 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
>>
>>
>>> Hello,
>>>
>>> We discussed with Anne and Mathieu about the project moose on the web and how would we search for an entity in a model by interacting with the moose server implementing REST API.
>>>
>>> - The first API request to the server is allModels and then the server responds with the list of the moose models (JSON data). Once the user has got a list of model, how can one choose the model one wants to explore. One can select a moose model based on: i) its name, ii) its position in the collection returned by the server (1 for first, 2 for second, etc.) or iii) its mooseID. The name of a moose model is not unique so it does not help choosing the correct unique model. For the time, we choose the position in the collection returned by the server but if we have huge list, the position is difficult to remember. mooseID does not have semantic meaning. A meaningful solution would be to make all moose models have a unique name. What do you think?
>
> I think that at first you should only work with only one model in one image :).

+1

>
>
>>> - Generalizing the search to all the entities in the model, how do you select an Entity with its name in the model knowing that the names are not unique (there can be two "add:" in a model). Scoping information can help and we have mooseName that concatenates the name with the scoping information of an entity. So a method named get() in java with class and package information appended looks like "java.utils::Scanner.get()". Is the name uniqueness guaranteed with this mechanism?
>>
>> In the past every entity had a uniqueName even invocation and attribute accesses.
>
> They still have a unique name as much as possible, only we only guarantee the unique names for named entities and only within the entities of the same kind. For example, you can have a package and a namespace with the same unique name, but both of them will be unique within their corresponding group.
>
> So, you should not rely on a global search. Instead you can have something like:
> get?classNamed=com::example::ClassA
>
> Or even better:
> getClass?mooseName=com::example::ClassA

Yes and then after we can have navigation like

> mooseserver/allClasses/

Yes that's already implemented.
 

Stef
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev