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.
ctangentAsked:
Who is Participating?
 
Mayank SConnect With a Mentor Associate Director - Product EngineeringCommented:
There are many open source content management systems in Java:

http://java-source.net/open-source/content-managment-systems
0
 
Mayank SConnect With a Mentor Associate Director - Product EngineeringCommented:
You can create such an interface and implementing classes yourself. Have a look at:

http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_21666226.html#15495977
0
 
Giant2Commented:
>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?
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
CEHJCommented:
>>but doesn't seem tied to WebDav.  

I thought it was ...
0
 
ctangentAuthor Commented:
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.
0
 
ctangentAuthor Commented:
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.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
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)
0
 
CEHJConnect With a Mentor Commented:
ctangent, what you said about the non-dependency rings true, although i've no time to read it now. As far as the interface is concerned, mayankeagle seems to be right - it would be relatively trivial to construct the interface itself (interface in the sense of an abstract class) and then implement it later. You could, pro tem, return Object from all calls
0
 
ctangentAuthor Commented:
Perhaps the triviality of the problem makes searching for an already existing implementation of the problem a mute point?
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Maybe....
0
 
CEHJConnect With a Mentor Commented:
Well i'm still not quite clear of your goal. The design of an interface, as we've said, is trivial. What's less than trivial, maybe, is implementing that interface in a particular circumstance
0
 
ctangentAuthor Commented:
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).

0
 
ctangentAuthor Commented:
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?
0
 
CEHJCommented:
0
 
ctangentAuthor Commented:
CEHJ,

:-)  See mayankeagle's comment above
0
 
CEHJCommented:
Doh!
0
 
Mayank SConnect With a Mentor Associate Director - Product EngineeringCommented:
:-)

Try OpenCMS, I think it should be good.
0
 
ctangentAuthor Commented:
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!
0
 
ctangentAuthor Commented:
CEHJ and Mayankeagle

Thank you for your help!
0
 
CEHJCommented:
:-)
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Glad to :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.