[OTDev] Performance testing and monitoring
surajit ray mr.surajit.ray at gmail.comSun Mar 21 17:42:19 CET 2010
- Previous message: [OTDev] Performance testing and monitoring
- Next message: [OTDev] Performance testing and monitoring
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Nina, this is them code generating the curl output for model OntModel jenaModel = createJenaRDFModel(); OT.OTClass.Model.createOntClass(jenaModel); Individual model = jenaModel.createIndividual(MaxtoxApplicationSettings.getServerRootPath() + "/model/" + model_number, OT.OTClass.Model.getOntClass(jenaModel)); model.addLiteral(DC.title, jenaModel.createTypedLiteral("Model Number : " + model_number, XSDDatatype.XSDstring)); model.addLiteral(DC.description, jenaModel.createTypedLiteral(modelDetails.get("description"), XSDDatatype.XSDstring)); model.addLiteral(DC.identifier, jenaModel.createTypedLiteral(MaxtoxApplicationSettings.getServerRootPath() + "/model/" + model_number, XSDDatatype.XSDanyURI)); model.addProperty(OT.isA, " http://www.opentox.org/modelTypes.owl#MCSSBasedToxicityPredictor"); Individual dictionaryProducingDataset = jenaModel.createIndividual(OT.OTClass.Dataset.getOntClass(jenaModel)); dictionaryProducingDataset.addLiteral(DC.title, jenaModel.createTypedLiteral("dictionaryProducingDataset", XSDDatatype.XSDstring)); dictionaryProducingDataset.addLiteral(DC.description, jenaModel.createTypedLiteral("The dataset which was used to get the fragments in the dictionary for this model", XSDDatatype.XSDstring)); dictionaryProducingDataset.addLiteral(DC.identifier, jenaModel.createTypedLiteral(modelDetails.get("dataset_uri"), XSDDatatype.XSDanyURI)); model.addProperty(OT.trainingDataset, dictionaryProducingDataset); Individual fragmentDataset = jenaModel.createIndividual(OT.OTClass.Dataset.getOntClass(jenaModel)); fragmentDataset.addLiteral(DC.title, jenaModel.createTypedLiteral("fragmentDataset", XSDDatatype.XSDstring)); fragmentDataset.addLiteral(DC.description, jenaModel.createTypedLiteral("The dataset which shows all the fragments in the dictionary", XSDDatatype.XSDstring)); fragmentDataset.addLiteral(DC.identifier, jenaModel.createTypedLiteral(modelDetails.get("fragmentset_uri"), XSDDatatype.XSDanyURI)); model.addProperty(OT.trainingDataset, fragmentDataset); Individual endpoint = jenaModel.createIndividual(OT.OTClass.Parameter.getOntClass(jenaModel)); endpoint.addLiteral(DC.title, jenaModel.createTypedLiteral("ToxicityEndpoint", XSDDatatype.XSDstring)); endpoint.addLiteral(DC.description, jenaModel.createTypedLiteral(modelDetails.get("endpoint"), XSDDatatype.XSDstring)); //endpoint.addLiteral(DC.identifier, jenaModel.createTypedLiteral(MaxtoxApplicationSettings.getServerRootPath() + "/parameter/moleculeSizeCutoffParameter", XSDDatatype.XSDanyURI)); model.addProperty(OT.parameters, endpoint); Individual compound_uri = jenaModel.createIndividual(OT.OTClass.Parameter.getOntClass(jenaModel)); compound_uri.addLiteral(DC.title, jenaModel.createTypedLiteral("compound_uri", XSDDatatype.XSDstring)); compound_uri.addLiteral(DC.description, jenaModel.createTypedLiteral("URI of compound whose toxicity needs to be predicted.", XSDDatatype.XSDstring)); compound_uri.addLiteral(DC.identifier, jenaModel.createTypedLiteral(MaxtoxApplicationSettings.getServerRootPath() + "/parameter/compound_uri", XSDDatatype.XSDanyURI)); compound_uri.addLiteral(OT.paramValue, jenaModel.createTypedLiteral("Any URI", XSDDatatype.XSDstring)); compound_uri.addLiteral(OT.paramScope, jenaModel.createTypedLiteral("mandatory", XSDDatatype.XSDstring)); model.addProperty(OT.parameters, compound_uri); Could you tell me how to do it correctly ? Cheers Surajit On Thu, Mar 18, 2010 at 9:28 PM, Nina Jeliazkova <nina at acad.bg> wrote: > Hello Surajit, > > >> > > > > curl http://opentox2.informatik.uni-freiburg.de:8080/MaxtoxTest/model< > http://opentox2.informatik.uni-freiburg.de:8080/MaxtoxTest/rest/model> > > > > > > should return what you want .... just remove the rest word in the middle > > .... > > > Having a look at RDF output of the model > http://opentox2.informatik.uni-freiburg.de:8080/MaxtoxTest/model , I > have the following comments : > > > <rdf:RDF > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:ot="http://www.opentox.org/api/1.1#" > xmlns:owl="http://www.w3.org/2002/07/owl#" > xmlns:dc="http://purl.org/dc/elements/1.1/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema#" > xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> > <owl:Class rdf:about="http://www.opentox.org/api/1.1#Model"/> > // this is fine > <ot:Model > rdf:about=" > http://opentox2.informatik.uni-freiburg.de:8080/MaxtoxTest/model/1"> > //ot:parameters are meant to hold parameters specific for model > calculations, e.g. max number of decision tree nodes , not clear how > dc:description and dc:title here are related to parameters > <ot:parameters rdf:parseType="Resource"> > <dc:description > rdf:datatype="http://www.w3.org/2001/XMLSchema#string" > >mutagenic activity in Salmonella typhimurium > TA100</dc:description> > <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" > >ToxicityEndpoint</dc:title> > </ot:parameters> > > /*The dataset should be defined as ot:Dataset object and the > trainingDataset property should look like > <ot:trainingDataset> <ot:Dataset > rdf:about="http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/194"/> > </ot:trainingDataset> > > otherwise, as it is written currently, it will not be recognized as a > dataset (and owl validation might fail ) > */ > > > <ot:trainingDataset rdf:parseType="Resource"> > <dc:identifier > rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI" > > > > http://opentox2.informatik.uni-freiburg.de:8080/MaxtoxTest/dataset/FT_1 > </dc:identifier> > <dc:description > rdf:datatype="http://www.w3.org/2001/XMLSchema#string" > >The dataset which shows all the fragments in the > dictionary</dc:description> > <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" > >fragmentDataset</dc:title> > </ot:trainingDataset> > <ot:trainingDataset rdf:parseType="Resource"> > <dc:identifier > rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI" > > > > http://opentox2.informatik.uni-freiburg.de:8080/MaxtoxTest/dataset/MT_1 > </dc:identifier> > <dc:description > rdf:datatype="http://www.w3.org/2001/XMLSchema#string" > >The dataset which was used to get the fragments in the > dictionary for this model</dc:description> > <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" > >dictionaryProducingDataset</dc:title> > </ot:trainingDataset> > > /* > There is no modelTypes.owl defined - could you consider extending > AlgorithmTypes.owl or BlueObelisk descriptors.owl instead , and change > the reference. > */ > > > <ot:isA> > http://www.opentox.org/modelTypes.owl#MCSSBasedToxicityPredictor</ot:isA> > <dc:identifier > rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI" > > >http://opentox2.informatik.uni-freiburg.de:8080/MaxtoxTest/model/1 > </dc:identifier> > <dc:description > rdf:datatype="http://www.w3.org/2001/XMLSchema#string" > >Model and dictionary built from 55 active and 55 inactive > compounds</dc:description> > <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" > >Model Number : 1</dc:title> > > /* > This representation does not contain ot:independentVariables, > ot:dependentVariables nor ot:predictedVariables. While > ot:independentVariables can be skipped, if you are generating > descriptors on the fly, it is important to include the rest two, > otherwise the clients will not be able to find out where the results are > stored. Please consult the existing services of other partners for > examples. > */ > > </ot:Model> > </rdf:RDF> > > > > Best regards, > Nina > > cheers > > Surajit > > > > > > > >> > http://ambit.uni-plovdiv.bg:8080/ambit2/ontology/test?search=+http%3A%2F%2Fopentox2.informatik.uni-freiburg.de%3A8080%2FMaxtoxTest%2Frest%2Fmodel > >> > >> In particular, when you fix the problem, a reference to model 1 should > >> appear in the "Model [http://www.opentox.org/api/1.1#Model]" section > >> at the bottom of the ontology playground page. > >> > >> According to opentox.owl, the RDF represnetation of a model should > >> include a statement that the model is of type > >> <http://www.opentox.org/api/1.1#Model> (or if abbreviated - ot:Model) > >> , e.g. there should be a triple like > >> > >> <http://opentox2.informatik.uni-freiburg.de:8080/MaxtoxTest/model/1> > >> rdf:type ot:Model . > >> > >> Kind regards, > >> Vedrin > >> > >> PS: You might want to check the output of the following two queries as > >> an example of RDF representations of list of models and specific > >> model: > >> > >> curl -H "Accept:application/rdf+xml" > >> http://opentox.informatik.tu-muenchen.de:8080/OpenTox-dev/model > >> curl -H "Accept:application/rdf+xml" > >> > >> > http://opentox.informatik.tu-muenchen.de:8080/OpenTox-dev/model/TUMOpenToxModel_kNN_6 > >> _______________________________________________ > >> Development mailing list > >> Development at opentox.org > >> http://www.opentox.org/mailman/listinfo/development > >> > >> > > > > > > > > > > > _______________________________________________ > Development mailing list > Development at opentox.org > http://www.opentox.org/mailman/listinfo/development > > -- Surajit Ray Partner www.rareindianart.com
- Previous message: [OTDev] Performance testing and monitoring
- Next message: [OTDev] Performance testing and monitoring
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Development mailing list