Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » how can get all business object from diagram(how can get all business object from diagram)
how can get all business object from diagram [message #1101336] Wed, 04 September 2013 10:16 Go to next message
xiao yu zhou is currently offline xiao yu zhouFriend
Messages: 20
Registered: August 2013
Junior Member
Hi gays

Now I have a problem,I just want to know whether there are apis to get business object from diagram in graphiti.I look forward for your help.
Re: how can get all business object from diagram [message #1101362 is a reply to message #1101336] Wed, 04 September 2013 11:09 Go to previous messageGo to next message
PALANI SANKAR is currently offline PALANI SANKARFriend
Messages: 35
Registered: April 2013
Member
Hi Xiao

Try these methods getFeatureProvider().getBusinessObjectForPictogramElement(getDiagram());
getFeatureProvider().getAllBusinessObjectsForPictogramElement(getDiagram())

Hope this helps.

Thanks
Palani


Thanks
Palani
Re: how can get all business object from diagram [message #1102922 is a reply to message #1101362] Fri, 06 September 2013 07:48 Go to previous messageGo to next message
xiao yu zhou is currently offline xiao yu zhouFriend
Messages: 20
Registered: August 2013
Junior Member
Hi,PALANI SANKAR
Thank you for your advice for these methods ,but these methods did not give me a help.I can only get an empty array. I do not know why. I also tried getPictogramLinks() method on diagram,this method can help me to get all links and then get all business objs,but by this I get more than what I need. I know get the objs by filtering, but I think there should be a method provided by Graphiti to get domain model objs in an elegant way.

[Updated on: Fri, 06 September 2013 07:51]

Report message to a moderator

Re: how can get all business object from diagram [message #1104592 is a reply to message #1102922] Sun, 08 September 2013 16:51 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
On 06.09.13 09.48, xiao yu zhou wrote:
> Thank you for your adv
> getFeatureProvider().getBusinessObjectForPictogramElement(getDiagram()) and
> getFeatureProvider().getAllBusinessObjectsForPictogramElement(getDiagram()),but
> these methods did not give me a help.I can only get an empty array.

This code gives you the business object(s) directly related to the
diagram itself, which is a PictogramElement. Sometimes this is the root
object of your model, but not always. You must use a PictogramElement
further down the Shape containment hierarchy.

I do
> not know why. I also tried getPictogramLinks() method on diagram,this
> method can help me to get all links and then get all business objs,but
> by this I get more than what I need. I know get the objs by filtering,
> but I think there should be a method provided by Graphiti to get domain
> model objs in an elegant way.
>
Re: how can get all business object from diagram [message #1811331 is a reply to message #1104592] Sat, 31 August 2019 09:59 Go to previous message
deerein kelerin is currently offline deerein kelerinFriend
Messages: 1
Registered: August 2019
Junior Member
Besides showing the objects' state at a particular point in time, an object diagram can also be used to represent the occurrences of interactions between classes in runtime. The result looks a bit like a communication diagram. The figure below provides an example of such a class diagram and its corresponding object diagram:
Previous Topic:getPictogramElementForBusinessObject returns wrong business object
Next Topic:Extending the Graphiti Metamodel
Goto Forum:
  


Current Time: Tue Apr 16 07:04:15 GMT 2024

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

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

Back to the top