Hi,

I am trying to integrate a java application to DSpace to store the
data. I have been successful in writing java code for ingesting,
deleting the items in dspace .

Now I need to implement search mechanism for our application which is
bugging me a lot.

Is there any mechanism: when i give a string as an input it should
search all the items and return all the items matching the string.

I have gone through the browse and search packages in DSpace API, but
couldn't figureout how to do it.

Please help me...

Thanking you all,
Krishna Bhaskarla

University of Memphis
Memphis, TN

On 2/7/07, Krishna <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I am trying a java program to insert an item into DSpace but i am getting
> the below exceptions:
>
>
> java program:
>
> publicclass Test {
>
>
>
> public static void main(String[] args) {
>
> Context context;
>
> try{
>
> Connection conn=DatabaseManager.getConnection();
>
>
>
> context=new Context();
>
>
>
> Community community=Community.create(null, context);
>
> community.setMetadata("Description", "This is a test Community" );
>
> community.update();
>
> Collection collection=community.createCollection();
>
> collection.setMetadata("DspaceCollection", "This is test Collection" );
>
> collection.update();
>
> File f=new File("c:/example-insert2.xml" );
>
> InputStream is=new FileInputStream(f);
>
> WorkspaceItem wsi=WorkspaceItem.create(context,collection,false );
>
> Item item=wsi.getItem();
>
> item.createSingleBitstream(is);
>
> System.out.println("SUCCESS" );
>
> }
>
> catch(Exception e){e.printStackTrace();}
>
>
>
>
>
>
>
>
>
> }
>
>
>
> }
>
> log4j:WARN No appenders could be found for logger
> (org.dspace.storage.rdbms.DatabaseManager).
>
> log4j:WARN Please initialize the log4j system properly.
>
> java.sql.SQLException: java.lang.NullPointerException
>
> at
> org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1694
> )
>
> at
> org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:715
> )
>
> at Test.main(Test.java:19)
>
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> --> I have properly installed DSpace and Postgres database on windowsXP..i
> could able to insert items through the DSpase
> UserInterface(http:\\localhost:8080\dspace)
>
> can u guys plz help me how to insert items from a java program ...
>
> Krishna

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to