Skip to main content



      Home
Home » Modeling » UML2 » Resource from non UML2 uml model
Resource from non UML2 uml model [message #477066] Tue, 11 March 2008 20:31 Go to next message
Eclipse UserFriend
Originally posted by: pfuriani.uci.edu

Resource resource = RESOURCE_SET.getResource(uri, true);

This is the line I use to create a resouce for a .uml file. This works
properly when the .uml file was created with the UML2 editor. However, when
the .uml file is created with a different UML program, Altova to be
specific, I notice that the "contents" array of the Resource object is
empty. So next when i call,

Package thePackage =
(Package)EcoreUtil.getObjectByType(resource.getContents(),
UMLPackage.Literals.PACKAGE);

,then "thePackage" is "null" because the contents of the Resource are
empty. I don't understand why the Resource contents only get filled in with
..uml files created with the UML2 editor and not by .uml files created by a
different editor. Its important that I can create a Resource from uml models
made by other programs besides UML2.
Re: Resource from non UML2 uml model [message #477071 is a reply to message #477066] Tue, 11 March 2008 23:08 Go to previous messageGo to next message
Eclipse UserFriend
Load UML resources from other tools will only work if the structure of those
files corresponds to the structure (schema) used by UML2. Can you provide a
sample of one of the resources you're trying to load?

Kenn

"PFuriani" <pfuriani@uci.edu> wrote in message
news:fr782p$5g6$1@build.eclipse.org...
> Resource resource = RESOURCE_SET.getResource(uri, true);
>
> This is the line I use to create a resouce for a .uml file. This works
> properly when the .uml file was created with the UML2 editor. However,
> when the .uml file is created with a different UML program, Altova to be
> specific, I notice that the "contents" array of the Resource object is
> empty. So next when i call,
>
> Package thePackage =
> (Package)EcoreUtil.getObjectByType(resource.getContents(),
> UMLPackage.Literals.PACKAGE);
>
> ,then "thePackage" is "null" because the contents of the Resource are
> empty. I don't understand why the Resource contents only get filled in
> with .uml files created with the UML2 editor and not by .uml files created
> by a different editor. Its important that I can create a Resource from uml
> models made by other programs besides UML2.
>
>
Re: Resource from non UML2 uml model [message #477097 is a reply to message #477071] Thu, 13 March 2008 18:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pfuriani.uci.edu

Here is the file that I am trying. I created this in Altova and used their
export as .xmi feature.



"Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
news:fr7hfr$8ml$1@build.eclipse.org...
> Load UML resources from other tools will only work if the structure of
> those
> files corresponds to the structure (schema) used by UML2. Can you provide
> a
> sample of one of the resources you're trying to load?
>
> Kenn
>
> "PFuriani" <pfuriani@uci.edu> wrote in message
> news:fr782p$5g6$1@build.eclipse.org...
>> Resource resource = RESOURCE_SET.getResource(uri, true);
>>
>> This is the line I use to create a resouce for a .uml file. This works
>> properly when the .uml file was created with the UML2 editor. However,
>> when the .uml file is created with a different UML program, Altova to be
>> specific, I notice that the "contents" array of the Resource object is
>> empty. So next when i call,
>>
>> Package thePackage =
>> (Package)EcoreUtil.getObjectByType(resource.getContents(),
>> UMLPackage.Literals.PACKAGE);
>>
>> ,then "thePackage" is "null" because the contents of the Resource are
>> empty. I don't understand why the Resource contents only get filled in
>> with .uml files created with the UML2 editor and not by .uml files
>> created
>> by a different editor. Its important that I can create a Resource from
>> uml
>> models made by other programs besides UML2.
>>
>>
>
>


Re: Resource from non UML2 uml model [message #477145 is a reply to message #477097] Thu, 27 March 2008 11:17 Go to previous messageGo to next message
Eclipse UserFriend
Sorry for the delayed response. I've taken a look at your model, and as it
turns out, I think this is a problem with the way content type recognition
is being done by EMF - there's nothing wrong with your model, but I think
what's happening is that the document isn't being recognized as a UML
document because the first "real" element in the document is an
xmi:Documentation element (instead of an element from the UML namespace).
Please open a Bugzilla request against EMF and attach your sample model as a
test case; in the meantime, you can work around the problem by removing the
documentation element (or moving it to later in the file).

Kenn

"PFuriani" <pfuriani@uci.edu> wrote in message
news:frc848$sav$1@build.eclipse.org...
> Here is the file that I am trying. I created this in Altova and used
> their export as .xmi feature.
>
>
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
> news:fr7hfr$8ml$1@build.eclipse.org...
>> Load UML resources from other tools will only work if the structure of
>> those
>> files corresponds to the structure (schema) used by UML2. Can you provide
>> a
>> sample of one of the resources you're trying to load?
>>
>> Kenn
>>
>> "PFuriani" <pfuriani@uci.edu> wrote in message
>> news:fr782p$5g6$1@build.eclipse.org...
>>> Resource resource = RESOURCE_SET.getResource(uri, true);
>>>
>>> This is the line I use to create a resouce for a .uml file. This works
>>> properly when the .uml file was created with the UML2 editor. However,
>>> when the .uml file is created with a different UML program, Altova to be
>>> specific, I notice that the "contents" array of the Resource object is
>>> empty. So next when i call,
>>>
>>> Package thePackage =
>>> (Package)EcoreUtil.getObjectByType(resource.getContents(),
>>> UMLPackage.Literals.PACKAGE);
>>>
>>> ,then "thePackage" is "null" because the contents of the Resource are
>>> empty. I don't understand why the Resource contents only get filled in
>>> with .uml files created with the UML2 editor and not by .uml files
>>> created
>>> by a different editor. Its important that I can create a Resource from
>>> uml
>>> models made by other programs besides UML2.
>>>
>>>
>>
>>
>
>
>
Re: Resource from non UML2 uml model [message #477230 is a reply to message #477145] Wed, 09 April 2008 14:54 Go to previous message
Eclipse UserFriend
I've gone ahead and submitted the bug for you -
https://bugs.eclipse.org/bugs/show_bug.cgi?id=226322.

Kenn

"Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
news:fsgdr2$g8p$1@build.eclipse.org...
> Sorry for the delayed response. I've taken a look at your model, and as it
> turns out, I think this is a problem with the way content type recognition
> is being done by EMF - there's nothing wrong with your model, but I think
> what's happening is that the document isn't being recognized as a UML
> document because the first "real" element in the document is an
> xmi:Documentation element (instead of an element from the UML namespace).
> Please open a Bugzilla request against EMF and attach your sample model as
> a test case; in the meantime, you can work around the problem by removing
> the documentation element (or moving it to later in the file).
>
> Kenn
>
> "PFuriani" <pfuriani@uci.edu> wrote in message
> news:frc848$sav$1@build.eclipse.org...
>> Here is the file that I am trying. I created this in Altova and used
>> their export as .xmi feature.
>>
>>
>>
>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
>> news:fr7hfr$8ml$1@build.eclipse.org...
>>> Load UML resources from other tools will only work if the structure of
>>> those
>>> files corresponds to the structure (schema) used by UML2. Can you
>>> provide a
>>> sample of one of the resources you're trying to load?
>>>
>>> Kenn
>>>
>>> "PFuriani" <pfuriani@uci.edu> wrote in message
>>> news:fr782p$5g6$1@build.eclipse.org...
>>>> Resource resource = RESOURCE_SET.getResource(uri, true);
>>>>
>>>> This is the line I use to create a resouce for a .uml file. This works
>>>> properly when the .uml file was created with the UML2 editor. However,
>>>> when the .uml file is created with a different UML program, Altova to
>>>> be
>>>> specific, I notice that the "contents" array of the Resource object is
>>>> empty. So next when i call,
>>>>
>>>> Package thePackage =
>>>> (Package)EcoreUtil.getObjectByType(resource.getContents(),
>>>> UMLPackage.Literals.PACKAGE);
>>>>
>>>> ,then "thePackage" is "null" because the contents of the Resource are
>>>> empty. I don't understand why the Resource contents only get filled in
>>>> with .uml files created with the UML2 editor and not by .uml files
>>>> created
>>>> by a different editor. Its important that I can create a Resource from
>>>> uml
>>>> models made by other programs besides UML2.
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
Re: Resource from non UML2 uml model [message #626198 is a reply to message #477066] Tue, 11 March 2008 23:08 Go to previous message
Eclipse UserFriend
Load UML resources from other tools will only work if the structure of those
files corresponds to the structure (schema) used by UML2. Can you provide a
sample of one of the resources you're trying to load?

Kenn

"PFuriani" <pfuriani@uci.edu> wrote in message
news:fr782p$5g6$1@build.eclipse.org...
> Resource resource = RESOURCE_SET.getResource(uri, true);
>
> This is the line I use to create a resouce for a .uml file. This works
> properly when the .uml file was created with the UML2 editor. However,
> when the .uml file is created with a different UML program, Altova to be
> specific, I notice that the "contents" array of the Resource object is
> empty. So next when i call,
>
> Package thePackage =
> (Package)EcoreUtil.getObjectByType(resource.getContents(),
> UMLPackage.Literals.PACKAGE);
>
> ,then "thePackage" is "null" because the contents of the Resource are
> empty. I don't understand why the Resource contents only get filled in
> with .uml files created with the UML2 editor and not by .uml files created
> by a different editor. Its important that I can create a Resource from uml
> models made by other programs besides UML2.
>
>
Re: Resource from non UML2 uml model [message #626226 is a reply to message #477071] Thu, 13 March 2008 18:02 Go to previous message
Eclipse UserFriend
Originally posted by: pfuriani.uci.edu

Here is the file that I am trying. I created this in Altova and used their
export as .xmi feature.



"Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
news:fr7hfr$8ml$1@build.eclipse.org...
> Load UML resources from other tools will only work if the structure of
> those
> files corresponds to the structure (schema) used by UML2. Can you provide
> a
> sample of one of the resources you're trying to load?
>
> Kenn
>
> "PFuriani" <pfuriani@uci.edu> wrote in message
> news:fr782p$5g6$1@build.eclipse.org...
>> Resource resource = RESOURCE_SET.getResource(uri, true);
>>
>> This is the line I use to create a resouce for a .uml file. This works
>> properly when the .uml file was created with the UML2 editor. However,
>> when the .uml file is created with a different UML program, Altova to be
>> specific, I notice that the "contents" array of the Resource object is
>> empty. So next when i call,
>>
>> Package thePackage =
>> (Package)EcoreUtil.getObjectByType(resource.getContents(),
>> UMLPackage.Literals.PACKAGE);
>>
>> ,then "thePackage" is "null" because the contents of the Resource are
>> empty. I don't understand why the Resource contents only get filled in
>> with .uml files created with the UML2 editor and not by .uml files
>> created
>> by a different editor. Its important that I can create a Resource from
>> uml
>> models made by other programs besides UML2.
>>
>>
>
>


Re: Resource from non UML2 uml model [message #626279 is a reply to message #477097] Thu, 27 March 2008 11:17 Go to previous message
Eclipse UserFriend
Sorry for the delayed response. I've taken a look at your model, and as it
turns out, I think this is a problem with the way content type recognition
is being done by EMF - there's nothing wrong with your model, but I think
what's happening is that the document isn't being recognized as a UML
document because the first "real" element in the document is an
xmi:Documentation element (instead of an element from the UML namespace).
Please open a Bugzilla request against EMF and attach your sample model as a
test case; in the meantime, you can work around the problem by removing the
documentation element (or moving it to later in the file).

Kenn

"PFuriani" <pfuriani@uci.edu> wrote in message
news:frc848$sav$1@build.eclipse.org...
> Here is the file that I am trying. I created this in Altova and used
> their export as .xmi feature.
>
>
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
> news:fr7hfr$8ml$1@build.eclipse.org...
>> Load UML resources from other tools will only work if the structure of
>> those
>> files corresponds to the structure (schema) used by UML2. Can you provide
>> a
>> sample of one of the resources you're trying to load?
>>
>> Kenn
>>
>> "PFuriani" <pfuriani@uci.edu> wrote in message
>> news:fr782p$5g6$1@build.eclipse.org...
>>> Resource resource = RESOURCE_SET.getResource(uri, true);
>>>
>>> This is the line I use to create a resouce for a .uml file. This works
>>> properly when the .uml file was created with the UML2 editor. However,
>>> when the .uml file is created with a different UML program, Altova to be
>>> specific, I notice that the "contents" array of the Resource object is
>>> empty. So next when i call,
>>>
>>> Package thePackage =
>>> (Package)EcoreUtil.getObjectByType(resource.getContents(),
>>> UMLPackage.Literals.PACKAGE);
>>>
>>> ,then "thePackage" is "null" because the contents of the Resource are
>>> empty. I don't understand why the Resource contents only get filled in
>>> with .uml files created with the UML2 editor and not by .uml files
>>> created
>>> by a different editor. Its important that I can create a Resource from
>>> uml
>>> models made by other programs besides UML2.
>>>
>>>
>>
>>
>
>
>
Re: Resource from non UML2 uml model [message #626388 is a reply to message #477145] Wed, 09 April 2008 14:54 Go to previous message
Eclipse UserFriend
I've gone ahead and submitted the bug for you -
https://bugs.eclipse.org/bugs/show_bug.cgi?id=226322

Kenn

"Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
news:fsgdr2$g8p$1@build.eclipse.org...
> Sorry for the delayed response. I've taken a look at your model, and as it
> turns out, I think this is a problem with the way content type recognition
> is being done by EMF - there's nothing wrong with your model, but I think
> what's happening is that the document isn't being recognized as a UML
> document because the first "real" element in the document is an
> xmi:Documentation element (instead of an element from the UML namespace).
> Please open a Bugzilla request against EMF and attach your sample model as
> a test case; in the meantime, you can work around the problem by removing
> the documentation element (or moving it to later in the file).
>
> Kenn
>
> "PFuriani" <pfuriani@uci.edu> wrote in message
> news:frc848$sav$1@build.eclipse.org...
>> Here is the file that I am trying. I created this in Altova and used
>> their export as .xmi feature.
>>
>>
>>
>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
>> news:fr7hfr$8ml$1@build.eclipse.org...
>>> Load UML resources from other tools will only work if the structure of
>>> those
>>> files corresponds to the structure (schema) used by UML2. Can you
>>> provide a
>>> sample of one of the resources you're trying to load?
>>>
>>> Kenn
>>>
>>> "PFuriani" <pfuriani@uci.edu> wrote in message
>>> news:fr782p$5g6$1@build.eclipse.org...
>>>> Resource resource = RESOURCE_SET.getResource(uri, true);
>>>>
>>>> This is the line I use to create a resouce for a .uml file. This works
>>>> properly when the .uml file was created with the UML2 editor. However,
>>>> when the .uml file is created with a different UML program, Altova to
>>>> be
>>>> specific, I notice that the "contents" array of the Resource object is
>>>> empty. So next when i call,
>>>>
>>>> Package thePackage =
>>>> (Package)EcoreUtil.getObjectByType(resource.getContents(),
>>>> UMLPackage.Literals.PACKAGE);
>>>>
>>>> ,then "thePackage" is "null" because the contents of the Resource are
>>>> empty. I don't understand why the Resource contents only get filled in
>>>> with .uml files created with the UML2 editor and not by .uml files
>>>> created
>>>> by a different editor. Its important that I can create a Resource from
>>>> uml
>>>> models made by other programs besides UML2.
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
Previous Topic:Which Plugin Do I need to view UML graphically?
Next Topic:Operation and Interfaces
Goto Forum:
  


Current Time: Sun Aug 31 13:50:03 EDT 2025

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

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

Back to the top