Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Change xml scema?
Change xml scema? [message #115404] Thu, 29 March 2007 11:24 Go to next message
Eclipse UserFriend
Originally posted by: john.blutarsky.hotmail.com

Hello everyone,

I was wondering if it would be possible to change the scehma of the xml
files that are created when using my GMF editor?

If so how could this be done?

Thank you,

John
Re: Change xml scema? [message #115416 is a reply to message #115404] Thu, 29 March 2007 11:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

The IBM read book "Develope GEF and EMF-sg246302.pdf"
Has a section on this.
www.redbooks.ibm.com/redbooks/pdfs/sg246302.pdf



"John Bluto" <john.blutarsky@hotmail.com> wrote in message
news:7328e0cd774b701c3f9ca47ae23bde97$1@www.eclipse.org...
> Hello everyone,
>
> I was wondering if it would be possible to change the scehma of the xml
> files that are created when using my GMF editor?
>
> If so how could this be done?
>
> Thank you,
>
> John
>
Re: Change xml scema? [message #115428 is a reply to message #115404] Thu, 29 March 2007 11:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------040003060907000907030302
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

John,

If you are looking to specialize the serialization of your instance
data, this document describes annotations you can use on the Ecore model
to direct how serialization and deserialization will work:
< http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf>


http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf

You'll need to be sure your resource factory used options like this:

public Resource createResource(URI uri)
{
XMLResource result = new LibraryResourceImpl(uri);
*
result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTEND ED_META_DATA,
Boolean.TRUE);*
*
result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTEND ED_META_DATA,
Boolean.TRUE);*


result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA _LOCATION,
Boolean.TRUE);


result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_EN CODED_ATTRIBUTE_STYLE,
Boolean.TRUE);

result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_EN CODED_ATTRIBUTE_STYLE,
Boolean.TRUE);


result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LE XICAL_HANDLER,
Boolean.TRUE);
return result;
}

EMF should generate a resource factory for you once your model contains
extended meta data annotations but you'll probably have to change your
GenPackage's "Resource Type" property to "XML" (and keep in mind that
since plugin.xml doesn't support merge, the normal plugin.xml
registration for the generated factory won't just show up unless you
delete the plugin.xml and regenerate it.


John Bluto wrote:
> Hello everyone,
>
> I was wondering if it would be possible to change the scehma of the
> xml files that are created when using my GMF editor?
>
> If so how could this be done?
>
> Thank you,
>
> John
>


--------------040003060907000907030302
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
John,<br>
<br>
If you are looking to specialize the serialization of your instance
data, this document describes annotations you can use on the Ecore
model to direct how serialization and deserialization will work:<a
href=" http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf"><br>
</a>
<blockquote><a
href=" http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf"> http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf</a><br>
</blockquote>
You'll need to be sure your resource factory used options like this:<br>
<blockquote><small>
Re: Change xml scema? [message #115440 is a reply to message #115404] Thu, 29 March 2007 12:00 Go to previous message
Eclipse UserFriend
If you mean diagram files, they are determined by the notation model used by
the runtime. A bug exists to allow for custom diagram (notation) models:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=113966

- Rich


On 3/29/07 11:24 AM, in article
7328e0cd774b701c3f9ca47ae23bde97$1@www.eclipse.org, "John Bluto"
<john.blutarsky@hotmail.com> wrote:

> Hello everyone,
>
> I was wondering if it would be possible to change the scehma of the xml
> files that are created when using my GMF editor?
>
> If so how could this be done?
>
> Thank you,
>
> John
>
Previous Topic:Properties View
Next Topic:newly generated diagram code fails when trying to create a new diagram
Goto Forum:
  


Current Time: Tue Sep 16 15:59:15 EDT 2025

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

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

Back to the top