[OTDev] Representing parameters with optional values ...

chung chvng at mail.ntua.gr
Sat May 14 21:45:54 CEST 2011


Hi surajit,
    First of all I think it's impossible to have the XSD datatype there
except if you declare it additionally. We can have a property that maps
ot:Parameter-type individuals to XSD datatype URIs or we can subclass
ot:Parameter and introduce ot:StringParameter etc. Instead, I would ask
what is the purpose of having the datatype in there. And the answer is,
to provide information to the client regarding the expected type for the
particular parameter. This however can be retrieved by an OPTIONS on the
resource  (see latest ontology update and specification for OPTIONS).
We've already implemented this method for most of our resources.
RDF-formatted OPTIONS can even lead to automatically generated web
interfaces for web services!

Evaluated runtime is not a parameter in the OT sense as it is not
something expected by the client as input. This can be assigned to your
node using some other ontological property (e.g. ot:evaluatedRuntime) or
you can include it only in HTML representations and not in RDF.

Best regards,
Pantelis

On Sat, 2011-05-14 at 11:43 +0530, surajit ray wrote:

> Hi Nina, All,
> 
> For the algorithm API we have to attach parameters which are
> represented with a scope, a default value (with type) , and the name
> and description.
> 
> However some parameters may not have a default value. For example if
> the default value is a function of another set of parameters OR it is
> evaluated runtime (although may be overriden by a fixed value by the
> user). In such cases there will be no default value. In this case how
> to we mention the XSD TYPE. (See the comented line below).
> 
> 
>             Individual parameter31 =
> jenaModel.createIndividual(OT.OTClass.Parameter.getOntClass(jenaModel));
>             //parameter31.addLiteral(OT.paramValue,
> jenaModel.createTypedLiteral("", XSDDatatype.XSDfloat));
>             parameter31.addLiteral(OT.paramScope,
> jenaModel.createTypedLiteral("optional", XSDDatatype.XSDstring));
>             parameter31.addLiteral(DC.title,
> jenaModel.createTypedLiteral("integer_float_cutoff",
> XSDDatatype.XSDstring));
>             parameter31.addLiteral(DC.description,
> jenaModel.createTypedLiteral("If Integer or Float Feature what is the
> cutoff ? Float value required ", XSDDatatype.XSDstring));
>             MCSSFinder.addProperty(OT.parameters, parameter31);
> 
> 
> To put it simply ...Since the type is associated in the declaration of
> the default value, what is the mechanism to mention the type when
> there is no default value ?
> 
> Thanx
> Surajit
> _______________________________________________
> Development mailing list
> Development at opentox.org
> http://www.opentox.org/mailman/listinfo/development
> 





More information about the Development mailing list