Link to home
Start Free TrialLog in
Avatar of ctangent
ctangent

asked on

Resource interface code -- way to manipulate files in a generic way, whether they be in database or webdav, etc.?

Does there exist a project or a body of code (an apache project or something else) that woud implement an interface to dealing with files that may be stored in a hard drive or on a webdav server or in a database (but a way to interact with all of these files the same way)?  For example, an interface that would implement things like "coping" a file from one location to another, deleting a file, adding a new file, downloading a copy of the file, etc. (real or virtual -- as in the case of a database, there might be a virtual hierarchy of the files).  This would be for a backend to a web application (but also possibly have a non-web based GUI client).

The one project that seems to do some of these things is Jakarta Slide, which seems to have a lot of emphasis on WebDav, but doesn't seem tied to WebDav.  

If there are several projects that achieve this, is there one that also allows for metadata to be attached with the files, in a way that based on the metadata, different "virtual hierarchies" of those files can produced?

Thank you for any help/assistence you might have.
SOLUTION
Avatar of Mayank S
Mayank S
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Giant2
Giant2

>The one project that seems to do some of these things is Jakarta Slide, which seems to have a lot of emphasis on WebDav, but doesn't seem tied to WebDav.

Jakarta Slide coudl be your choice if, like mayankeagle told, implement yourself.
Why you told Jakarta Slide is not applicable for you?
>>but doesn't seem tied to WebDav.  

I thought it was ...
Avatar of ctangent

ASKER

CEHJ,

http://jakarta.apache.org/slide/
"The Slide project main module is a content repository, which can be seen as a low-level content management framework...Slide also offers a WebDAV access module (implemented as a servlet)."

From the description of Slide, it seems to suggest that WebDAV access is an addon module, even though on other parts of the Slide site it's main talking points refer to WebDAV.  Also, look here:
http://jakarta.apache.org/slide/architecture.html

According to the architecture image, A WebDAV/HTTP client can access through the WebDAV module, but a Java Application can access the Slide API directly.  And the backend datastores let you store files in database, or other, etc.  So it seemed promising, but I didn't know how much work would take to get that working.

I could be wrong, but that is why I thought it wasn't only tied to WebDAV.
mayankeagle,
I'm very familiar with making interfaces and implementing them in the background.  Though I don't want to reinvent the wheel, and interacting with data in a non-specific way (whether it is stored in db or on the hard drive or on webdav server, etc.) seems to be a problem many people would come across, I assumed there would be more than one solution already in existence.

Giant2,

We looked at slide, and still might consider it.  I just wanted to know if Slide was the only thing or if there were other things that could solve this problem.
You could look at the DAO design pattern but I am not sure if you could entirely abstract it from the data-store (meaning XML files, flat-file structure, etc)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perhaps the triviality of the problem makes searching for an already existing implementation of the problem a mute point?
Maybe....
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ah, okay, I see what you are saying.  I wrote a poor question.


I think what I was looking for was a content management system or content repository that has a Java API to it.  Something that would implement functions like "add file to repository" or "remove file" or "move file to different location", "create directory" -- in a sense, much of the functionality that java.io.File gives; but maybe through an interface than through java.io.File.  Something that would allow me to interact with a hierarchy of files using common interactions (copy, delete, move, etc.) but let the backend be flexible -- like the files might actually be stored on a hard drive or on a webdav file server or in a database, etc.

Of course, if it is a content repository, it might have extra features that wouldn't be included in a simple interface+implementation i'd produce -- something that deals with metadata, security, etc.


Writing my own interface and implementing it is doable, but I thought I'd check first to see if there existed any current interfaces+implementations that address the issue of content management (unfortunately, in my search, most CMSs are for websites, and not just java applications that want a solution for storing a large number of files).

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
True, well, at least it seems they are written in Java...or do these have Java APIs?  I see a few mention an API:

Daisy: standalone repository server accessible through HTTP/XML and/or a high-level (remote) Java API
Of course, remote is not too promising.  I'd rather have a directly accessible CMS via Java.

eAdmin/OWX mentions that it contains its own api.

I also imagine that several of these that are written in Java and are open source can be used with my own java code by simply calling some of the classes in the backend of the CMS directly.

The problem, though, is that it seems that alot of these are geared towards managing websites.  I want to manage alot of files through a Java API becuase then I can deal with security, etc. in different ways that maybe the CMS doesn't do.

I have seen this before...is there any other suggestions, mayankeagle and CEHJ?
CEHJ,

:-)  See mayankeagle's comment above
Doh!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I checked out OpenCMS, and they had the Javadoc right online!  It was great, and as I was looking at the backend piece that dealt with managing files, etc., I read something that sparked a memory:

VFS

OpenCms VFS repository

I think that what I have been looking for, essentially, was a Java VFS.  This reminded me of the Jakarta Commons project:
Commons VFS
http://jakarta.apache.org/commons/vfs/

I think this is exactly what I am looking for -- another option to the Slide repository, which, in a sense, is a VFS with a Java API.

I'll keep the OpenCMS as an option; it seems like alot of these CMSs really solve the similar problems that commons VFS does but in a way that works for their projects.

If this sparks any more ideas or suggestions from you, let me know.  I'll leave the question open another day or two before closing it.  Thank you for all your help!
CEHJ and Mayankeagle

Thank you for your help!
:-)
Glad to :-)