no.ubicollab.osgi
Class Service

java.lang.Object
  extended by no.ubicollab.osgi.Service

public class Service
extends java.lang.Object

The Service Class is intended to be a general class to hold information about a service which have been found and registered by a plugin.

Since:
0.1
Version:
0.3
Author:
Kim-Steve Johansen

Constructor Summary
Service()
          Constructor to create an empty Service object.
Service(java.lang.String name, java.lang.String serviceURI, java.lang.String location, java.lang.String sdProtocol, java.lang.String owner, java.lang.String descriptionUri, java.lang.String type, java.lang.String description)
          Constructor for creating an Service object and setting the describing parameters at the same time.
 
Method Summary
 java.lang.String getDescription()
          Gets the description attribute for the service.
 java.lang.String getDescriptionURI()
          Gets the description URI.
 java.lang.String getLocation()
          Gets the location attribute for the service.
 java.lang.String getName()
          Gets the name.
 java.lang.String getOwner()
          Gets the owner attribute.
 java.lang.String getSdProtocol()
          Gets the Service Discovery protocol attribute for the service.
 java.lang.String getServiceURI()
          Gets the service URI.
 java.lang.String getType()
          Gets the service type attribute.
 java.lang.String getXML()
          Gets the XML represenatation for the service.
 void setDescription(java.lang.String description)
          Sets the description attribute for the service.
 void setDescriptionURI(java.lang.String descriptionURI)
          Sets the description URI.
 void setLocation(java.lang.String location)
          Sets the location attribute for the service.
 void setName(java.lang.String name)
          Sets the name.
 void setOwner(java.lang.String owner)
          Sets the service owner attribute.
 void setSdProtocol(java.lang.String sdProtocol)
          Sets the Service Discovery protocol attribute for the service.
 void setServiceURI(java.lang.String serviceURI)
          Sets the service URI.
 void setType(java.lang.String type)
          Sets the service type attribute.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Service

public Service()
Constructor to create an empty Service object.


Service

public Service(java.lang.String name,
               java.lang.String serviceURI,
               java.lang.String location,
               java.lang.String sdProtocol,
               java.lang.String owner,
               java.lang.String descriptionUri,
               java.lang.String type,
               java.lang.String description)
Constructor for creating an Service object and setting the describing parameters at the same time.

Parameters:
type - the service type
descriptionUri - the service description uri
owner - the owner of the service
description - the textual service description
sdProtocol - the sd protocol that discovered the service
location - the location of the service
name - the name of the service
serviceURI - the service invocation URI
Method Detail

getXML

public java.lang.String getXML()
Gets the XML represenatation for the service.

The format of the returned xml-document contained in a String is as follows:

 <Service Protocol="String" 
    Name="String" 
    ServiceUri="String" 
    Location="String" 
    Owner="String" 
    DescriptionUri="String"
    Type="String" 
    Description="String"/>

Returns:
the XML representing the service

getName

public java.lang.String getName()
Gets the name.

Returns:
the name

setName

public void setName(java.lang.String name)
Sets the name.

Parameters:
name - the name

getServiceURI

public java.lang.String getServiceURI()
Gets the service URI.

Returns:
the service URI

setServiceURI

public void setServiceURI(java.lang.String serviceURI)
Sets the service URI.

Parameters:
serviceURI - the service URI

getDescriptionURI

public java.lang.String getDescriptionURI()
Gets the description URI.

Returns:
the description URI

setDescriptionURI

public void setDescriptionURI(java.lang.String descriptionURI)
Sets the description URI.

Parameters:
descriptionURI - the description URI

getType

public java.lang.String getType()
Gets the service type attribute.

Returns:
the service type attribute

setType

public void setType(java.lang.String type)
Sets the service type attribute.

Parameters:
type - the service type attribute

getDescription

public java.lang.String getDescription()
Gets the description attribute for the service.

Returns:
the description attribute for the service

setDescription

public void setDescription(java.lang.String description)
Sets the description attribute for the service.

Parameters:
description - the description attribute for the service

getSdProtocol

public java.lang.String getSdProtocol()
Gets the Service Discovery protocol attribute for the service.

Returns:
the Service Discovery protocol attribute for the service

setSdProtocol

public void setSdProtocol(java.lang.String sdProtocol)
Sets the Service Discovery protocol attribute for the service.

Parameters:
sdProtocol - the Service Discovery protocol attribute for the service

getLocation

public java.lang.String getLocation()
Gets the location attribute for the service.

Returns:
the location attribute for the service

setLocation

public void setLocation(java.lang.String location)
Sets the location attribute for the service.

Parameters:
location - the location attribute for the service

getOwner

public java.lang.String getOwner()
Gets the owner attribute.

Returns:
the owner attribute

setOwner

public void setOwner(java.lang.String owner)
Sets the service owner attribute.

Parameters:
owner - the owner of the service