git-svn-id: https://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/Common/storagehub-client@169435 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4af9f3bf64
commit
4209d0d5a7
|
@ -37,7 +37,7 @@ public class ItemManagerPlugin extends AbstractPlugin<WebTarget, ItemManagerClie
|
|||
Node node =result.getNode();
|
||||
Node child=node.getFirstChild();
|
||||
String address = child.getTextContent();
|
||||
GcubeService service = GcubeService.service().withName(Constants.MANAGER_QNAME).andPath("item");
|
||||
GcubeService service = GcubeService.service().withName(Constants.MANAGER_QNAME).andPath("items");
|
||||
return TargetFactory.stubFor(service).at(address);
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public class Items {
|
|||
|
||||
String afi = null;
|
||||
try (InputStream is = new FileInputStream(new File("/home/lucio/Downloads/rockandroll.jpeg"))){
|
||||
afi = shc.getWSRoot().uploadFile(is, "tes-image.jpeg", "descr").get().getId();
|
||||
shc.getWSRoot().uploadFile(is, "tes-image.jpeg", "descr");
|
||||
|
||||
System.out.println(afi);
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -23,6 +23,7 @@ import org.gcube.common.storagehub.model.expressions.date.Before;
|
|||
import org.gcube.common.storagehub.model.expressions.logical.And;
|
||||
import org.gcube.common.storagehub.model.expressions.logical.ISDescendant;
|
||||
import org.gcube.common.storagehub.model.expressions.text.Contains;
|
||||
import org.gcube.common.storagehub.model.expressions.text.Like;
|
||||
import org.gcube.common.storagehub.model.items.AbstractFileItem;
|
||||
import org.gcube.common.storagehub.model.items.Item;
|
||||
import org.gcube.common.storagehub.model.query.Queries;
|
||||
|
@ -176,9 +177,10 @@ public class TestCall {
|
|||
WorkspaceManagerClient wsclient = AbstractPlugin.workspace().build();
|
||||
//String path = wsclient.getVreFolder("hl:accounting").getPath();
|
||||
//System.out.println("path is "+path);
|
||||
query.setExpression(new ISDescendant(Paths.getPath("/Home/massimiliano.assante/Workspace/MySpecialFolders/gcube-devNext-NextNext/")));
|
||||
query.setExpression(new And(new ISDescendant(Paths.getPath("/Home/massimiliano.assante/Workspace/MySpecialFolders/gcube-devNext-NextNext/")),
|
||||
new Like(GenericSearchableItem.get().title,"title")));
|
||||
query.setLimit(10);
|
||||
query.setOrder(new OrderField(GenericSearchableItem.get().lastModification,MODE.DESC));
|
||||
query.setOrder(new OrderField(GenericSearchableItem.get().title));
|
||||
List<? extends Item> items = wsclient.search(query, "hl:accounting", "jcr:content");
|
||||
for (Item item: items) {
|
||||
System.out.println(item.getName()+" "+item.getLastModificationTime().getTimeInMillis());
|
||||
|
|
Loading…
Reference in New Issue