org.gcube.data.tml.clients.queries
Class SourceQueryBuilder

java.lang.Object
  extended by org.gcube.data.tml.clients.queries.SourceQueryBuilder

public class SourceQueryBuilder
extends Object

Builds queries for Tree Manager services that give read or write access to data sources.

Author:
Fabio Simeoni

Constructor Summary
protected SourceQueryBuilder(AbstractProvider<?> provider)
           
 
Method Summary
 org.gcube.common.clients.gcore.StatefulQuery build()
          Returns the query.
 String toString()
           
 SourceQueryBuilder withId(String id)
          Sets a source identifier on the query.
 SourceQueryBuilder withName(String name)
          Sets a source name on the query.
 SourceQueryBuilder withPlugin(String name)
          Sets a plugin on the query.
 SourceQueryBuilder withProperty(String name, String value)
          Sets a source property on the query.
 SourceQueryBuilder withType(QName type)
          Sets a source type on the query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SourceQueryBuilder

protected SourceQueryBuilder(AbstractProvider<?> provider)
Method Detail

withId

public SourceQueryBuilder withId(String id)
Sets a source identifier on the query.

Parameters:
id - the identifier
Returns:
this builder

withName

public SourceQueryBuilder withName(String name)
Sets a source name on the query.

Parameters:
name - the name
Returns:
this builder

withType

public SourceQueryBuilder withType(QName type)
Sets a source type on the query.

Parameters:
name - the type
Returns:
this builder

withPlugin

public SourceQueryBuilder withPlugin(String name)
Sets a plugin on the query.

Parameters:
name - the plugin name
Returns:
this builder

withProperty

public SourceQueryBuilder withProperty(String name,
                                       String value)
Sets a source property on the query.

Parameters:
name - the name of the property
value - the value of the property
Returns:

build

public org.gcube.common.clients.gcore.StatefulQuery build()
Returns the query.

Returns:
the query.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.