Hi Galella

I have attached a sample code. You need more help please contact me.


String[] resultFields = new String[] { "pid", "subject", "title" };
ArrayList<Condition> conditionList = new ArrayList<Condition> ();
                
Condition cond1 = new Condition();
cond1.setProperty("dcsubject");
cond1.setOperator(ComparisonOperator.fromValue(ComparisonOperator._has));
cond1.setValue(fullname);
conditionList.add(cond1);
                
Condition cond2 = new Condition();
cond2.setProperty("dctype");
cond2.setOperator(ComparisonOperator.fromValue(ComparisonOperator._has));
cond2.setValue("person");
conditionList.add(cond2);
                
Condition[] c = new Condition[conditionList.size()];
FieldSearchQuery query = new FieldSearchQuery();
query.setConditions(conditionList.toArray(c));
FieldSearchResult result  = new FieldSearchResult();
result = fedoraSOAPClient.findObjects(resultFields, new  
NonNegativeInteger("100"), query);
return result;


Regards
Nilani



Nilani Ganeshwaran
Institutional Repository Technical Support and Software Developer
 
Tel: +44 (0)161 275 8728 (internal x58728)
Email: [email protected]
Web: http://www.manchester.ac.uk/institutionalrepositoryproject
-----Original Message-----
From: Vincenzo Galella [mailto:[email protected]] 
Sent: 09 February 2009 15:13
To: [email protected]
Subject: [Fedora-commons-developers] Query with Java

Hi,
I need to make a query with APIA Java.

looking the Source Code, I tried with these lines, but I did not
understand how to use well this.

    Condition[] cons = {new
Condition("identifier",ComparisonOperator.eq,"demo:10")};
            FieldSearchQuery q = new FieldSearchQuery(cons,"*demo*");
 
            AutoFinder finder = new AutoFinder(fc.getAPIA());
            String[] resultFields={"title","identifier","creator"};
            FieldSearchResult result = finder.findObjects(resultFields,
100, q);

How I can make a query to find all the data object (I need their pid)
who have, for example, dc:identifier equals to '742389' ?

Thank's
V.Galella



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Fedora-commons-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Fedora-commons-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers

Reply via email to