org.gcube.data.tm.services
Class TWriterService

java.lang.Object
  extended by org.gcube.data.tm.services.TWriterService

public class TWriterService
extends Object

The implementation of the T-Writer service.

Author:
Lucio Lelii (CNR-ISTI), Fabio Simeoni

Constructor Summary
TWriterService()
           
 
Method Summary
 org.gcube.data.tm.stubs.AnyHolder add(org.gcube.data.tm.stubs.AnyHolder tree)
          Adds a Tree to the bound source.
 String addRS(String locator)
          Adds many Trees to the bound source.
 TWriterResource resource()
          Returns the state of the service.
 org.gcube.data.tm.stubs.AnyHolder update(org.gcube.data.tm.stubs.AnyHolder delta)
          Updates a Tree in the bound source.
 String updateRS(String locator)
          Updates Trees in the bound source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TWriterService

public TWriterService()
Method Detail

resource

public TWriterResource resource()
                         throws Exception
Returns the state of the service.

Returns:
the state
Throws:
org.gcube.common.core.faults.GCUBEFault - if the operation fails for an unexpected error
Exception

add

public org.gcube.data.tm.stubs.AnyHolder add(org.gcube.data.tm.stubs.AnyHolder tree)
                                      throws org.gcube.data.tm.stubs.UnsupportedOperationFault,
                                             org.gcube.data.tm.stubs.UnsupportedRequestFault,
                                             org.gcube.data.tm.stubs.InvalidTreeFault,
                                             org.gcube.common.core.faults.GCUBEFault
Adds a Tree to the bound source.

Parameters:
tree - an AnyHolder with the DOM representation of the tree
Returns:
an AnyHolder with the DOM representation of the added tree, possibly annotated with metadata added at the time of addition.
Throws:
org.gcube.data.tm.stubs.UnsupportedOperationFault - if the data source does not support this operation
org.gcube.data.tm.stubs.UnsupportedRequestFault - if the target plugin does not support this particular request
InvalidDocumentFault - if the tree is invalid
org.gcube.common.core.faults.GCUBEFault - if the operation fails for an unexpected error
org.gcube.data.tm.stubs.InvalidTreeFault

addRS

public String addRS(String locator)
             throws org.gcube.data.tm.stubs.UnsupportedOperationFault,
                    org.gcube.data.tm.stubs.UnsupportedRequestFault,
                    org.gcube.common.core.faults.GCUBEFault
Adds many Trees to the bound source.

Parameters:
locator - a locator to a remote Result Set with the trees
Returns:
a locator to a local Result Set with AddOutcomes.
Throws:
org.gcube.data.tm.stubs.UnsupportedOperationFault - if the data source does not support this operation
org.gcube.data.tm.stubs.UnsupportedRequestFault - if the target plugin does not support this particular request
org.gcube.common.core.faults.GCUBEFault - if the operation fails for an unexpected error

update

public org.gcube.data.tm.stubs.AnyHolder update(org.gcube.data.tm.stubs.AnyHolder delta)
                                         throws org.gcube.data.tm.stubs.UnsupportedOperationFault,
                                                org.gcube.data.tm.stubs.UnsupportedRequestFault,
                                                org.gcube.data.tm.stubs.UnknownTreeFault,
                                                org.gcube.data.tm.stubs.InvalidTreeFault,
                                                org.gcube.common.core.faults.GCUBEFault
Updates a Tree in the bound source.

Parameters:
delta - an AnyHolder with the DOM representation of the delta tree that captures the changes to the tree
Returns:
an AnyHolder with the DOM representation of the updated tree, possibly annotated with metadata added at the time of update.
Throws:
org.gcube.data.tm.stubs.UnsupportedOperationFault - if the data source does not support this operation
org.gcube.data.tm.stubs.UnsupportedRequestFault - if the target plugin does not support this particular request
org.gcube.data.tm.stubs.UnknownTreeFault - if the tree does not exist in the bound source
InvalidDocumentFault - if the tree is invalid
org.gcube.common.core.faults.GCUBEFault - if the operation fails for an unexpected error
org.gcube.data.tm.stubs.InvalidTreeFault

updateRS

public String updateRS(String locator)
                throws org.gcube.data.tm.stubs.UnsupportedOperationFault,
                       org.gcube.data.tm.stubs.UnsupportedRequestFault,
                       org.gcube.common.core.faults.GCUBEFault
Updates Trees in the bound source.

Parameters:
locator - a locator to a remote Result Set with the trees
Returns:
a locator to a Result Set with UpdateFailures
Throws:
org.gcube.data.tm.stubs.UnsupportedOperationFault - if the data source does not support this operation
org.gcube.data.tm.stubs.UnsupportedRequestFault - if the target plugin does not support this particular request
org.gcube.common.core.faults.GCUBEFault - if the operation fails for an unexpected error


Copyright © 2013. All Rights Reserved.