?
Solved

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

Posted on 2006-05-04
21
Medium Priority
?
189 Views
Last Modified: 2010-03-31
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.
0
Comment
Question by:ctangent
  • 8
  • 6
  • 6
  • +1
21 Comments
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 1400 total points
ID: 16612257
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
 
LVL 12

Expert Comment

by:Giant2
ID: 16612426
>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
 
LVL 86

Expert Comment

by:CEHJ
ID: 16612545
>>but doesn't seem tied to WebDav.  

I thought it was ...
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:ctangent
ID: 16614016
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
 

Author Comment

by:ctangent
ID: 16614039
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
 
LVL 30

Expert Comment

by:Mayank S
ID: 16614071
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
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 600 total points
ID: 16614211
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
 

Author Comment

by:ctangent
ID: 16615879
Perhaps the triviality of the problem makes searching for an already existing implementation of the problem a mute point?
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16615989
Maybe....
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 600 total points
ID: 16616291
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
 

Author Comment

by:ctangent
ID: 16617430
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
 
LVL 30

Accepted Solution

by:
Mayank S earned 1400 total points
ID: 16621968
There are many open source content management systems in Java:

http://java-source.net/open-source/content-managment-systems
0
 

Author Comment

by:ctangent
ID: 16632792
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 16633889
0
 

Author Comment

by:ctangent
ID: 16634030
CEHJ,

:-)  See mayankeagle's comment above
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16634105
Doh!
0
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 1400 total points
ID: 16636464
:-)

Try OpenCMS, I think it should be good.
0
 

Author Comment

by:ctangent
ID: 16641935
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
 

Author Comment

by:ctangent
ID: 16720441
CEHJ and Mayankeagle

Thank you for your help!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16720526
:-)
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16731871
Glad to :-)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month14 days, 23 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question