ch.ethz.iks.slp
Class ServiceType

Package class diagram package ServiceType
java.lang.Object
  extended by ch.ethz.iks.slp.ServiceType
All Implemented Interfaces:
Serializable

public final class ServiceType
extends Object
implements Serializable

Implementation of the SLP ServiceType class defined in RFC 2614.

Since:
0.1
Author:
Jan S. Rellermeyer, Systems Group, ETH Zurich, Patrick Callis, Solers Corp.
See Also:
Serialized Form

Constructor Summary
ServiceType(String serviceType)
          creates a new ServiceType instance.
 
Method Summary
 boolean equals(Object obj)
          check if two ServiceTypes are equal.
 String getAbstractTypeName()
          get the name of the abstract type of this ServiceType instance.
 String getConcreteTypeName()
          get the concrete type part of this ServiceType instance.
 String getNamingAuthority()
          get the naming authority.
 String getPrincipleTypeName()
          get the principle type part of this ServiceType instance.
 int hashCode()
          get the hashCode of this ServiceType instance.
 boolean isAbstractType()
          is the ServiceType instance an abstract type ?
 boolean isNADefault()
          is the naming authority default (IANA) ?
 boolean isServiceURL()
          is the ServiceType instance a ServiceURL ?
 boolean matches(Object obj)
          check if a ServiceType matches a ServiceURL or another ServiceType.
 String toString()
          get a String representation of this ServiceType instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceType

public ServiceType(String serviceType)
creates a new ServiceType instance.

Parameters:
serviceType - the string representation of a ServiceType, e.g.
      service:osgi:remote
 
Method Detail

isServiceURL

public boolean isServiceURL()
is the ServiceType instance a ServiceURL ?

Returns:
true if this is the case.

isAbstractType

public boolean isAbstractType()
is the ServiceType instance an abstract type ?

Returns:
true if thie is the case.

isNADefault

public boolean isNADefault()
is the naming authority default (IANA) ?

Returns:
true if this is the case.

getConcreteTypeName

public String getConcreteTypeName()
get the concrete type part of this ServiceType instance.

Returns:
a String representing the concrete type.

getPrincipleTypeName

public String getPrincipleTypeName()
get the principle type part of this ServiceType instance.

Returns:
a String representing the principle part.

getAbstractTypeName

public String getAbstractTypeName()
get the name of the abstract type of this ServiceType instance.

Returns:
a String representing the abstract type.

getNamingAuthority

public String getNamingAuthority()
get the naming authority.

Returns:
the naming authority.

equals

public boolean equals(Object obj)
check if two ServiceTypes are equal.

Overrides:
equals in class Object
Parameters:
obj - another ServiceType.
Returns:
true if they equal.

matches

public boolean matches(Object obj)
check if a ServiceType matches a ServiceURL or another ServiceType.

Parameters:
obj - the object to be compared to.
Returns:
true if this type matches the other object.

toString

public String toString()
get a String representation of this ServiceType instance.

Overrides:
toString in class Object
Returns:
the String representation.

hashCode

public int hashCode()
get the hashCode of this ServiceType instance.

Overrides:
hashCode in class Object
Returns:
the int value of the hashCode.


Copyright © 2014 universAAL Consortium. All Rights Reserved.