I was thinking about that too. We already have that in the BioCASE software. But the problem with TAPIR is that the concepts you map to are themselves *not* mandatory. Only the output model which is used in a request states that a certain concept is required. So basically any ABCD or Darwin Core concept could be mandatory. The only way around I see is to use a "canonical" model in the back to do the mapping, i.e. the model which looks exactly like the schema that is used to define concepts. This is an item on pywrappers requested feature list, but I dont have time to do anything about it soon I am afraid.
http://trac.pywrapper.org/pywrapper/ticket/97
thanks, markus
-----Original Message----- From: pywrapper-devel-bounces@lists.sourceforge.net on behalf of Shunde Zhang Sent: Mon 5/14/2007 8:22 AM To: PyWrapper Developers mailing list Cc: Subject: Re: [PyWrapper-devel] Query Result
Hi Markus,
Thanks for your reply. I finally got it working. Since I don't know which concept is compulsory, I just missed some concepts. It would be good if I add a schema to the mapping, those must-have concepts will be added by default so that I don't need to look for them from the long long list.
Sorry the system is in our intranet, so you cannot access it. Thanks anyway.
Cheers, Shunde.
Quoting Markus Döring m.doering@bgbm.org:
Dear Shunde, the problem is found in the diagnostics here:
"The element /DataSets/DataSet..Sequence:-1360356980 was dropped 1 times because of missing required subelements or attributes: [u'TechnicalContacts']"
This means that ABCD defines a mandatory element TechnicalContacts that cannot be created. This usually results of missing mappings or NULL in the data of that specific record. Is the configuration tool externally visible? Then we (support@biocase.org) could check your mappings directly online.
best wishes
Markus
On 10.05.2007, at 04:55, Shunde Zhang wrote:
Hi all,
I just installed pywrapper 3.1.0a, and set up a simple mapping to ABCD 2.06.
I now have mapped 8 concepts. and when I did a simple query, I got the correct number of records but not the content as below. I used Query Forms to do this. Could you please tell me if anything wrong with my config? Thanks a lot.
Cheers, Shunde.
<response xsi:schemaLocation="http://rs.tdwg.org/tapir/1.0 http://rs.tdwg.org/tapir/1.0/schema/tapir.xsd">
<header>
<source sendtime="2007-05-10T12:14:09.34"
accesspoint="http://ristretto.sapac.edu.au:8088/pywrapper/pywrapper? dsa=avh">
<software version="3.1.0alpha" name="PyWrapper"/> </source> - <custom> <pyw:webapps pyw:location="http://ristretto.sapac.edu.au:8088/ pywrapper"/> </custom> </header> <!-- CONTENT START --> - <search> <summary start="0" totalMatched="1"/> </search> <!-- CONTENT END --> - <diagnostics> <diagnostic time="2007-05-10T12:18:21.15" level="INFO">Reading request</diagnostic> - <diagnostic time="2007-05-10T12:18:21.21" level="INFO"> Read model http://rs.tdwg.org/tapir/cs/abcd/2.06/model/abcd206.xml </diagnostic> - <diagnostic time="2007-05-10T12:18:22.22" level="INFO"> Parsed response structure contains 991 leaf concepts with type out of 1663 nodes in total </diagnostic> <diagnostic time="2007-05-10T12:18:22.91" level="INFO">Request fully parsed</diagnostic> <diagnostic time="2007-05-10T12:18:22.91" level="INFO">Init model ACBD 2.06 with datasource preferences</diagnostic> - <diagnostic time="2007-05-10T12:18:23.26" level="INFO"> Model init finished. The model contains 1324 mapped concepts for datasource 'avh' out of 1324 model nodes mapped. </diagnostic> <diagnostic time="2007-05-10T12:18:23.26" level="INFO">Update model structure with datasource preferences</diagnostic> - <diagnostic time="2007-05-10T12:18:26.11" level="INFO"> Executing SQL: "SELECT COUNT(DISTINCT SpecimenRecord.Id) FROM SpecimenRecord AS SpecimenRecord JOIN TaxonName AS TaxonName ON SpecimenRecord.TaxonNameId = TaxonName.Id WHERE TaxonName.FullScientificName LIKE 'Baccharis pingraea' " </diagnostic> <diagnostic time="2007-05-10T12:18:41.22" level="INFO">DB query finished</diagnostic> - <diagnostic time="2007-05-10T12:18:41.22" level="INFO"> Ordering view by [TaxonName.FullScientificName(text)] </diagnostic> - <diagnostic time="2007-05-10T12:18:41.23" level="INFO"> Executing SQL: "SELECT DISTINCT SpecimenRecord.Id FROM SpecimenRecord AS SpecimenRecord JOIN TaxonName AS TaxonName ON SpecimenRecord.TaxonNameId = TaxonName.Id WHERE TaxonName.FullScientificName LIKE 'Baccharis pingraea' ORDER BY TaxonName.FullScientificName, SpecimenRecord.Id LIMIT 51 OFFSET 0" </diagnostic> <diagnostic time="2007-05-10T12:18:54.29" level="INFO">DB query finished</diagnostic> - <diagnostic time="2007-05-10T12:18:54.29" level="INFO"> Executing SQL: "SELECT TaxonName.FullScientificName, SpecimenRecord.Id, SpecimenRecord.SourceInstitutionID, SpecimenRecord.UnitId, SpecimenRecord.DateLastEdited, TaxonName.Id, TaxonName.Genus, TaxonName.Species, CollectSite.Id, CollectSite.LongitudeDecimal, CollectSite.LatitudeDecimal FROM SpecimenRecord AS SpecimenRecord LEFT JOIN TaxonName AS TaxonName ON SpecimenRecord.TaxonNameId = TaxonName.Id LEFT JOIN CollectSite AS CollectSite ON SpecimenRecord.CollectSiteId = CollectSite.Id WHERE SpecimenRecord.Id IN ('459464') ORDER BY TaxonName.FullScientificName " </diagnostic> <diagnostic time="2007-05-10T12:18:54.32" level="INFO">DB query finished</diagnostic> <diagnostic time="2007-05-10T12:18:54.32" level="INFO">Create XML content from recordset</diagnostic> <diagnostic time="2007-05-10T12:18:54.32" level="INFO">Use intelligent model interpreter</diagnostic> - <diagnostic time="2007-05-10T12:18:54.32" level="WARNING"> No content produced. Probably there were no matches for your query. </diagnostic> <diagnostic time="2007-05-10T12:18:54.32" level="INFO">Finished creating XML content</diagnostic> - <diagnostic time="2007-05-10T12:18:54.32" level="INFO"> Total number of elements created=0. Elements dropped=0 </diagnostic> - <diagnostic time="2007-05-10T12:18:54.33" level="WARNING"> The element /DataSets..Sequence:-1360356532 was dropped 1 times because of missing required subelements or attributes: [u'DataSet'] </diagnostic> - <diagnostic time="2007-05-10T12:18:54.33" level="WARNING"> The element /DataSets/DataSet..Sequence:-1360356980 was dropped 1 times because of missing required subelements or attributes: [u'TechnicalContacts'] </diagnostic> </diagnostics> </response>
This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ PyWrapper-devel mailing list PyWrapper-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pywrapper-devel
This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ PyWrapper-devel mailing list PyWrapper-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pywrapper-devel
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ PyWrapper-devel mailing list PyWrapper-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pywrapper-devel