eu.planets_project.services.datatypes
Class ServiceDescription.Builder
java.lang.Object
eu.planets_project.services.datatypes.ServiceDescription.Builder
- Enclosing class:
- ServiceDescription
public static final class ServiceDescription.Builder
- extends java.lang.Object
Builder for ServiceDescription instances. Using a builder ensures
consistent object state during creation and models optional named
constructor parameters while allowing immutable objects.
- See Also:
eu.planets_project.services.datatypes.ServiceDescriptionTest
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceDescription.Builder
public ServiceDescription.Builder(java.lang.String name,
java.lang.String type)
- Parameters:
name
- The nametype
- The type
ServiceDescription.Builder
public ServiceDescription.Builder(java.lang.String xml)
- Parameters:
xml
- The XML of a service description to use as a template for
creating a new service description
ServiceDescription.Builder
public ServiceDescription.Builder(ServiceDescription serviceDescription)
- Parameters:
serviceDescription
- The service description to use as a
template for creating a new service description
build
public ServiceDescription build()
- Returns:
- The instance created using this builder.
name
public ServiceDescription.Builder name(java.lang.String name)
- Parameters:
name
- The service name
- Returns:
- The builder, for cascaded calls
type
public ServiceDescription.Builder type(java.lang.String type)
- Parameters:
type
- The service type, i.e. the interface implemented
- Returns:
- The builder, for cascaded calls
endpoint
public ServiceDescription.Builder endpoint(java.net.URL endpoint)
- Parameters:
endpoint
- The endpoint for this service
- Returns:
- The builder, for cascaded calls
paths
public ServiceDescription.Builder paths(MigrationPath... paths)
- Parameters:
paths
- The migration paths supported by the service
- Returns:
- The builder, for cascaded calls
properties
public ServiceDescription.Builder properties(Property... properties)
- Parameters:
properties
- Properties for the service
- Returns:
- The builder, for cascaded calls
inputFormats
public ServiceDescription.Builder inputFormats(java.net.URI... inputFormats)
- Parameters:
inputFormats
- The input formats supported by the service
- Returns:
- The builder, for cascaded calls
logo
public ServiceDescription.Builder logo(java.net.URI logo)
- Parameters:
logo
- The logo
- Returns:
- The builder, for cascaded calls
furtherInfo
public ServiceDescription.Builder furtherInfo(java.net.URI furtherInfo)
- Parameters:
furtherInfo
- Further infor on the service
- Returns:
- The builder, for cascaded calls
instructions
public ServiceDescription.Builder instructions(java.lang.String instructions)
- Parameters:
instructions
- The service instructions
- Returns:
- The builder, for cascaded calls
serviceProvider
public ServiceDescription.Builder serviceProvider(java.lang.String serviceProvider)
- Parameters:
serviceProvider
- The providing organization
- Returns:
- The builder, for cascaded calls
author
public ServiceDescription.Builder author(java.lang.String author)
- Parameters:
author
- The service author
- Returns:
- The builder, for cascaded calls
identifier
public ServiceDescription.Builder identifier(java.lang.String identifier)
- Parameters:
identifier
- An identifier for the service
- Returns:
- The builder, for cascaded calls
version
public ServiceDescription.Builder version(java.lang.String version)
- Parameters:
version
- The service version
- Returns:
- The builder, for cascaded calls
description
public ServiceDescription.Builder description(java.lang.String description)
- Parameters:
description
- A description of the service
- Returns:
- The builder, for cascaded calls
classname
public ServiceDescription.Builder classname(java.lang.String classname)
- Parameters:
classname
- The name of the class implementing the service
- Returns:
- The builder, for cascaded calls
parameters
public ServiceDescription.Builder parameters(java.util.List<Parameter> parameters)
- Parameters:
parameters
- The service parameters
- Returns:
- The builder, for cascaded calls
tool
public ServiceDescription.Builder tool(Tool tool)
- Parameters:
tool
- The tool the service uses
- Returns:
- The builder, for cascaded calls
Copyright © 2007-2010 The Planets Consortium. All Rights Reserved.