i had problem with statement search how to write the code if i am using xpath as string type
please help....
please help....
public void statementSearch()
{
String token=null;
OKMAuthProxy authP=new OKMAuthProxy();
List filePath=new ArrayList();
try
{
token=authP.login("okmAdmin","admin");
System.out.println("token"+token);
OKMSearchProxy con=new OKMSearchProxy();
System.out.println("2");
//con.findByContent("token","i");
//System.out.println("Object created")
// System.out.println("2");
QueryResult [] qR=con.findByStatement(token, txtsearch.getText(),"xpath");
System.out.println("22");
alert("before for loop");
for(int j=0;j<qR.length;j++)
{
//alert("Author:"+qR[j].getDocument().getAuthor());
filePath.add(qR[j].getDocument().getPath());
alert("data");
//String f=qR[j].getDocument().toString();
}
alert("after for loop");
ListModel lstsearch=new SimpleListModel(filePath);
lstSearch.setModel(lstsearch);
System.out.println("3");
authP.logout(token);
}
catch(Exception e)
{
try
{
authP.logout(token);
}
catch(Exception ex)
{
System.out.println("ex:"+ex);
}
System.out.println("e:"+e);
}
}
/jcr:root/okm:root/Type1/Category 1/Sub-Category 1//element(*, okm:document)