Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EPF » Import method content from spreadsheet
Import method content from spreadsheet [message #50823] Sun, 08 June 2008 07:09 Go to next message
Eclipse User
Originally posted by: damien.brignell.id.au

I'm trying to import approximately 270 term definitions into a method
library from a spreadsheet with 2 columns (term and definition). Is there
any way I can do this without doing a 'cut and paste' into EPF Composer
270+ times?

It looks like EPFC applies a unique xmi ID and GUI ID to each method
element. Short of writing some Java (which I'm not experienced at) is
there another way?
Re: Import method content from spreadsheet [message #51195 is a reply to message #50823] Thu, 19 June 2008 08:08 Go to previous messageGo to next message
Kristian Mandrup is currently offline Kristian Mandrup
Messages: 44
Registered: July 2009
Member
Hi,

I am also trying to auto import some external content into EPF. This seems
to be a very common scenario which is as of yet not documented (or
designed for?).

I want to import a stack of html content as XMI.

I've just been checking the src code and checked out the RTE component,
which has a setText(..) method, which calls

// Call JTidy to format the source to XHTML.
newText = formatHTML(newText);
executeCommand(RichTextCommand.SET_TEXT, newText); which calls
notifyModifyListeners()

and inside
org.eclipse.autoring.ui.editors.MethodElementEditor

there is a
saveModifiedRichText(..) and a save(Resource resource)
...
if(canSave) {
ILibraryPersister.FailSafeMethodLibraryPersister persister =
getPersister();
persister.save(resource);
persister.commit();
...

Looks interesting!
Re: Import method content from spreadsheet [message #51223 is a reply to message #50823] Thu, 19 June 2008 08:39 Go to previous message
Kristian Mandrup is currently offline Kristian Mandrup
Messages: 44
Registered: July 2009
Member
The getPersister() calls
LibraryServiceUtil.getCurrentPersister().getFailSafePersiste r();

Looking into org.eclipse.epf.library.LibraryServiceUtil;

there is a public void setGUID(MethodElement element) {

to set the GUID for method elements, part of the default persistence I
assume.

The

org.eclipse.epf.library.util.ResourceHelper also looks worth some interest
for ur case.

Maybe it is an idea to use the OAW framework for working directly with the
XMI files?

But it is a bit "cryptic" how the XHTML is stored inside the XMI in EPF.
I guess u could do a manual "copy-paste" and then see how the XMI files
change in various places and simulate this via some kind of scripting...
Re: Import method content from spreadsheet [message #589571 is a reply to message #50823] Thu, 19 June 2008 08:08 Go to previous message
Kristian Mandrup is currently offline Kristian Mandrup
Messages: 44
Registered: July 2009
Member
Hi,

I am also trying to auto import some external content into EPF. This seems
to be a very common scenario which is as of yet not documented (or
designed for?).

I want to import a stack of html content as XMI.

I've just been checking the src code and checked out the RTE component,
which has a setText(..) method, which calls

// Call JTidy to format the source to XHTML.
newText = formatHTML(newText);
executeCommand(RichTextCommand.SET_TEXT, newText); which calls
notifyModifyListeners()

and inside
org.eclipse.autoring.ui.editors.MethodElementEditor

there is a
saveModifiedRichText(..) and a save(Resource resource)
...
if(canSave) {
ILibraryPersister.FailSafeMethodLibraryPersister persister =
getPersister();
persister.save(resource);
persister.commit();
...

Looks interesting!
Re: Import method content from spreadsheet [message #589580 is a reply to message #50823] Thu, 19 June 2008 08:39 Go to previous message
Kristian Mandrup is currently offline Kristian Mandrup
Messages: 44
Registered: July 2009
Member
The getPersister() calls
LibraryServiceUtil.getCurrentPersister().getFailSafePersiste r();

Looking into org.eclipse.epf.library.LibraryServiceUtil;

there is a public void setGUID(MethodElement element) {

to set the GUID for method elements, part of the default persistence I
assume.

The

org.eclipse.epf.library.util.ResourceHelper also looks worth some interest
for ur case.

Maybe it is an idea to use the OAW framework for working directly with the
XMI files?

But it is a bit "cryptic" how the XHTML is stored inside the XMI in EPF.
I guess u could do a manual "copy-paste" and then see how the XMI files
change in various places and simulate this via some kind of scripting...
Previous Topic:Linking task into Task Descriptor not working
Next Topic:RichText (EPF milestone 1.2.0.4)
Goto Forum:
  


Current Time: Fri Sep 19 08:04:40 GMT 2014

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

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