Home » Modeling » UML2 » Resource from non UML2 uml model
Resource from non UML2 uml model [message #477066] |
Wed, 12 March 2008 00:31 |
Eclipse User |
|
|
|
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 #477097 is a reply to message #477071] |
Thu, 13 March 2008 22:02 |
Eclipse User |
|
|
|
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 15:17 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
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 18:54 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
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 #626226 is a reply to message #477071] |
Thu, 13 March 2008 22:02 |
Eclipse User |
|
|
|
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 15:17 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
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 18:54 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
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.
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
|
|
|
Goto Forum:
Current Time: Thu Sep 19 05:08:51 GMT 2024
Powered by FUDForum. Page generated in 0.04912 seconds
|