org.universAAL.middleware.service.owls.profile
Class ProfileParameter

Package class diagram package ProfileParameter
java.lang.Object
  extended by org.universAAL.middleware.rdf.Resource
      extended by org.universAAL.middleware.rdf.FinalizedResource
          extended by org.universAAL.middleware.service.owls.profile.ProfileParameter
Direct Known Subclasses:
MultiLocationParameter, NumberOfSamples, QoSRating, ResponseTimeInMilliseconds, SingleLocationParameter

public abstract class ProfileParameter
extends FinalizedResource

Implementation of http://www.daml.org/services/owl-s/1.1/Profile.owl#ServiceParameter, usually covering the non-functional parameters. The type hierarchy of such parameters (see example classes defined in this package and example instances in ServiceProfile) should reflect the semantic of the parameter. Two standard properties are defined by OWL-S: serviceParameterName (the name of the actual parameter) and sParameter (an owl:Thing pointing to the value of the parameter), both mandatory. universAAL modifies this class the following way:

Author:
mtazari - Saied Tazari

Field Summary
static String MY_URI
           
static String PROP_OWLS_PROFILE_S_PARAMETER
           
static String PROP_OWLS_PROFILE_SERVICE_PARAMETER_NAME
           
static String PROP_uAAL_PARAMETER_VALUE_DATA
           
 
Fields inherited from class org.universAAL.middleware.rdf.Resource
ANON_URI_PREFIX, blockAddingTypes, isXMLLiteral, ns_delim_index, PROP_RDF_FIRST, PROP_RDF_REST, PROP_RDF_TYPE, PROP_RDFS_COMMENT, PROP_RDFS_LABEL, PROP_SERIALIZATION_FULL, PROP_SERIALIZATION_OPTIONAL, PROP_SERIALIZATION_REDUCED, PROP_SERIALIZATION_UNDEFINED, PROP_uAAL_INVOLVED_HUMAN_USER, props, RDF_EMPTY_LIST, RDF_NAMESPACE, RDFS_NAMESPACE, TYPE_RDF_LIST, TYPE_RDFS_CLASS, uAAL_NAMESPACE_PREFIX, uAAL_SERVICE_NAMESPACE, uAAL_VOCABULARY_NAMESPACE, uri
 
Constructor Summary
protected ProfileParameter()
           
protected ProfileParameter(String uri)
           
 
Method Summary
 String getName()
          The method returns the name of the name of the property (profile service parameter)
 int getPropSerializationType(String propURI)
          Returns Resource.PROP_SERIALIZATION_REDUCED for the predefined properties otherwise Resource.PROP_SERIALIZATION_OPTIONAL.
 Object getValue()
          The method returns the value of the specified parameter.
 boolean isWellFormed()
          Returns true, if the state of the resource is valid, otherwise false.
 boolean setProperty(String propURI, Object value)
          Adds a statement with this resource as the subject, the given propURI as the predicate and the given value as the object.
 
Methods inherited from class org.universAAL.middleware.rdf.FinalizedResource
addType, getLocalName, getNamespace, getProperty, getPropertyURIs, getType, getTypes, getURI, hasQualifiedName, isAnon, numberOfProperties
 
Methods inherited from class org.universAAL.middleware.rdf.Resource
addMultiLangProp, asList, asList, asRDFList, changeProperty, copy, deepCopy, equals, generateAnonURI, getDefaultLang, getFilename, getMultiLangProp, getOrConstructLabel, getResource, getResourceComment, getResourceLabel, getStaticFieldValue, hashCode, hasProperty, isAnon, isBlockingAddingTypes, isClosedCollection, isQualifiedName, literal, representsQualifiedURI, serializesAsXMLLiteral, setPropertyPath, setPropertyPath, setPropertyPathFromOffset, setResourceComment, setResourceLabel, toString, toStringRecursive, toStringRecursive, unliteral
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MY_URI

public static final String MY_URI
See Also:
Constant Field Values

PROP_OWLS_PROFILE_SERVICE_PARAMETER_NAME

public static final String PROP_OWLS_PROFILE_SERVICE_PARAMETER_NAME
See Also:
Constant Field Values

PROP_OWLS_PROFILE_S_PARAMETER

public static final String PROP_OWLS_PROFILE_S_PARAMETER
See Also:
Constant Field Values

PROP_uAAL_PARAMETER_VALUE_DATA

public static final String PROP_uAAL_PARAMETER_VALUE_DATA
See Also:
Constant Field Values
Constructor Detail

ProfileParameter

protected ProfileParameter()

ProfileParameter

protected ProfileParameter(String uri)
Method Detail

getPropSerializationType

public int getPropSerializationType(String propURI)
Returns Resource.PROP_SERIALIZATION_REDUCED for the predefined properties otherwise Resource.PROP_SERIALIZATION_OPTIONAL. As the only non-literal property is sParameter, it is assumed that for such as parameter value, e.g. a location, the basic properties would be enough for the evaluation of such a non-functional parameter. The two other properties will have always literal values and there would make no difference to return Resource.PROP_SERIALIZATION_REDUCED or Resource.PROP_SERIALIZATION_FULL.

Overrides:
getPropSerializationType in class Resource
See Also:
Resource.getPropSerializationType(java.lang.String)

getName

public String getName()
The method returns the name of the name of the property (profile service parameter)

Returns:
name of property name for parameter (String)

getValue

public Object getValue()
The method returns the value of the specified parameter.

Returns:
parameter value

isWellFormed

public boolean isWellFormed()
Description copied from class: Resource
Returns true, if the state of the resource is valid, otherwise false.

Subclasses should overwrite this methods as the default implementation returns always true.

Overrides:
isWellFormed in class Resource
See Also:
Resource.isWellFormed()

setProperty

public boolean setProperty(String propURI,
                           Object value)
Description copied from class: Resource
Adds a statement with this resource as the subject, the given propURI as the predicate and the given value as the object. Subclasses must override this in order to decide if the statement to be added fits the general class constraints. If not, the call of this method should be ignored. For each property only one single call may be made to this method, unless subsequent calls to this method for setting the value of the same property are treated as an update for an update-able property. Multi-valued properties must be set using an instance of List. The differentiation, if a such list should be treated as an rdf:List, can be made with the help of Resource.isClosedCollection(String). The default implementation here accepts all property-value pairs blindly except for rdf:type which is handled if the value is a type URI, a Resource or a java.util.List of them.

Note: The setting of the property rdf:type is being handled by this class via the final methods Resource.addType(String, boolean), Resource.getType(), and Resource.getTypes(). Although these methods give the view of handling type URIs as strings, but in reality the types are stored as direct instances of this class. So, the subclasses should ignore calls for setting rdf:type; if not, then the subclass must pay attention that the value should be a List of direct instances of this class so that (1) the Resource.toString() method returns just the URI and (2) the serializers get no problems with the value. Also, settings via subclasses may be overwritten by this class if a subsequent call to Resource.addType(String, boolean) is made.

Overrides:
setProperty in class Resource
Returns:
true if the property changed as a result of the call
See Also:
Resource.setProperty(String, Object)


Copyright © 2014 universAAL Consortium. All Rights Reserved.