org.gcube.data.tr.requests
Class BindSource

java.lang.Object
  extended by org.gcube.data.tr.requests.AbstractRequest
      extended by org.gcube.data.tr.requests.BindSource
All Implemented Interfaces:
Request

public class BindSource
extends AbstractRequest

A Request for the plugin to create a data source.

A source is created with a name and a Mode of access, Mode.FULLACESSS by default. Optionally, it may have a description and one or more types that label the characterise the structure of the trees that will be stored within it.

Author:
Fabio Simeoni

Constructor Summary
BindSource(String name)
          Creates an instance for a source with a given name.
BindSource(String name, Mode mode)
          Creates an instance for a source with a given name and in a given mode.
 
Method Summary
 void addTypes(QName... types)
          Adds one or more types for the source associated with the request.
 String description()
          Returns the description of the source associated with the request.
 String name()
          Returns the name of the source associated with the request.
 void setDescription(String description)
          Sets a description for the source associated with the request.
 List<QName> types()
          Returns the types of the source associated with the request.
 
Methods inherited from class org.gcube.data.tr.requests.AbstractRequest
equals, hashCode, mode, send, send, send
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindSource

public BindSource(String name)
Creates an instance for a source with a given name.

Parameters:
name - the name

BindSource

public BindSource(String name,
                  Mode mode)
Creates an instance for a source with a given name and in a given mode.

Parameters:
name - the name
Method Detail

name

public String name()
Returns the name of the source associated with the request.

Returns:
the name

types

public List<QName> types()
Returns the types of the source associated with the request.

Returns:
the types

addTypes

public void addTypes(QName... types)
              throws IllegalArgumentException
Adds one or more types for the source associated with the request.

Parameters:
types - the types
Throws:
IllegalArgumentException - if the input is null

setDescription

public void setDescription(String description)
Sets a description for the source associated with the request.

Parameters:
description - the description

description

public String description()
Returns the description of the source associated with the request.

Returns:
the description


Copyright © 2012. All Rights Reserved.