Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » EFS again... Metadata
EFS again... Metadata [message #331444] Sun, 07 September 2008 19:27 Go to next message
Fabio M is currently offline Fabio MFriend
Messages: 25
Registered: July 2009
Junior Member
Hi everybody.

I was wondering if there is a clean way for accessing metadata provided
via EFS mechanisms.

I'll try to explain better my use case. I successfully wrote a
filesystem for accessing a remote system. The openInputStream and
openOutputStream allow me to interact with the remote data by reading
and saving it.

Now my problem is that the remote data (that is actually a document)
also has some metadata associated (e.g., the version, author, etc.).

I was thinking of providing, through the openInputStream method, both
the content and the metadata as the result. However I would like to keep
things separated.

The solution I found was to ask to EFS to give me the FileStore
associated to the current edited URI. Then I cast this FileStore to its
actual type that will have some extra methods for accessing the
metadata, and I use them for getting what I want.

This solution works fine. However it seems a bit dirty since I have to
"open" the implementation of my filesystem by exporting all the
FileStores that, normally, should be "internal".

Do you know another way for doing what I am trying to do in a clean way?

Thank you.

-F
Re: EFS again... Metadata [message #331845 is a reply to message #331444] Wed, 24 September 2008 21:57 Go to previous message
Eclipse UserFriend
Originally posted by: eclipseng.arthorne.com

You may be able to use IFileInfo#getStringAttribute for this kind of
metadata.
--


Fabio Mancinelli wrote:
> Hi everybody.
>
> I was wondering if there is a clean way for accessing metadata provided
> via EFS mechanisms.
>
> I'll try to explain better my use case. I successfully wrote a
> filesystem for accessing a remote system. The openInputStream and
> openOutputStream allow me to interact with the remote data by reading
> and saving it.
>
> Now my problem is that the remote data (that is actually a document)
> also has some metadata associated (e.g., the version, author, etc.).
>
> I was thinking of providing, through the openInputStream method, both
> the content and the metadata as the result. However I would like to keep
> things separated.
>
> The solution I found was to ask to EFS to give me the FileStore
> associated to the current edited URI. Then I cast this FileStore to its
> actual type that will have some extra methods for accessing the
> metadata, and I use them for getting what I want.
>
> This solution works fine. However it seems a bit dirty since I have to
> "open" the implementation of my filesystem by exporting all the
> FileStores that, normally, should be "internal".
>
> Do you know another way for doing what I am trying to do in a clean way?
>
> Thank you.
>
> -F
Previous Topic:How to install all basic features?
Next Topic:Eclipse 3.5 Plan?
Goto Forum:
  


Current Time: Mon Dec 30 17:00:24 GMT 2024

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

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

Back to the top