From c0a2dcce89b1f374fc1987753dd28c6541bbbfe5 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 16 Nov 2009 06:27:11 +0000 Subject: Cleaning up SVN structure, moving branch under sdo-cpp/branches. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@880614 13f79535-47bb-0310-9956-ffa450edef68 --- .../sdo-cpp-pre2.1/runtime/core/test/.cdtbuild | 59 - .../org.eclipse.cdt.managedbuilder.core.prefs | 9 - .../runtime/core/test/47293Catalog.xml | 22 - .../runtime/core/test/47293Catalog.xsd | 35 - .../runtime/core/test/47293Customer.xsd | 50 - .../runtime/core/test/47293Order.xsd | 67 - .../sdo-cpp-pre2.1/runtime/core/test/48601.xsd | 46 - .../sdo-cpp-pre2.1/runtime/core/test/48686.xml | 31 - .../sdo-cpp-pre2.1/runtime/core/test/48686.xsd | 42 - .../sdo-cpp-pre2.1/runtime/core/test/48736.xml | 30 - .../sdo-cpp-pre2.1/runtime/core/test/48736.xsd | 49 - .../sdo-cpp-pre2.1/runtime/core/test/48736_xml.txt | 42 - .../sdo-cpp-pre2.1/runtime/core/test/48736_xsd.txt | 29 - .../sdo-cpp-pre2.1/runtime/core/test/Atom1.0.xsd | 205 - .../runtime/core/test/BadElement.xml | 29 - .../runtime/core/test/BadElement.xsd | 102 - .../sdo-cpp-pre2.1/runtime/core/test/Catalog.xsd | 34 - .../sdo-cpp-pre2.1/runtime/core/test/Customer.xsd | 47 - .../sdo-cpp-pre2.1/runtime/core/test/Makefile.am | 33 - .../sdo-cpp-pre2.1/runtime/core/test/OddChars.xml | 27 - .../sdo-cpp-pre2.1/runtime/core/test/OddChars.xsd | 103 - .../sdo-cpp-pre2.1/runtime/core/test/Order.xsd | 59 - .../sdo-cpp-pre2.1/runtime/core/test/Readme.txt | 108 - .../runtime/core/test/SdoGenerate.cpp | 169 - .../runtime/core/test/StockQuoteService.wsdl | 176 - .../sdo-cpp-pre2.1/runtime/core/test/Style1.xsd | 72 - .../sdo-cpp-pre2.1/runtime/core/test/Style2.xsd | 74 - .../sdo-cpp-pre2.1/runtime/core/test/Style3.xsd | 74 - .../sdo-cpp-pre2.1/runtime/core/test/Style4.xsd | 80 - .../runtime/core/test/TravelBookingSchema.xsd | 103 - .../runtime/core/test/TravelBookingUsingSchema.xml | 67 - branches/sdo-cpp-pre2.1/runtime/core/test/axis.xsd | 40 - .../sdo-cpp-pre2.1/runtime/core/test/b46617b.xml | 27 - .../sdo-cpp-pre2.1/runtime/core/test/b46617b.xsd | 79 - .../sdo-cpp-pre2.1/runtime/core/test/b46633.txt | 8 - .../runtime/core/test/b46634_out.txt | 2 - .../sdo-cpp-pre2.1/runtime/core/test/b46693.xsd | 176 - .../sdo-cpp-pre2.1/runtime/core/test/b47137.txt | 6 - .../sdo-cpp-pre2.1/runtime/core/test/b47137.xsd | 32 - .../sdo-cpp-pre2.1/runtime/core/test/b47137b.txt | 31 - .../sdo-cpp-pre2.1/runtime/core/test/b47137b.xsd | 59 - .../sdo-cpp-pre2.1/runtime/core/test/b47293.txt | 27 - .../sdo-cpp-pre2.1/runtime/core/test/b48602.xsd | 29 - .../sdo-cpp-pre2.1/runtime/core/test/b48633.xml | 29 - .../sdo-cpp-pre2.1/runtime/core/test/b48633.xsd | 41 - .../runtime/core/test/b48633_xml.txt | 10 - .../sdo-cpp-pre2.1/runtime/core/test/b48633b.xsd | 26 - .../runtime/core/test/b48633b_xsd.txt | 31 - .../sdo-cpp-pre2.1/runtime/core/test/b48636.xml | 29 - .../sdo-cpp-pre2.1/runtime/core/test/b48636.xsd | 36 - .../runtime/core/test/b48636_xml.txt | 36 - .../runtime/core/test/b48636_xsd.txt | 26 - .../sdo-cpp-pre2.1/runtime/core/test/b48686.xml | 30 - .../sdo-cpp-pre2.1/runtime/core/test/b48686.xsd | 41 - .../runtime/core/test/b48686_xml.txt | 46 - .../runtime/core/test/b48686_xsd.txt | 28 - .../runtime/core/test/badelement.txt | 2 - .../runtime/core/test/bothgroups.xsd | 44 - .../runtime/core/test/bothgroups_xsd.txt | 29 - .../runtime/core/test/bothgroupssamename.xsd | 44 - .../runtime/core/test/bothgroupssamename_xsd.txt | 29 - branches/sdo-cpp-pre2.1/runtime/core/test/bug2.txt | 9 - .../runtime/core/test/bug45933-output.txt | 2 - .../sdo-cpp-pre2.1/runtime/core/test/bug48300.xml | 174 - .../sdo-cpp-pre2.1/runtime/core/test/bug48300.xsd | 84 - .../runtime/core/test/bug48300_xml.txt | 424 - .../runtime/core/test/bug48300_xsd.txt | 58 - .../runtime/core/test/bugs/1/company.xml | 41 - .../runtime/core/test/bugs/1/company.xsd | 64 - .../runtime/core/test/bugs/1/include.xsd | 69 - .../runtime/core/test/bugs/1/ok1.xsd | 34 - .../runtime/core/test/bugs/1/ok2.xsd | 33 - .../runtime/core/test/bugs/1/ok3.xsd | 32 - .../runtime/core/test/bunique-out.txt | 1 - .../runtime/core/test/bunique-out.xsd_safe.txt | 53 - .../runtime/core/test/bunique-outxml.txt | 2 - .../runtime/core/test/buniqueread-out.txt | 2 - .../runtime/core/test/calculator.xsd | 32 - .../runtime/core/test/calculator2.wsdl | 90 - .../runtime/core/test/calculator2a.wsdl | 88 - .../sdo-cpp-pre2.1/runtime/core/test/carotest3.txt | 36 - .../sdo-cpp-pre2.1/runtime/core/test/cdata-in.xml | 29 - .../sdo-cpp-pre2.1/runtime/core/test/cdata-out.xml | 2 - .../sdo-cpp-pre2.1/runtime/core/test/cdata.xsd | 39 - .../sdo-cpp-pre2.1/runtime/core/test/clone-in.xml | 29 - .../runtime/core/test/clone-out-win.xml | 8 - .../sdo-cpp-pre2.1/runtime/core/test/clone-out.xml | 9 - .../sdo-cpp-pre2.1/runtime/core/test/clone.xsd | 33 - .../sdo-cpp-pre2.1/runtime/core/test/company.xsd | 50 - .../runtime/core/test/company_with_nillable_SN.xml | 30 - .../runtime/core/test/company_with_nillable_SN.xsd | 49 - .../runtime/core/test/companyabs.xsd | 65 - .../runtime/core/test/companyref.xsd | 67 - .../runtime/core/test/companysubs.xsd | 64 - .../runtime/core/test/csload-output.txt | 2 - .../runtime/core/test/csload2-output.txt | 2 - .../runtime/core/test/csload3-output.txt | 2 - .../runtime/core/test/cssave-output.txt | 2 - .../runtime/core/test/cssave2-output.txt | 2 - .../sdo-cpp-pre2.1/runtime/core/test/datetest.txt | 4 - .../sdo-cpp-pre2.1/runtime/core/test/defaults.txt | 10 - .../sdo-cpp-pre2.1/runtime/core/test/doctest.txt | 2 - .../sdo-cpp-pre2.1/runtime/core/test/doctest.xml | 27 - .../sdo-cpp-pre2.1/runtime/core/test/doctest.xsd | 48 - .../core/test/elementFormDefaultQualifiedSeq.xsd | 40 - .../elementFormDefaultQualifiedSeq_expected.xml | 4 - .../sdo-cpp-pre2.1/runtime/core/test/employee.xsd | 45 - .../sdo-cpp-pre2.1/runtime/core/test/emptycs1.txt | 2 - .../sdo-cpp-pre2.1/runtime/core/test/emptycs2.txt | 2 - .../sdo-cpp-pre2.1/runtime/core/test/emptycs3.txt | 2 - .../sdo-cpp-pre2.1/runtime/core/test/error1.xml | 30 - .../sdo-cpp-pre2.1/runtime/core/test/error1.xsd | 49 - .../sdo-cpp-pre2.1/runtime/core/test/extension.xsd | 58 - .../sdo-cpp-pre2.1/runtime/core/test/fidelity.xml | 49 - .../sdo-cpp-pre2.1/runtime/core/test/fidelity.xsd | 92 - .../runtime/core/test/g/gCustomer.xsd | 50 - .../sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xml | 21 - .../sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xsd | 58 - branches/sdo-cpp-pre2.1/runtime/core/test/g3.xsd | 41 - .../runtime/core/test/getproptest.txt | 8 - .../sdo-cpp-pre2.1/runtime/core/test/graham1.xsd | 40 - .../sdo-cpp-pre2.1/runtime/core/test/graham2.xsd | 39 - .../sdo-cpp-pre2.1/runtime/core/test/graham3.xsd | 41 - .../runtime/core/test/groupingroup.xsd | 45 - .../runtime/core/test/groupingroup_xsd.txt | 25 - .../runtime/core/test/grouprefingroup.xsd | 45 - .../runtime/core/test/grouprefingroup_xsd.txt | 29 - .../runtime/core/test/grouptoolate.xsd | 37 - .../runtime/core/test/grouptoolate_xsd.txt | 26 - .../runtime/core/test/groupwithprefix.xsd | 37 - .../runtime/core/test/groupwithprefix_xsd.txt | 26 - .../runtime/core/test/groupwrongname.xsd | 38 - branches/sdo-cpp-pre2.1/runtime/core/test/inc1.txt | 22 - branches/sdo-cpp-pre2.1/runtime/core/test/inc2.txt | 21 - .../sdo-cpp-pre2.1/runtime/core/test/include.xsd | 34 - .../sdo-cpp-pre2.1/runtime/core/test/include1.xsd | 38 - .../sdo-cpp-pre2.1/runtime/core/test/include2.xsd | 37 - .../runtime/core/test/includeother3.xsd | 34 - .../runtime/core/test/jira1112expected.xml | 9 - .../sdo-cpp-pre2.1/runtime/core/test/jira490.txt | 53 - .../sdo-cpp-pre2.1/runtime/core/test/jira705.xsd | 31 - .../runtime/core/test/jira705_out.txt | 5 - .../runtime/core/test/jira980_animaltypes.xsd | 39 - .../runtime/core/test/jira980_jungle.xsd | 28 - .../runtime/core/test/jira980_jungle_out.txt | 2 - .../runtime/core/test/jira980_mixedJungle.xsd | 28 - .../runtime/core/test/jira980_mixedJungle_out.txt | 2 - .../runtime/core/test/jira980_splitJungle_out.txt | 2 - .../sdo-cpp-pre2.1/runtime/core/test/list1.xml | 32 - .../sdo-cpp-pre2.1/runtime/core/test/list1.xsd | 40 - .../sdo-cpp-pre2.1/runtime/core/test/list1_xml.txt | 70 - .../sdo-cpp-pre2.1/runtime/core/test/list1_xsd.txt | 28 - .../runtime/core/test/loadload-output.txt | 2 - branches/sdo-cpp-pre2.1/runtime/core/test/main.cpp | 206 - .../sdo-cpp-pre2.1/runtime/core/test/maintest.txt | 188 - branches/sdo-cpp-pre2.1/runtime/core/test/many.xml | 33 - branches/sdo-cpp-pre2.1/runtime/core/test/many.xsd | 21 - .../sdo-cpp-pre2.1/runtime/core/test/matttest1.txt | 2 - .../sdo-cpp-pre2.1/runtime/core/test/merle1.txt | 10 - .../sdo-cpp-pre2.1/runtime/core/test/my-core.xsd | 40 - .../core/test/my-implementation-local-java.xsd | 43 - branches/sdo-cpp-pre2.1/runtime/core/test/my.xsd | 31 - .../sdo-cpp-pre2.1/runtime/core/test/noschema.xml | 2 - .../sdo-cpp-pre2.1/runtime/core/test/notns.txt | 2 - .../runtime/core/test/nullExtendedPrimitive.xml | 30 - .../runtime/core/test/nullExtendedPrimitive.xsd | 43 - .../sdo-cpp-pre2.1/runtime/core/test/nulltest.txt | 91 - .../sdo-cpp-pre2.1/runtime/core/test/oddchars.txt | 22 - .../runtime/core/test/openloadNS.xml | 32 - .../runtime/core/test/openloadNS.xsd | 53 - .../runtime/core/test/openloadNS2.xml | 32 - .../runtime/core/test/openloadNS2.xsd | 28 - .../runtime/core/test/openloadNSout.txt | 2 - .../sdo-cpp-pre2.1/runtime/core/test/openseq.txt | 3 - .../sdo-cpp-pre2.1/runtime/core/test/order1.txt | 19 - .../sdo-cpp-pre2.1/runtime/core/test/order2.txt | 19 - .../runtime/core/test/overlappingtypes.xsd | 57 - .../sdo-cpp-pre2.1/runtime/core/test/partial.xml | 33 - .../sdo-cpp-pre2.1/runtime/core/test/person.xsd | 34 - branches/sdo-cpp-pre2.1/runtime/core/test/pete.xml | 40 - branches/sdo-cpp-pre2.1/runtime/core/test/pete.xsd | 42 - .../sdo-cpp-pre2.1/runtime/core/test/qualified.xml | 2 - .../sdo-cpp-pre2.1/runtime/core/test/querytest.txt | 17 - .../runtime/core/test/saveopen-output.txt | 2 - .../runtime/core/test/sca-binding-sca.xsd | 41 - .../runtime/core/test/sca-binding-webservice.xsd | 40 - .../runtime/core/test/sca-binding-ws.xsd | 41 - .../sdo-cpp-pre2.1/runtime/core/test/sca-core.xsd | 233 - .../runtime/core/test/sca-implementation-dll.xsd | 41 - .../runtime/core/test/sca-implementation-java.xsd | 41 - .../core/test/sca-implementation-local-java.xsd | 43 - .../runtime/core/test/sca-interface-cpp.xsd | 68 - .../runtime/core/test/sca-interface-java.xsd | 44 - .../runtime/core/test/sca-interface-wsdl.xsd | 43 - .../runtime/core/test/sca-property-java.xsd | 43 - .../runtime/core/test/sca-property-xsd.xsd | 41 - branches/sdo-cpp-pre2.1/runtime/core/test/sca.xsd | 41 - .../sdo-cpp-pre2.1/runtime/core/test/scenario1.txt | 10 - .../sdo-cpp-pre2.1/runtime/core/test/scenario2.txt | 8 - .../sdo-cpp-pre2.1/runtime/core/test/scenario3.txt | 22 - .../sdo-cpp-pre2.1/runtime/core/test/scenario4.txt | 108 - .../sdo-cpp-pre2.1/runtime/core/test/scenario5.txt | 8 - .../sdo-cpp-pre2.1/runtime/core/test/sdotest.cpp | 9322 -------------------- .../sdo-cpp-pre2.1/runtime/core/test/sdotest.h | 219 - .../sdo-cpp-pre2.1/runtime/core/test/sdotest2.cpp | 2064 ----- .../sdo-cpp-pre2.1/runtime/core/test/sequence.txt | 45 - .../sdo-cpp-pre2.1/runtime/core/test/setmany.txt | 24 - .../sdo-cpp-pre2.1/runtime/core/test/setnull.txt | 42 - .../runtime/core/test/showdefault1.txt | 15 - .../runtime/core/test/showdefault2.txt | 18 - .../sdo-cpp-pre2.1/runtime/core/test/simple.txt | 8 - .../sdo-cpp-pre2.1/runtime/core/test/simple.xml | 21 - .../sdo-cpp-pre2.1/runtime/core/test/simple.xsd | 23 - .../sdo-cpp-pre2.1/runtime/core/test/stock.wsdl | 407 - .../sdo-cpp-pre2.1/runtime/core/test/stock.xml | 45 - .../runtime/core/test/stock_wsdl.txt | 47 - .../sdo-cpp-pre2.1/runtime/core/test/stock_xml.txt | 127 - .../runtime/core/test/t2/include3.xsd | 34 - .../runtime/core/test/t2/includeother.xsd | 34 - .../runtime/core/test/t2/includeother1.xsd | 38 - .../runtime/core/test/t2/includeother2.xsd | 37 - .../runtime/core/test/test/include3.xsd | 35 - .../runtime/core/test/test/includeother.xsd | 34 - .../runtime/core/test/test/includeother1.xsd | 38 - .../runtime/core/test/test/includeother2.xsd | 37 - .../runtime/core/test/test2/includeother3.xsd | 35 - .../runtime/core/test/testabstract.txt | 5 - .../runtime/core/test/testerrors.txt | 5 - .../sdo-cpp-pre2.1/runtime/core/test/testinc2.txt | 21 - .../sdo-cpp-pre2.1/runtime/core/test/testopen.txt | 24 - .../sdo-cpp-pre2.1/runtime/core/test/testopen3.xml | 21 - .../sdo-cpp-pre2.1/runtime/core/test/testorder.txt | 19 - .../runtime/core/test/teststyles.txt | 93 - .../runtime/core/test/testsubsload.txt | 7 - .../sdo-cpp-pre2.1/runtime/core/test/testutils.txt | 100 - .../sdo-cpp-pre2.1/runtime/core/test/testwsdl.txt | 2 - .../sdo-cpp-pre2.1/runtime/core/test/testwsdl.xml | 22 - .../sdo-cpp-pre2.1/runtime/core/test/travel.txt | 146 - .../runtime/core/test/tuscany963.out.xml.txt | 2 - .../runtime/core/test/tuscany963.xml | 21 - .../runtime/core/test/tuscany963.xsd | 44 - .../sdo-cpp-pre2.1/runtime/core/test/types.xsd | 34 - .../sdo-cpp-pre2.1/runtime/core/test/userdata.txt | 10 - .../sdo-cpp-pre2.1/runtime/core/test/utils.cpp | 553 -- .../sdo-cpp-pre2.1/runtime/core/test/xhtml_in.xml | 60 - .../sdo-cpp-pre2.1/runtime/core/test/xhtml_out.txt | 41 - .../runtime/core/test/xsiTypeAbstract.xsd | 44 - .../runtime/core/test/xsiTypeAbstract_expected.xml | 4 - 248 files changed, 22707 deletions(-) delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/.cdtbuild delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/.settings/org.eclipse.cdt.managedbuilder.core.prefs delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/47293Customer.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/47293Order.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/48601.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/48686.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/48686.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/48736.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/48736.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/48736_xml.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/48736_xsd.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/Atom1.0.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/Catalog.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/Customer.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/Makefile.am delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/Order.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/Readme.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/SdoGenerate.cpp delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/StockQuoteService.wsdl delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/Style1.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/Style2.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/Style3.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/Style4.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingSchema.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingUsingSchema.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/axis.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b46633.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b46634_out.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b46693.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b47137.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b47137.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b47293.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b48602.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b48633_xml.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b48633b.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b48633b_xsd.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xml.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xsd.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xml.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xsd.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/badelement.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups_xsd.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename_xsd.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bug2.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bug45933-output.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xml.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xsd.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/include.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok1.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok2.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok3.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.xsd_safe.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/bunique-outxml.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/buniqueread-out.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/calculator.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/calculator2.wsdl delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/calculator2a.wsdl delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/carotest3.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/cdata-in.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/cdata-out.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/cdata.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/clone-in.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/clone-out-win.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/clone-out.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/clone.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/company.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/companyabs.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/companyref.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/companysubs.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/csload-output.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/csload2-output.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/csload3-output.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/cssave-output.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/cssave2-output.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/datetest.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/defaults.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/doctest.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq_expected.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/employee.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/emptycs1.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/emptycs2.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/emptycs3.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/error1.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/error1.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/extension.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/g/gCustomer.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/g3.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/getproptest.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/graham1.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/graham2.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/graham3.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup_xsd.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup_xsd.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate_xsd.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix_xsd.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/groupwrongname.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/inc1.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/inc2.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/include.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/include1.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/include2.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/includeother3.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/jira1112expected.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/jira490.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/jira705.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/jira705_out.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/jira980_animaltypes.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle_out.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle_out.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/jira980_splitJungle_out.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/list1.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/list1.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/list1_xml.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/list1_xsd.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/loadload-output.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/main.cpp delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/maintest.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/many.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/many.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/matttest1.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/merle1.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/my-core.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/my-implementation-local-java.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/my.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/noschema.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/notns.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/nulltest.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/oddchars.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/openloadNSout.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/openseq.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/order1.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/order2.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/overlappingtypes.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/partial.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/person.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/pete.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/pete.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/qualified.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/querytest.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/saveopen-output.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-sca.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-webservice.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-ws.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sca-core.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-dll.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-java.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-local-java.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-cpp.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-java.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-wsdl.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-java.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-xsd.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sca.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/scenario1.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/scenario2.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/scenario3.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/scenario4.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/scenario5.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.cpp delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.h delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sdotest2.cpp delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/sequence.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/setmany.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/setnull.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/showdefault1.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/showdefault2.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/simple.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/simple.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/simple.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/stock.wsdl delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/stock.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/stock_wsdl.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/stock_xml.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/t2/include3.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother1.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother2.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/test/include3.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother1.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother2.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/test2/includeother3.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/testabstract.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/testerrors.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/testinc2.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/testopen.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/testopen3.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/testorder.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/teststyles.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/testsubsload.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/testutils.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/travel.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.out.xml.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/types.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/userdata.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/utils.cpp delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_in.xml delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_out.txt delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract.xsd delete mode 100644 branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract_expected.xml (limited to 'branches/sdo-cpp-pre2.1/runtime/core/test') diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/.cdtbuild b/branches/sdo-cpp-pre2.1/runtime/core/test/.cdtbuild deleted file mode 100644 index 17ebd43324..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/.cdtbuild +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/branches/sdo-cpp-pre2.1/runtime/core/test/.settings/org.eclipse.cdt.managedbuilder.core.prefs deleted file mode 100644 index 0c77f0af0f..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/.settings/org.eclipse.cdt.managedbuilder.core.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Feb 15 16:37:24 GMT 2006 -eclipse.preferences.version=1 -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1698024418=\n\n\n\n\n -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.release.1720042110=\n\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.1698024418=\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.release.1720042110=\n\n\n\n -environment/project=\n\n -environment/project/cdt.managedbuild.config.gnu.exe.debug.1698024418=\n\n\n\n -environment/project/cdt.managedbuild.config.gnu.exe.release.1720042110=\n\n\n\n diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xml deleted file mode 100644 index 43f4e46e1b..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - -1A Partridge in a Pear Tree1.99012Turtle Doves2.99013French Hens3.99014Calling Birds4.99015Golden Rings5.99016Geese a-laying6.99017Swans a-swimming7.99018Maids a-milking8.99019Ladies dancing9.990110Lords a-leaping10.990111Pipers piping11.990112Drummers drumming12.9901 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xsd deleted file mode 100644 index f8f1cb9d47..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/47293Customer.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/47293Customer.xsd deleted file mode 100644 index 948dd07e85..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/47293Customer.xsd +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/47293Order.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/47293Order.xsd deleted file mode 100644 index b11fce2e60..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/47293Order.xsd +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/48601.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/48601.xsd deleted file mode 100644 index 9e0b117520..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/48601.xsd +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/48686.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/48686.xml deleted file mode 100644 index 0197503c98..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/48686.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - John - Fitzgerald - Doe - 1 2 3 - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/48686.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/48686.xsd deleted file mode 100644 index 45678b9a30..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/48686.xsd +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/48736.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/48736.xml deleted file mode 100644 index 97ab07c448..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/48736.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Doe - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/48736.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/48736.xsd deleted file mode 100644 index fa2bf9ef75..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/48736.xsd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/48736_xml.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/48736_xml.txt deleted file mode 100644 index d7b9d4b8d4..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/48736_xml.txt +++ /dev/null @@ -1,42 +0,0 @@ -***** TYPES AFTER RESOLVE********************************* -Type:TNS#FormalNameType -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -Type:TNS#NameType -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -Type:TNS#RootType -Property:formalname of type FormalNameType -Property:last of type String -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -*******************************END TYPES****************** -===== DataObject contents ===== -first:string: - -middle:string: - -last:string:Doe - -title:string:Mr. - -===== End DataObject ===== diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/48736_xsd.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/48736_xsd.txt deleted file mode 100644 index 822a05ec7f..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/48736_xsd.txt +++ /dev/null @@ -1,29 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:TNS#FormalNameType -Property:last of type String -Type:TNS#NameType -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -Type:TNS#RootType -Property:formalname of type FormalNameType -Property:last of type String -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -*******************************END TYPES****************** diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/Atom1.0.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/Atom1.0.xsd deleted file mode 100644 index a421b56c69..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/Atom1.0.xsd +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xml deleted file mode 100644 index 180b050bf5..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - NCE - PAR - DATA - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xsd deleted file mode 100644 index dd1f296a3a..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xsd +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/Catalog.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/Catalog.xsd deleted file mode 100644 index 2c3708285a..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/Catalog.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/Customer.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/Customer.xsd deleted file mode 100644 index 1f21545592..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/Customer.xsd +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/Makefile.am b/branches/sdo-cpp-pre2.1/runtime/core/test/Makefile.am deleted file mode 100644 index 060580dfbb..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -noinst_PROGRAMS = tuscany_sdo_test -SUBDIRS = -TESTS=tuscany_sdo_test -AM_CPPFLAGS = $(CPPFLAGS) -tuscany_sdo_test_SOURCES = sdotest.cpp sdotest2.cpp utils.cpp main.cpp - -EXTRA_DIST = *.xsd *.xml *.txt *.wsdl test/*.* test2/*.* t2/*.* g/*.* bugs/1/*.* -noinst_HEADERS=sdotest.h - -tuscany_sdo_test_LDADD = \ - -L$(top_builddir)/runtime/core/src/commonj/sdo -ltuscany_sdo \ - -L${LIBXML2_LIB} -lxml2 - - -INCLUDES = -I$(top_builddir)/runtime/core/test \ - -I$(top_builddir)/runtime/core/src diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xml deleted file mode 100644 index d7b95510ad..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╔╩╦╠═╬¤ðÐÊËÈıÍÎÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■  - Pound:£ Dollar:$ Euro:Ç or █ - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xsd deleted file mode 100644 index 2f2d53c5a8..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xsd +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/Order.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/Order.xsd deleted file mode 100644 index d87f690236..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/Order.xsd +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/Readme.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/Readme.txt deleted file mode 100644 index 326131a78c..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/Readme.txt +++ /dev/null @@ -1,108 +0,0 @@ - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License.48736_xml.txt - -=============================================================== - -The following files are licensed as above. They do not contain the -licence header text as they are to used to test generated output -and are therefore classed as binary files: - - -48736_xsd.txt -b46633.txt -b46634_out.txt -b47137.txt -b47137b.txt -b47293.txt -b48633_xml.txt -b48633b_xsd.txt -b48636_xml.txt -b48636_xsd.txt -b48686_xml.txt -b48686_xsd.txt -badelement.txt -bothgroups_xsd.txt -bothgroupssamename_xsd.txt -bug2.txt -bug45933-output.txt -bug48300_xml.txt -bug48300_xsd.txt -bunique-out.txt -bunique-out.xsd_safe.txt -bunique-outxml.txt -buniqueread-out.txt -carotest3.txt -csload-output.txt -csload2-output.txt -csload3-output.txt -cssave-output.txt -cssave2-output.txt -datetest.txt -defaults.txt -doctest.txt -emptycs1.txt -emptycs2.txt -emptycs3.txt -getproptest.txt -groupingroup_xsd.txt -grouprefingroup_xsd.txt -grouptoolate_xsd.txt -groupwithprefix_xsd.txt -inc1.txt -inc2.txt -jira490.txt -jira705_out.txt -list1_xml.txt -list1_xsd.txt -loadload-output.txt -maintest.txt -matttest1.txt -merle1.txt -notns.txt -nulltest.txt -oddchars.txt -openloadNSout.txt -openseq.txt -order1.txt -order2.txt -querytest.txt -saveopen-output.txt -scenario1.txt -scenario2.txt -scenario3.txt -scenario4.txt -scenario5.txt -sequence.txt -setmany.txt -setnull.txt -showdefault1.txt -showdefault2.txt -simple.txt -stock_wsdl.txt -stock_xml.txt -testabstract.txt -testerrors.txt -testinc2.txt -testopen.txt -testorder.txt -teststyles.txt -testsubsload.txt -testutils.txt -testwsdl.txt -travel.txt -userdata.txt -xhtml_out.txt diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/SdoGenerate.cpp b/branches/sdo-cpp-pre2.1/runtime/core/test/SdoGenerate.cpp deleted file mode 100644 index 7edb3e22f2..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/SdoGenerate.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* $Rev$ $Date$ */ - -/* work in progress on generation of structures from sdos*/ - -#include -#include - -#pragma warning(disable:4786) - -#include -using namespace std; - - - -#include "sdotest.h" - - - -using namespace commonj::sdo; - - -char* sdotest::convert(const char* uri) -{ - char* newval = (char*)malloc(strlen(uri) + 1); - strcpy(newval,uri); - - char* c; - while ((c = strchr(newval,'.')) != 0) - { - char * tmp = (char*)malloc(strlen(newval) + 5); - strncpy(tmp,newval, c - newval); - tmp[c-newval] = 0; - strcat(tmp,""); - strcat(tmp,c+1); - free(newval); - newval = tmp; - } - return newval; -} - - -void sdotest::generate(DataFactoryPtr fac) -{ - try { - - TypeList tl = fac->getTypes(); - - - cout << "// Generated structures " << endl; - - for (unsigned int i=0;i - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/Style1.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/Style1.xsd deleted file mode 100644 index 25d800a02c..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/Style1.xsd +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/Style2.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/Style2.xsd deleted file mode 100644 index a6aaf51013..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/Style2.xsd +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/Style3.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/Style3.xsd deleted file mode 100644 index 62db1fa13e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/Style3.xsd +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/Style4.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/Style4.xsd deleted file mode 100644 index ab4bd6ef46..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/Style4.xsd +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingSchema.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingSchema.xsd deleted file mode 100644 index 2f2d53c5a8..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingSchema.xsd +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingUsingSchema.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingUsingSchema.xml deleted file mode 100644 index d4a292083d..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingUsingSchema.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - LHR - SNG - - - SNG - LHR - - - Excelsior - 222-3333 - 303 - - - Seedy Lodge - 888-9999 - 14 - - - Hilton - 444-5555 - 456 - foo - - - Bird Baths of Singapore - 50 - - - Steve -
134 Shirley Road
- 1234-8908-6543-900 -
- - - John - - - Jane - - - Bill - - -
diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/axis.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/axis.xsd deleted file mode 100644 index 8832ae1afd..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/axis.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xml deleted file mode 100644 index 5d6d2d7336..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xsd deleted file mode 100644 index 263f8bae30..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xsd +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b46633.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/b46633.txt deleted file mode 100644 index da34a5196e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b46633.txt +++ /dev/null @@ -1,8 +0,0 @@ -A modified of type myspace#Department -Property employees[(null)] was unset before the change -Property ints[(null)] was unset before the change -Property bool was unset before the change -A modified of type myspace#Department -Property employees[(null)] was unset before the change -Property ints[(null)] was unset before the change -Property bool was unset before the change diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b46634_out.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/b46634_out.txt deleted file mode 100644 index 5e6b6dd560..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b46634_out.txt +++ /dev/null @@ -1,2 +0,0 @@ - -Jane Doe diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b46693.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/b46693.xsd deleted file mode 100644 index deb00d0473..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b46693.xsd +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b47137.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/b47137.txt deleted file mode 100644 index d525bd7776..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b47137.txt +++ /dev/null @@ -1,6 +0,0 @@ -Property:value -Property:isPermaLink -Property:value -Value:Hello -Property:isPermaLink -Value:true diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b47137.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/b47137.xsd deleted file mode 100644 index dbeba3fd22..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b47137.xsd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.txt deleted file mode 100644 index 202a17fc21..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.txt +++ /dev/null @@ -1,31 +0,0 @@ -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:companyNS#CompanyType -Type:companyNS#DepartmentType -Type:companyNS#EmployeeType -Type:companyNS#RootType -Type:companyNS#guid -Property:departments -Property:guid -Property:name -Property:employeeOfTheMonth -Property:departments -Property:guid -guid Value:Wilbur -guid isPermaLink:Property:name -Property:employeeOfTheMonth diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.xsd deleted file mode 100644 index f78ce703f3..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.xsd +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b47293.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/b47293.txt deleted file mode 100644 index 9d571da67c..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b47293.txt +++ /dev/null @@ -1,27 +0,0 @@ -Type:catalogNS#CatalogTypeType:catalogNS#RootTypeType:commonj.sdo#BigDecimalType:commonj.sdo#BigIntegerType:commonj.sdo#BooleanType:commonj.sdo#ByteType:commonj.sdo#BytesType:commonj.sdo#ChangeSummaryType:commonj.sdo#CharacterType:commonj.sdo#DataObjectType:commonj.sdo#DateType:commonj.sdo#DoubleType:commonj.sdo#FloatType:commonj.sdo#IntegerType:commonj.sdo#LongType:commonj.sdo#OpenDataObjectType:commonj.sdo#ShortType:commonj.sdo#StringType:commonj.sdo#URIType:customerNS#AddressTypeType:customerNS#CustomerTypeType:customerNS#PaymentTypeType:customerNS#RootTypeType:orderNS#OrderStatusType:orderNS#OrderTypeType:orderNS#RootTypeType:orderNS#itemType:catalogNS#CatalogType -Type:catalogNS#RootType -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:customerNS#AddressType -Type:customerNS#CustomerType -Type:customerNS#PaymentType -Type:customerNS#RootType -Type:orderNS#OrderStatus -Type:orderNS#OrderType -Type:orderNS#RootType -Type:orderNS#item diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b48602.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/b48602.xsd deleted file mode 100644 index 859068d11d..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b48602.xsd +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xml deleted file mode 100644 index 201b90fcc1..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - John - Fitzgerald - Doe - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xsd deleted file mode 100644 index ad3b1acb92..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b48633_xml.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/b48633_xml.txt deleted file mode 100644 index 7c0425d298..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b48633_xml.txt +++ /dev/null @@ -1,10 +0,0 @@ -===== DataObject contents ===== -first:string:John - -middle:string:Fitzgerald - -last:string:Doe - -title:string:Mr. - -===== End DataObject ===== diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b48633b.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/b48633b.xsd deleted file mode 100644 index f2ddbca89f..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b48633b.xsd +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b48633b_xsd.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/b48633b_xsd.txt deleted file mode 100644 index 0836fda6cd..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b48633b_xsd.txt +++ /dev/null @@ -1,31 +0,0 @@ -***** TESTANY ****************************************** -Type:TNS#RootType -Property:version of type String -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#NameType -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -Type:http://www.wrox.com/name#RootType -Property:first of type String -Property:middle of type String -Property:last of type String -Property:name of type NameType -*******************************END TYPES****************** diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xml deleted file mode 100644 index 50e4d9c017..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - John - Fitzgerald - Doe - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xsd deleted file mode 100644 index b14da69279..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xml.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xml.txt deleted file mode 100644 index 4b5b55ced7..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xml.txt +++ /dev/null @@ -1,36 +0,0 @@ -***** TYPES AFTER RESOLVE********************************* -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -*******************************END TYPES****************** -===== DataObject contents ===== -first:string:John - -middle:string:Fitzgerald - -last:string:Doe - -title:string:Mr. - -===== End DataObject ===== diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xsd.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xsd.txt deleted file mode 100644 index 81ccaee474..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xsd.txt +++ /dev/null @@ -1,26 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -*******************************END TYPES****************** diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xml deleted file mode 100644 index d4dc9e1852..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - John - Fitzgerald - Doe - 1 2 3 - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xsd deleted file mode 100644 index 3845d69471..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xml.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xml.txt deleted file mode 100644 index f4899d810e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xml.txt +++ /dev/null @@ -1,46 +0,0 @@ -***** TYPES AFTER RESOLVE********************************* -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#ages -Property:values (many) of type Integer -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:ages (many) of type ages -*******************************END TYPES****************** -===== DataObject contents ===== -first:string:John - -middle:string:Fitzgerald - -last:string:Doe - -ages: list dataObject[0]= -===== DataObject contents ===== -values: list integer[0]=1 - -integer[1]=2 - -integer[2]=3 - -===== End DataObject ===== - -===== End DataObject ===== diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xsd.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xsd.txt deleted file mode 100644 index df670b8066..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xsd.txt +++ /dev/null @@ -1,28 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#ages -Property:values (many) of type Integer -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:ages (many) of type ages -*******************************END TYPES****************** diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/badelement.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/badelement.txt deleted file mode 100644 index f9ddc1e3b1..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/badelement.txt +++ /dev/null @@ -1,2 +0,0 @@ -BADELEMENT correctly found errors: -Parser found unknown element ThisJustAintPartOfTheSchema diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups.xsd deleted file mode 100644 index 36d1b8f047..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups.xsd +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups_xsd.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups_xsd.txt deleted file mode 100644 index 5d92da21c5..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups_xsd.txt +++ /dev/null @@ -1,29 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -Property:firstattribute of type String -Property:secondattribute of type String -Property:thirdattribute of type String -*******************************END TYPES****************** diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename.xsd deleted file mode 100644 index 0ccdf615f0..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename.xsd +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename_xsd.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename_xsd.txt deleted file mode 100644 index 5d92da21c5..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename_xsd.txt +++ /dev/null @@ -1,29 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -Property:firstattribute of type String -Property:secondattribute of type String -Property:thirdattribute of type String -*******************************END TYPES****************** diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bug2.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/bug2.txt deleted file mode 100644 index aae01a0c9c..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bug2.txt +++ /dev/null @@ -1,9 +0,0 @@ -MObject Property companies -Property:name:Acme -End of MObject Property companies -MObject Property companies -End of MObject Property companies -Change summary should have no entries... -MObject Property companies -End of MObject Property companies -Change summary should have no entries... diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bug45933-output.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/bug45933-output.txt deleted file mode 100644 index d1ad084eea..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bug45933-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -false diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xml deleted file mode 100644 index e4b79cdf2f..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xml +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - This is my online shop - The CT Shop - php - - - - - - Name for the shop - Shop Name - - - - - - - - CT Shop - CT Shop - - - - - Colour of background for Shop - Branding - - - - - - Olive - Olive - - - - Lime - Lime - - - - Gray - Gray - - - - Teal - Teal - - - - Silver - Silver - - - - White - White - - - - Olive - Olive - - - - - Product Catalog for the shop - Product Catalog - - - - - - - - - - Catalog - Catalog - - - - - Shopping cart for the shop - Shopping Cart - - - - - - Cart - Cart - - - - GCCart - GCCart - - - - MyCart - MyCart - - - - - - Cart - Cart - - - - - Payment Modules for the shop - Payment Module - - - - - - MyPayPal - MyPayPal - - - - PayPal - PayPal - - - - USPayPal - USPayPal - - - - MyStormPay - MyStormPay - - - - StormPay - StormPay - - - - - - PayPal - PayPal - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xsd deleted file mode 100644 index e0e69eebf1..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xsd +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xml.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xml.txt deleted file mode 100644 index d8b1345d0d..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xml.txt +++ /dev/null @@ -1,424 +0,0 @@ -***** TYPES AFTER RESOLVE********************************* -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#RootType -Property:template of type TemplateType -Property:unboundTemplateParameter of type unboundTemplateParameter -Property:description of type description -Property:factory of type factory -Property:valueprovider of type valueprovider -Property:value of type value -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#TemplateType -Property:displayName of type String -Property:templateType of type String -Property:description of type String -Property:expert of type String -Property:icon of type String -Property:verifiers (many) of type String -Property:globalHelperArguments (many) of type String -Property:unboundTemplateParameters (many) of type unboundTemplateParameter -Property:name of type String -Property:version of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#description -Property:description of type String -Property:displayName of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#factory -Property:kind of type String -Property:name of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#unboundTemplateParameter -Property:description of type description -Property:verifiers (many) of type String -Property:constraints (many) of type value -Property:factory of type factory -Property:defaults (many) of type value -Property:name of type String -Property:expert of type String -Property:multiplicity of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#value -Property:description of type String -Property:displayName of type String -Property:data of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#valueprovider -Property:values (many) of type value -*******************************END TYPES****************** -===== DataObject contents ===== -displayName:string:The CT Shop - -templateType:string:php - -description:string:This is my online shop - -expert:string: - -icon:string: - -verifiers: list string[0]= - -globalHelperArguments: list string[0]= - - -unboundTemplateParameters: list dataObject[0]= -===== DataObject contents ===== -description:dataObject -===== DataObject contents ===== -description:string:Name for the shop - -displayName:string:Shop Name - -===== End DataObject ===== - -verifiers: list string[0]= - - -constraints: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string: - -data:string: - -===== End DataObject ===== - -factory:dataObject - - null or unset - -defaults: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:CT Shop - -data:string:CT Shop - -===== End DataObject ===== - -name:string:name - -expert:string:false - -multiplicity:string:1..1 - -===== End DataObject ===== - -dataObject[1]= -===== DataObject contents ===== -description:dataObject -===== DataObject contents ===== -description:string:Colour of background for Shop - -displayName:string:Branding - -===== End DataObject ===== - -verifiers: list string[0]= - - -constraints: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:Olive - -data:string:Olive - -===== End DataObject ===== - -dataObject[1]= -===== DataObject contents ===== -description:string: - -displayName:string:Lime - -data:string:Lime - -===== End DataObject ===== - -dataObject[2]= -===== DataObject contents ===== -description:string: - -displayName:string:Gray - -data:string:Gray - -===== End DataObject ===== - -dataObject[3]= -===== DataObject contents ===== -description:string: - -displayName:string:Teal - -data:string:Teal - -===== End DataObject ===== - -dataObject[4]= -===== DataObject contents ===== -description:string: - -displayName:string:Silver - -data:string:Silver - -===== End DataObject ===== - -dataObject[5]= -===== DataObject contents ===== -description:string: - -displayName:string:White - -data:string:White - -===== End DataObject ===== - -factory:dataObject - - null or unset - -defaults: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:Olive - -data:string:Olive - -===== End DataObject ===== - -name:string:branding - -expert:string:false - -multiplicity:string:1..1 - -===== End DataObject ===== - -dataObject[2]= -===== DataObject contents ===== -description:dataObject -===== DataObject contents ===== -description:string:Product Catalog for the shop - -displayName:string:Product Catalog - -===== End DataObject ===== - -verifiers: list string[0]= - - -constraints: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string: - -data:string: - -===== End DataObject ===== - -factory:dataObject -===== DataObject contents ===== -kind:string:php - -name:string:CatalogFactory - -===== End DataObject ===== - -defaults: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:Catalog - -data:string:Catalog - -===== End DataObject ===== - -name:string:catalog - -expert:string:false - -multiplicity:string:1..1 - -===== End DataObject ===== - -dataObject[3]= -===== DataObject contents ===== -description:dataObject -===== DataObject contents ===== -description:string:Shopping cart for the shop - -displayName:string:Shopping Cart - -===== End DataObject ===== - -verifiers: list string[0]= - - -constraints: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:Cart - -data:string:Cart - -===== End DataObject ===== - -dataObject[1]= -===== DataObject contents ===== -description:string: - -displayName:string:GCCart - -data:string:GCCart - -===== End DataObject ===== - -dataObject[2]= -===== DataObject contents ===== -description:string: - -displayName:string:MyCart - -data:string:MyCart - -===== End DataObject ===== - -factory:dataObject -===== DataObject contents ===== -kind:string:php - -name:string:CartFactory - -===== End DataObject ===== - -defaults: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:Cart - -data:string:Cart - -===== End DataObject ===== - -name:string:cart - -expert:string:false - -multiplicity:string:1..1 - -===== End DataObject ===== - -dataObject[4]= -===== DataObject contents ===== -description:dataObject -===== DataObject contents ===== -description:string:Payment Modules for the shop - -displayName:string:Payment Module - -===== End DataObject ===== - -verifiers: list string[0]= - - -constraints: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:MyPayPal - -data:string:MyPayPal - -===== End DataObject ===== - -dataObject[1]= -===== DataObject contents ===== -description:string: - -displayName:string:PayPal - -data:string:PayPal - -===== End DataObject ===== - -dataObject[2]= -===== DataObject contents ===== -description:string: - -displayName:string:USPayPal - -data:string:USPayPal - -===== End DataObject ===== - -dataObject[3]= -===== DataObject contents ===== -description:string: - -displayName:string:MyStormPay - -data:string:MyStormPay - -===== End DataObject ===== - -dataObject[4]= -===== DataObject contents ===== -description:string: - -displayName:string:StormPay - -data:string:StormPay - -===== End DataObject ===== - -factory:dataObject -===== DataObject contents ===== -kind:string:php - -name:string:PaymentFactory - -===== End DataObject ===== - -defaults: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:PayPal - -data:string:PayPal - -===== End DataObject ===== - -name:string:payment - -expert:string:false - -multiplicity:string:1..1 - -===== End DataObject ===== - -name:string:CTShop - -version:string:1.0.0 - -===== End DataObject ===== diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xsd.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xsd.txt deleted file mode 100644 index 38d7c904f0..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xsd.txt +++ /dev/null @@ -1,58 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#RootType -Property:template of type TemplateType -Property:unboundTemplateParameter of type unboundTemplateParameter -Property:description of type description -Property:factory of type factory -Property:valueprovider of type valueprovider -Property:value of type value -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#TemplateType -Property:displayName of type String -Property:templateType of type String -Property:description of type String -Property:expert of type String -Property:icon of type String -Property:verifiers (many) of type String -Property:globalHelperArguments (many) of type String -Property:unboundTemplateParameters (many) of type unboundTemplateParameter -Property:name of type String -Property:version of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#description -Property:description of type String -Property:displayName of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#factory -Property:kind of type String -Property:name of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#unboundTemplateParameter -Property:description of type description -Property:verifiers (many) of type String -Property:constraints (many) of type value -Property:factory of type factory -Property:defaults (many) of type value -Property:name of type String -Property:expert of type String -Property:multiplicity of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#value -Property:description of type String -Property:displayName of type String -Property:data of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#valueprovider -Property:values (many) of type value -*******************************END TYPES****************** diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xml deleted file mode 100644 index 7fd3b119e6..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - 1 - Mary Kay - - - - - 3 - Sales - - 1 - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xsd deleted file mode 100644 index f5fd88a424..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xsd +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/include.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/include.xsd deleted file mode 100644 index 16089cecae..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/include.xsd +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok1.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok1.xsd deleted file mode 100644 index d24e5c39e7..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok1.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok2.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok2.xsd deleted file mode 100644 index 3d90cbdec3..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok2.xsd +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok3.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok3.xsd deleted file mode 100644 index 45d5db2ed4..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok3.xsd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.txt deleted file mode 100644 index da1aabead7..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.xsd_safe.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.xsd_safe.txt deleted file mode 100644 index 1b4c6bb7da..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.xsd_safe.txt +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-outxml.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-outxml.txt deleted file mode 100644 index a4cd4f3705..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-outxml.txt +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/buniqueread-out.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/buniqueread-out.txt deleted file mode 100644 index a4cd4f3705..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/buniqueread-out.txt +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/calculator.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/calculator.xsd deleted file mode 100644 index a5a26de117..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/calculator.xsd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/calculator2.wsdl b/branches/sdo-cpp-pre2.1/runtime/core/test/calculator2.wsdl deleted file mode 100644 index 88b5b80b3d..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/calculator2.wsdl +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/calculator2a.wsdl b/branches/sdo-cpp-pre2.1/runtime/core/test/calculator2a.wsdl deleted file mode 100644 index f2f008bf6e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/calculator2a.wsdl +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/carotest3.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/carotest3.txt deleted file mode 100644 index cb5e4ed9b3..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/carotest3.txt +++ /dev/null @@ -1,36 +0,0 @@ -====================================== -====================================== -====================================== -I am Item 1 of string -====================================== -====================================== -I am Item 1 of string -I am the first free text -====================================== -====================================== -I am Item 1 of string -I am the first free text -I am Item 2 of string -====================================== -====================================== -I am Item 1 of string -I am free text which has been modified -I am Item 2 of string -====================================== -====================================== -I am Item 1 of string -I am free text which has been modified -I am Item 2 of string - -====================================== -====================================== -I am Item 1 of string -I am free text which has been modified -I am Item 2 of string -department1 -====================================== -Element zero, length 1: 1 -Element one, length 2: 2 -Element two, length 3: 3 -Element three,length 4: 4 -Element four, length 5: 5 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/cdata-in.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/cdata-in.xml deleted file mode 100644 index 1a749ecafe..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/cdata-in.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - xxx....]]>aaaa>>>>>>>>]]> - abcdefg - >>>>>>>>]]> - xxx....]]>aaaa>>>>>>>>]]> - xxx....]]>aaaa>>>>>>>>]]> - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/cdata-out.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/cdata-out.xml deleted file mode 100644 index e6db2fbda0..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/cdata-out.xml +++ /dev/null @@ -1,2 +0,0 @@ - -xxx....]]>aaaa>>>>>>>>]]>abcdefg>>>>>>>>]]>xxx....]]>aaaa>>>>>>>>]]>xxx....]]>aaaa>>>>>>>>]]> diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/cdata.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/cdata.xsd deleted file mode 100644 index 5a7ff60c63..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/cdata.xsd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/clone-in.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/clone-in.xml deleted file mode 100644 index 192c26d15e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/clone-in.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - abc - test - def - test - tests again - ghi - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/clone-out-win.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/clone-out-win.xml deleted file mode 100644 index ee538bc438..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/clone-out-win.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - abc - test - def - test - tests again - ghi diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/clone-out.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/clone-out.xml deleted file mode 100644 index 5f711e11f5..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/clone-out.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - abc - test - def - test - tests again - ghi - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/clone.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/clone.xsd deleted file mode 100644 index 72c7110cb3..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/clone.xsd +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/company.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/company.xsd deleted file mode 100644 index d165367196..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/company.xsd +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xml deleted file mode 100644 index 3680df3ccf..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - -Jane Doe - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xsd deleted file mode 100644 index 9af4d3e721..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xsd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/companyabs.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/companyabs.xsd deleted file mode 100644 index d9fa48be8c..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/companyabs.xsd +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/companyref.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/companyref.xsd deleted file mode 100644 index 1f706fca8f..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/companyref.xsd +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - elementFormDefault="qualified"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/companysubs.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/companysubs.xsd deleted file mode 100644 index 3e16090350..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/companysubs.xsd +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/csload-output.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/csload-output.txt deleted file mode 100644 index bdd05c0a32..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/csload-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.2#/departments.0/employees.1#/departments.0/employees.3#/departments.0/employees.4 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/csload2-output.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/csload2-output.txt deleted file mode 100644 index 1094229a7f..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/csload2-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.1#/departments.0/employees.1#/departments.0/employees.1#/departments.1/employees.4#/departments.1/employees.3#/departments.1/employees.2#/departments.1/employees.1#/departments.1/employees.0#/departments.1#/departments.0/employees.2 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/csload3-output.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/csload3-output.txt deleted file mode 100644 index 1094229a7f..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/csload3-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.1#/departments.0/employees.1#/departments.0/employees.1#/departments.1/employees.4#/departments.1/employees.3#/departments.1/employees.2#/departments.1/employees.1#/departments.1/employees.0#/departments.1#/departments.0/employees.2 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/cssave-output.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/cssave-output.txt deleted file mode 100644 index 7e6f5789c3..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/cssave-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.2#/departments.0/employees.1#/departments.0/employees.3#/departments.0/employees.4 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/cssave2-output.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/cssave2-output.txt deleted file mode 100644 index 5549be0a44..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/cssave2-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.1#/departments.0/employees.1#/departments.0/employees.1#/departments.1/employees.4#/departments.1/employees.3#/departments.1/employees.2#/departments.1/employees.1#/departments.1/employees.0#/departments.1#/departments.0/employees.2 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/datetest.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/datetest.txt deleted file mode 100644 index 3da923ea55..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/datetest.txt +++ /dev/null @@ -1,4 +0,0 @@ -Name of the company is DateTest -Set start of the company is 1000 -Review number:0 was:2000 -Review number:1 was:4000 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/defaults.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/defaults.txt deleted file mode 100644 index 1cdba8ea05..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/defaults.txt +++ /dev/null @@ -1,10 +0,0 @@ -Boolean default is true: 1 -Byte default is d: 100 -Character default is e: 101 -Short default is 300: 300 -Long default is 400: 400 -Expected index out of range OK -Float default is 600: 600.000 -LongDouble default is 700: 700.000 -String default is HELP: HELP -Bytes default is HELP: HELP diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.txt deleted file mode 100644 index b08b52a605..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.txt +++ /dev/null @@ -1,2 +0,0 @@ -RootURI=companyNS -RootName=company diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xml deleted file mode 100644 index 0e1a4e1a7e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xsd deleted file mode 100644 index 0c953a6348..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xsd +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq.xsd deleted file mode 100644 index 11fcdd956e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq_expected.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq_expected.xml deleted file mode 100644 index bb44dd330f..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq_expected.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - test data - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/employee.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/employee.xsd deleted file mode 100644 index e2eec63eea..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/employee.xsd +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs1.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs1.txt deleted file mode 100644 index 7ab37e28a5..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs1.txt +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs2.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs2.txt deleted file mode 100644 index 8e4fe720e5..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs2.txt +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs3.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs3.txt deleted file mode 100644 index 4195c4aeb8..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs3.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.3 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/error1.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/error1.xml deleted file mode 100644 index 3680df3ccf..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/error1.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - -Jane Doe - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/error1.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/error1.xsd deleted file mode 100644 index 6246be5efa..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/error1.xsd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/extension.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/extension.xsd deleted file mode 100644 index 7e6b336516..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/extension.xsd +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xml deleted file mode 100644 index 6abc3787ae..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - idvalue0 - idvalue0 - - - - - ElementInSubstitutionGroupBase - ElementInSubstitutionGroupExtends - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xsd deleted file mode 100644 index e57ba569d3..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xsd +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/g/gCustomer.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/g/gCustomer.xsd deleted file mode 100644 index 055d758ca4..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/g/gCustomer.xsd +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xml deleted file mode 100644 index 91a31c45f2..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - -1132323800NONE12Drummers drumming12.99113French Hens3.99211Graham Charters24 Big StreetBig CityBig StateUp Your Coat234234234243Big2342.097e+001 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xsd deleted file mode 100644 index 33683b1c62..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xsd +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/g3.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/g3.xsd deleted file mode 100644 index 4ed8b44fc2..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/g3.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/getproptest.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/getproptest.txt deleted file mode 100644 index f6bea1325d..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/getproptest.txt +++ /dev/null @@ -1,8 +0,0 @@ -Companys name property is: name -Companys dept property is:departments -Departments empl property is:employees -Departments empl property is:employees -Employees name property is:name -Normal exception caught -Normal exception caught -Normal exception caught diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/graham1.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/graham1.xsd deleted file mode 100644 index 9c07e4b75d..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/graham1.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/graham2.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/graham2.xsd deleted file mode 100644 index 0148a42e41..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/graham2.xsd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/graham3.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/graham3.xsd deleted file mode 100644 index 969a6f8eb0..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/graham3.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup.xsd deleted file mode 100644 index 3e4a1a7d3a..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup.xsd +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup_xsd.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup_xsd.txt deleted file mode 100644 index 7eba22a274..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup_xsd.txt +++ /dev/null @@ -1,25 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -*******************************END TYPES****************** diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup.xsd deleted file mode 100644 index 8e8a7aded6..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup.xsd +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup_xsd.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup_xsd.txt deleted file mode 100644 index f879c8adb2..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup_xsd.txt +++ /dev/null @@ -1,29 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:first2 of type String -Property:middle2 of type String -Property:last2 of type String -Property:title of type String -*******************************END TYPES****************** diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate.xsd deleted file mode 100644 index 1e1b5c5678..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate_xsd.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate_xsd.txt deleted file mode 100644 index 81ccaee474..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate_xsd.txt +++ /dev/null @@ -1,26 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -*******************************END TYPES****************** diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix.xsd deleted file mode 100644 index fc61269d42..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix_xsd.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix_xsd.txt deleted file mode 100644 index 81ccaee474..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix_xsd.txt +++ /dev/null @@ -1,26 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -*******************************END TYPES****************** diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/groupwrongname.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/groupwrongname.xsd deleted file mode 100644 index 8905af53d8..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/groupwrongname.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/inc1.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/inc1.txt deleted file mode 100644 index bf517ec394..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/inc1.txt +++ /dev/null @@ -1,22 +0,0 @@ -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://example.org/Calculator#RootType -Type:http://example.org/CalculatorTypes#AddArguments -Property:a -Property:b -Type:http://example.org/CalculatorTypes#RootType diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/inc2.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/inc2.txt deleted file mode 100644 index ac4a97479f..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/inc2.txt +++ /dev/null @@ -1,21 +0,0 @@ -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://example.org/Calculator#AddArguments -Property:a -Property:b -Type:http://example.org/Calculator#RootType diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/include.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/include.xsd deleted file mode 100644 index 904ec8e1fd..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/include.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/include1.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/include1.xsd deleted file mode 100644 index 8c4187077c..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/include1.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/include2.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/include2.xsd deleted file mode 100644 index 5c05afdf36..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/include2.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/includeother3.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/includeother3.xsd deleted file mode 100644 index c661f6871e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/includeother3.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/jira1112expected.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/jira1112expected.xml deleted file mode 100644 index afbfc26c23..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/jira1112expected.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Will - Shakespeare - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/jira490.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/jira490.txt deleted file mode 100644 index 4527deb32a..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/jira490.txt +++ /dev/null @@ -1,53 +0,0 @@ -Test Program starting to create types ... - -Before Resolution - -Printing Types -Type BigDecimal -Type BigInteger -Type Boolean -Type Byte -Type Bytes -Type ChangeSummary -Type Character -Type DataObject -Type Date -Type Double -Type Float -Type Integer -Type Long -Type OpenDataObject -Type Short -Type String -Type URI -Type Employee -Has Property name of type String -Has Property officeNumber of type String - -After Resolution - -Printing Types -Type BigDecimal -Type BigInteger -Type Boolean -Type Byte -Type Bytes -Type ChangeSummary -Type Character -Type DataObject -Type Date -Type Double -Type Float -Type Integer -Type Long -Type OpenDataObject -Type Short -Type String -Type URI -Type Employee -Has Property name of type String -Has Property officeNumber of type String -Mr A Trader -123 -123 -{ diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/jira705.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/jira705.xsd deleted file mode 100644 index 0001371677..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/jira705.xsd +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/jira705_out.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/jira705_out.txt deleted file mode 100644 index 8411d1e07c..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/jira705_out.txt +++ /dev/null @@ -1,5 +0,0 @@ - - - IBM - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_animaltypes.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_animaltypes.xsd deleted file mode 100644 index bdac34da46..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_animaltypes.xsd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle.xsd deleted file mode 100644 index abe6132f08..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle.xsd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle_out.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle_out.txt deleted file mode 100644 index 708fd26963..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle_out.txt +++ /dev/null @@ -1,2 +0,0 @@ - -Mummy bear700Bagheerainky blackKaa25 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle.xsd deleted file mode 100644 index 95697e1788..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle.xsd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle_out.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle_out.txt deleted file mode 100644 index 63b4e85c26..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle_out.txt +++ /dev/null @@ -1,2 +0,0 @@ - -Mummy bear700Bagheerainky blackKaa25 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_splitJungle_out.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_splitJungle_out.txt deleted file mode 100644 index 708fd26963..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_splitJungle_out.txt +++ /dev/null @@ -1,2 +0,0 @@ - -Mummy bear700Bagheerainky blackKaa25 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/list1.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/list1.xml deleted file mode 100644 index a40accebc2..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/list1.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - 1 2 3 4 5 6 7 8 9 - - This -is a strange - set of strings - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/list1.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/list1.xsd deleted file mode 100644 index 89faa4d68b..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/list1.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/list1_xml.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/list1_xml.txt deleted file mode 100644 index ddf8e8ac22..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/list1_xml.txt +++ /dev/null @@ -1,70 +0,0 @@ -***** TYPES AFTER RESOLVE********************************* -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:listtest of type listTestType -Type:http://www.wrox.com/name#intListType -Property:values (many) of type Integer -Type:http://www.wrox.com/name#listTestType -Property:integers (many) of type intListType -Property:strings (many) of type stringListType -Type:http://www.wrox.com/name#stringListType -Property:values (many) of type String -*******************************END TYPES****************** -===== DataObject contents ===== -integers: list dataObject[0]= -===== DataObject contents ===== -values: list integer[0]=1 - -integer[1]=2 - -integer[2]=3 - -integer[3]=4 - -integer[4]=5 - -integer[5]=6 - -integer[6]=7 - -integer[7]=8 - -integer[8]=9 - -===== End DataObject ===== - -strings: list dataObject[0]= -===== DataObject contents ===== -values: list string[0]=This - -string[1]=is - -string[2]=a - -string[3]=strange - -string[4]=set - -string[5]=of - -string[6]=strings - -===== End DataObject ===== - -===== End DataObject ===== diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/list1_xsd.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/list1_xsd.txt deleted file mode 100644 index 2adeaf3a7c..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/list1_xsd.txt +++ /dev/null @@ -1,28 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:listtest of type listTestType -Type:http://www.wrox.com/name#intListType -Property:values (many) of type Integer -Type:http://www.wrox.com/name#listTestType -Property:integers (many) of type intListType -Property:strings (many) of type stringListType -Type:http://www.wrox.com/name#stringListType -Property:values (many) of type String -*******************************END TYPES****************** diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/loadload-output.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/loadload-output.txt deleted file mode 100644 index 67f8c2d7eb..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/loadload-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.0/opendataobjectlist.0#/departments.0/employees.0/opendataobject#/departments.0/employees.045 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/main.cpp b/branches/sdo-cpp-pre2.1/runtime/core/test/main.cpp deleted file mode 100644 index dc5673e98d..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/main.cpp +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* $Rev$ $Date$ */ - -#include - -#pragma warning(disable:4786) - -#include -using namespace std; - -#include "sdotest.h" - -extern "C"{ - -#define TEST(testname)\ - value = testname;\ - totaltests++;\ - if (value == 0) {\ - cout << "Test Failed: " << totaltests << " " << #testname << endl;\ - }\ - testspassed += value; - -int main (int argc, char** argv) -{ - //Logger::setLogging(20); - - int testspassed=0; - int totaltests=0; - int value = 0; - try { - - //TEST ( sdotest::eBayTest() ); - // TEST ( sdotest::xhtml1() ); - TEST ( sdotest::scopetest() ); - TEST ( sdotest::xsdtosdo() ); - TEST ( sdotest::jira980() ); - - /* groups now supported*/ - TEST ( sdotest::testany("list1.xsd",0,"list1.xml", 0) ); - TEST ( sdotest::testany("b48636.xsd",0,"b48636.xml", 0) ); - TEST ( sdotest::testany("groupwithprefix.xsd", 0, 0, 0) ); - TEST ( sdotest::testany("groupwrongname.xsd","Use of undefined group NameGroup", 0, 0) ); - - // late definition of group now supported - TEST ( sdotest::testany("grouptoolate.xsd",0 , 0, 0) ); - - // group definition within group now ignored - - TEST ( sdotest::testany("groupingroup.xsd","Use of undefined group NameGroup2",0, 0) ); - TEST ( sdotest::testany("grouprefingroup.xsd",0,0, 0) ); - TEST ( sdotest::testany("bothgroups.xsd",0,0, 0) ); - TEST ( sdotest::testany("bothgroupssamename.xsd",0,0, 0) ); - - /* general tests */ - TEST ( sdotest::pete() ); - TEST ( sdotest::stocktest() ); - TEST ( sdotest::definetest() ); - TEST ( sdotest::emptycs() ); - TEST ( sdotest::openseq() ); - TEST ( sdotest::testanytwo("b48633b.xsd","b48633.xsd","b48633.xml") ); - TEST ( sdotest::testany("b48686.xsd",0, "b48686.xml", 0) ); - TEST ( sdotest::testany("b48636.xsd","Use of undefined group NameGroup","b48636.xml", 0) ); - TEST ( sdotest::b48602() ); - TEST ( sdotest::compatiblefactory() ); - TEST ( sdotest::simple() ); - TEST ( sdotest::testOrder("employee.xsd","extension.xsd","order1.dat","order1.txt") ); - TEST ( sdotest::testOrder("extension.xsd","employee.xsd","order2.dat","order2.txt") ); - TEST ( sdotest::testOpen() ); - TEST ( sdotest::testinc2("calculator2.wsdl","inc1.dat","inc1.txt") ); - TEST ( sdotest::testinc2("calculator2a.wsdl","inc2.dat","inc2.txt") ); - TEST ( sdotest::teststyles() ); - TEST ( sdotest::badelement() ); - TEST ( sdotest::oddchars() ); - TEST ( sdotest::notns() ); - TEST ( sdotest::unsetlist() ); - TEST ( sdotest::travel() ); - /*TEST ( sdotest::testwsdl() );*/ - TEST ( sdotest::bunique() ); - TEST ( sdotest::buniqueread() ); - TEST ( sdotest::propdefaulttest() ); - TEST ( sdotest::graham5() ); - TEST ( sdotest::graham4() ); - TEST ( sdotest::detachtest() ); - TEST ( sdotest::includetest() ); - TEST ( sdotest::testLoad() ); - TEST ( sdotest::leak() ); - TEST ( sdotest::twolists() ); - TEST ( sdotest::testUtil() ); - TEST ( sdotest::clonetest() ); - TEST ( sdotest::notfound() ); - TEST ( sdotest::testErrors() ); - TEST ( sdotest::loadManyOpen() ); - TEST ( sdotest::doctest() ); - TEST ( sdotest::graham3() ); - TEST ( sdotest::graham1() ); - TEST ( sdotest::graham2() ); - TEST ( sdotest::merle1() ); - TEST ( sdotest::loadOpenNS() ); - TEST ( sdotest::saveOpen() ); - TEST ( sdotest::loadOpen() ); - TEST ( sdotest::testui() ); - TEST ( sdotest::testSCA() ); - TEST ( sdotest::testabstract() ); - TEST ( sdotest::testsubsload() ); - TEST ( sdotest::testsubs() ); - TEST ( sdotest::setnull() ); - TEST ( sdotest::bug2() ); - TEST ( sdotest::cssave2() ); - TEST ( sdotest::csload2() ); - TEST ( sdotest::cssave() ); - TEST ( sdotest::csload() ); - TEST ( sdotest::bug1() ); - TEST ( sdotest::eqhelpertest() ); - TEST ( sdotest::cohelpertest() ); - TEST ( sdotest::datetest() ); - TEST ( sdotest::carotest3() ); - TEST ( sdotest::matttest1() ); - TEST ( sdotest::adddeletetest() ); - TEST ( sdotest::carotest2() ); - TEST ( sdotest::carotest() ); - TEST ( sdotest::setmany() ); - TEST ( sdotest::noncontest() ); - TEST ( sdotest::versiontest() ); - TEST ( sdotest::defaulttest() ); - TEST ( sdotest::defaulttest_strobj() ); - TEST ( sdotest::nulltest() ); - TEST ( sdotest::usertest() ); - TEST ( sdotest::querytest() ); - TEST ( sdotest::getproptest() ); - TEST ( sdotest::rcptest() ); - TEST ( sdotest::seqtest() ); - TEST ( sdotest::changesummarytest() ); - TEST ( sdotest::conversiontest() ); - TEST ( sdotest::boolbug() ); - TEST ( sdotest::scope1() ); - TEST ( sdotest::scope2() ); - TEST ( sdotest::scope3() ); - TEST ( sdotest::maintest() ); - - /* regression tests */ - TEST ( sdotest::b48736() ); - /*TEST ( sdotest::b48601() );*/ - TEST ( sdotest::b47293() ); - TEST ( sdotest::b48300() ); - TEST ( sdotest::b47663() ); - TEST ( sdotest::b47802() ); - TEST ( sdotest::b47137() ); - TEST ( sdotest::b47137b() ); - TEST ( sdotest::b46633() ); - TEST ( sdotest::b46693() ); - TEST ( sdotest::b46734() ); - TEST ( sdotest::b46634() ); - TEST ( sdotest::b46617b() ); - TEST ( sdotest::b46617() ); - TEST ( sdotest::b46613() ); - TEST ( sdotest::b45933() ); - TEST ( sdotest::jira490() ); - TEST ( sdotest::jira705() ); - TEST ( sdotest::jira546() ); - TEST ( sdotest::jira945() ); - TEST ( sdotest::testXPath() ); - - TEST ( sdotest::cdatatest() ); - TEST ( sdotest::cloneopentest() ); - TEST ( sdotest::tuscany963() ); - TEST ( sdotest::tuscany562() ); - TEST ( sdotest::typedefinitionstest() ); - - TEST ( sdotest::jira1174() ); - TEST ( sdotest::jira1238() ); - TEST ( sdotest::loadWithoutSchema() ); - //TEST ( sdotest::jira445() ); - TEST ( sdotest::jira1112() ); - TEST ( sdotest::elementFormDefaultQualified() ); - TEST ( sdotest::elementFormDefaultQualifiedSequence() ); - TEST ( sdotest::xsiTypeAbstract() ); - TEST ( sdotest::nullExtendedPrimitive() ); - - - } catch(...) - { - cout << "unexpected exception caught" << endl; - } - - cout << "Total tests:" << totaltests << " Tests passed:" << testspassed << endl; - return testspassed - totaltests; -} -} diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/maintest.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/maintest.txt deleted file mode 100644 index 5f0da2eaa4..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/maintest.txt +++ /dev/null @@ -1,188 +0,0 @@ -Test Program starting to create types ... -Manager is sequenced?1 -Manager is sequenced?1 -Manager is sequenced?1 -Manager is sequenced?1 -Manager is sequenced?1 -Manager is sequenced?1 -Manager is sequenced?1 -Should be Company :Company -Should be 3: 3 -Alias: TheFirm -Alias: TheBigFirm -Alias: TheLittleFirm -Manager is sequenced?1 -BEFORE RESOLUTION -Printing Types -Type BigDecimal -Type BigInteger -Type Boolean -Type Byte -Type Bytes -Type ChangeSummary -Type Character -Type DataObject -Type Date -Type Double -Type Float -Type Integer -Type Long -Type OpenDataObject -Type Short -Type String -Type URI -Type Company -Has Property name of type String -Has Property address of type String -Has Property departments of type Department -Has Property employee of the month of type Employee -Has Property floatlist of type Float -Has Property pdg of type Manager -Has Property shareholder of type Person -Has Property substring of type DerivedString -Has Property subdepartments of type SubDepartment -Type Department -Has Property name of type String -Has Property id of type Integer -Has Property manager of type Manager -Has Property employees of type Employee -Type DerivedString -Type Employee -Has Property name of type String -Has Property cubelocation of type String -Type Manager -Has Property name of type String -Has Property officeid of type String -Has Property str of type String -Has Property boolean of type Boolean -Has Property byte of type Byte -Has Property character of type Character -Has Property short of type Short -Has Property long of type Integer -Has Property longlong of type Long -Has Property float of type Float -Has Property longdouble of type Double -Has Property date of type Date -Has Property string of type String -Has Property bytes of type Bytes -Type Person -Has Property haircolour of type String -Has Property name of type String -Type SubDepartment -Has Property subname of type String -AFTER RESOLUTION -Printing Types -Type BigDecimal -Type BigInteger -Type Boolean -Type Byte -Type Bytes -Type ChangeSummary -Type Character -Type DataObject -Type Date -Type Double -Type Float -Type Integer -Type Long -Type OpenDataObject -Type Short -Type String -Type URI -Type Company -Has Property name of type String -Has Property address of type String -Has Property departments of type Department -Has Property employee of the month of type Employee -Has Property floatlist of type Float -Has Property pdg of type Manager -Has Property shareholder of type Person -Has Property substring of type DerivedString -Has Property subdepartments of type SubDepartment -Type Department -Has Property name of type String -Has Property id of type Integer -Has Property manager of type Manager -Has Property employees of type Employee -Type DerivedString -Type Employee -Has Property haircolour of type String -Has Property name of type String -Has Property name of type String -Has Property cubelocation of type String -Type Manager -Has Property haircolour of type String -Has Property name of type String -Has Property name of type String -Has Property officeid of type String -Has Property str of type String -Has Property boolean of type Boolean -Has Property byte of type Byte -Has Property character of type Character -Has Property short of type Short -Has Property long of type Integer -Has Property longlong of type Long -Has Property float of type Float -Has Property longdouble of type Double -Has Property date of type Date -Has Property string of type String -Has Property bytes of type Bytes -Type Person -Has Property haircolour of type String -Has Property name of type String -Type SubDepartment -Has Property name of type String -Has Property id of type Integer -Has Property manager of type Manager -Has Property employees of type Employee -Has Property subname of type String -Manager is sequenced?1 -This is the sub string - its primitive, but not a string -acmecorp -acmecorp -Expected default boolean (false) : false -Expected boolean (true) : true -Expected default string (0) : Now able to set - - should say now able to set - - Name from deleted item: Now able to set -0xffffffffffffffff = : -1 -0x7fffffffffffffff = 9223372036854775807 -0x7fffffff = 2147483647 -0x80000000 = 2147483648 - Expected Wide - got : Wide - Expected Thin - got : Thin -Expecting string, got Wide -Expected bool true, got 1 -Expected char 23, got 23 -expected wchar 45, got 45Expected short 34, got 34 -Expected long 56 , got 56 -Expected long long 78, got 78 -Expected long double 89, got 89.000 -Expected float 90, got 90.000 -Expected time_t 200, got 200 -Wide[0]=87 -Wide[1]=105 -Wide[2]=100 -Wide[3]=101 -Thin[0]=84 -Thin[1]=104 -Thin[2]=105 -Thin[3]=110 -1.400567.700Should be Bill:Bill -Should be Bill:Bill -The employee of the month is Bill -Now able to set -pdg correctly identified -Now able to set -size of list 5 -Research And Development -Research And Development -Department: Research And Development -Department: Marketing -Department: Architecture -Department: Pyrotechnics -Department: Accounts -String in list type:department label -Normal Invalid path exception -Normal SDOPropertyNotFound exception diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/many.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/many.xml deleted file mode 100644 index fe78c6198b..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/many.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - -#/departments.0/employees.0 - - - -Three member -Open bytes -List is complete - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/many.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/many.xsd deleted file mode 100644 index 7d49ca3258..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/many.xsd +++ /dev/null @@ -1,21 +0,0 @@ - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/matttest1.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/matttest1.txt deleted file mode 100644 index 5c5200ff22..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/matttest1.txt +++ /dev/null @@ -1,2 +0,0 @@ -Container of Billy should be dept1, and is :Shoe -Container of Billy should be dept2, and is :IT diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/merle1.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/merle1.txt deleted file mode 100644 index 4e15696ac8..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/merle1.txt +++ /dev/null @@ -1,10 +0,0 @@ -I am the subscription ID string -I am the associate Tag string -I am the XML escaping string -I am the Validate string -DataObject "Shared" as XML: -SharedKeywordsStringSearchIndexString - -DataObject "Request" as XML: -RequestKeywordsRequestSearchIndex - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/my-core.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/my-core.xsd deleted file mode 100644 index acfc5c9f13..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/my-core.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/my-implementation-local-java.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/my-implementation-local-java.xsd deleted file mode 100644 index a7ef0f6ecd..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/my-implementation-local-java.xsd +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/my.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/my.xsd deleted file mode 100644 index e910a7db44..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/my.xsd +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/noschema.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/noschema.xml deleted file mode 100644 index 05a8697c51..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/noschema.xml +++ /dev/null @@ -1,2 +0,0 @@ - -IBM79.785/24/20060.00N/AN/AN/A900123.7B79.780.0073.45 - 89.945.12115.58INTL BUSINESS MAC diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/notns.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/notns.txt deleted file mode 100644 index a6f2bc0411..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/notns.txt +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xml deleted file mode 100644 index 4f2652f72e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xsd deleted file mode 100644 index 7cf7c018d9..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xsd +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/nulltest.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/nulltest.txt deleted file mode 100644 index 01442ec949..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/nulltest.txt +++ /dev/null @@ -1,91 +0,0 @@ -Initially - all properties unset, and default values... -boolean set:0 value false -byte set:0 value 0 -character set:0 value 0 -short set:0 value 0 -long set:0 value 0 -longlong set:0 value -float set:0 value -longdouble set:0 value -date set:0 value -string set:0 value -bytes set:0 value -object set: 0 value: is empty -Should now have all properties set, and zero values... -boolean set:1 value:false -byte set:1 value:0 -character set:1 value:0 -short set:1 value:0 -long set:1 value:0 -longlong set:1 value:0 -float set:1 value:0.000e+000 -longdouble set:1 value:0.000e+000 -date set:1 value:0 -string set:1 value: -bytes set:1 value: -object set:1 dataobject -Should be back to having properties unset, and default values... -boolean set:0 value:false -byte set:0 value:0 -character set:0 value:0 -short set:0 value:0 -long set:0 value:0 -longlong set:0 value: -float set:0 value: -longdouble set:0 value: -date set:0 value: -string set:0 value: -bytes set:0 value: -object set: 0 dataobject is empty -boolean set:1 value:false -byte set:1 value:0 -character set:1 value:0 -short set:1 value:0 -long set:1 value:0 -longlong set:1 value:0 -float set:1 value:0.000e+000 -longdouble set:1 value:0.000e+000 -date set:0 value: -string set:1 value: -bytes set:1 value: -object set:1 dataobject is empty -Modified dataobject -Should all be null, and default values... -boolean isNull:1 set:1 value: -byte isNull:1 set:1 value: -character isNull:1 set:1 value: -short isNull:1 set:1 value: -long isNull:1 set:1 value: -longlong isNull:1 set:1 value: -float isNull:1 set:1 value: -longdouble isNull:1 set:1 value: -date isNull:1 set:1 value: -string isNull:1 set:1 value: -bytes isNull:1 set:1 value: -object isNull:1 set:1 value empty -Should all have values, and not be null.. -boolean isNull:0 set:1 value:true -byte isNull:0 set:1 value:1 -character isNull:0 set:1 value:1 -short isNull:0 set:1 value:1 -long isNull:0 set:1 value:1 -longlong isNull:0 set:1 value:1 -float isNull:0 set:1 value:1.000e+000 -longdouble isNull:0 set:1 value:1.000e+000 -date isNull:1 set:1 value: -string isNull:0 set:1 value:hello -bytes isNull:0 set:1 value:hello -object isNull0 set:1 value: dataobject -Should all be null, and default values... -boolean isNull:1 set:1 value: -byte isNull:1 set:1 value: -character isNull:1 set:1 value: -short isNull:1 set:1 value: -long isNull:1 set:1 value: -longlong isNull:1 set:1 value: -float isNull:1 set:1 value: -longdouble isNull:1 set:1 value: -date isNull:1 set:1 value: -string isNull:1 set:1 value: -bytes isNull:1 set:1 value: -object isNull;1 set:1 value: empty diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/oddchars.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/oddchars.txt deleted file mode 100644 index b9ed9643b3..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/oddchars.txt +++ /dev/null @@ -1,22 +0,0 @@ -===== DataObject contents ===== -Flight: list dataObject[0]= -===== DataObject contents ===== -Departure:string:ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╔╩╦╠═╬¤ðÐÊËÈıÍÎÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■  - -Arrival:string:Pound:£ Dollar:$ Euro:Ç or █ - -flightNo:string:BA243 - -===== End DataObject ===== - -Hotel: list (empty) -Excursion:dataObject - - null or unset - -Client:dataObject - - null or unset - -Party:dataObject - - null or unset - -===== End DataObject ===== diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xml deleted file mode 100644 index 1b5d7e1b6a..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -#/departments.0/employees.0 - - - -45 - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xsd deleted file mode 100644 index 336f40def7..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xsd +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xml deleted file mode 100644 index ff2b31c610..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -#/departments.0/employees.0 - - - -45 - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xsd deleted file mode 100644 index e1498578cf..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xsd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNSout.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNSout.txt deleted file mode 100644 index 21e6df8d9e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNSout.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.045 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/openseq.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/openseq.txt deleted file mode 100644 index 44091f2608..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/openseq.txt +++ /dev/null @@ -1,3 +0,0 @@ -Open Type string value: Value Of Open String -Open Sequenced string value: Value of sequenced string -Open Sequenced string value from seq: Value of sequenced string diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/order1.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/order1.txt deleted file mode 100644 index 4f46cbfecf..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/order1.txt +++ /dev/null @@ -1,19 +0,0 @@ -Type:#Address -Property:name -Property:street -Property:city -Type:#RootType -Property:employee -Type:#UKAddress -Property:value -Property:postcode -Type:#USAddress -Property:value -Property:zip -Type:#fullpersoninfo -Property:address -Property:city -Property:country -Type:#personinfo -Property:firstname -Property:lastname diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/order2.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/order2.txt deleted file mode 100644 index 4f46cbfecf..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/order2.txt +++ /dev/null @@ -1,19 +0,0 @@ -Type:#Address -Property:name -Property:street -Property:city -Type:#RootType -Property:employee -Type:#UKAddress -Property:value -Property:postcode -Type:#USAddress -Property:value -Property:zip -Type:#fullpersoninfo -Property:address -Property:city -Property:country -Type:#personinfo -Property:firstname -Property:lastname diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/overlappingtypes.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/overlappingtypes.xsd deleted file mode 100644 index a388cff528..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/overlappingtypes.xsd +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/partial.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/partial.xml deleted file mode 100644 index 11acb1b806..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/partial.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - -#/departments.0/employees.0 - - - -45 - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/person.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/person.xsd deleted file mode 100644 index d2d1842ecc..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/person.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/pete.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/pete.xml deleted file mode 100644 index 21c4d71914..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/pete.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - -IBM -79.78 -5/24/2006 - -0.00 -N/A -N/A -N/A -900 -123.7B -79.78 -0.00 -73.45 - 89.94 -5.121 -15.58 -INTL BUSINESS MAC - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/pete.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/pete.xsd deleted file mode 100644 index f61d50a942..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/pete.xsd +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/qualified.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/qualified.xml deleted file mode 100644 index 4b26cb274c..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/qualified.xml +++ /dev/null @@ -1,2 +0,0 @@ - -IBM diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/querytest.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/querytest.txt deleted file mode 100644 index 9b895282a0..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/querytest.txt +++ /dev/null @@ -1,17 +0,0 @@ -Expected employee3: got Employee3 -Expected employee1: got Employee1 -Expected employee2: got Employee2 -Expected employee1: got Employee1 -Expected employee1: got Employee1 -Expected employee1: got Employee1 -Expected employee1: got Employee1 -Expected employee3: got Employee3 -Expected employee2: got Employee2 -Expected employee2: got Employee2 -Expected employee2: got Employee2 -Expected employee2: got Employee2 -Normal exception caught -Normal exception caught -Normal exception caught -Normal exception caught -Normal exception caught diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/saveopen-output.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/saveopen-output.txt deleted file mode 100644 index cae11d2320..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/saveopen-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.0#/departments.0/employees.1#/departments.0/employees.2#/departments.0/employees.0/opendataobjectlist.045 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-sca.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-sca.xsd deleted file mode 100644 index d0adc9bda0..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-sca.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-webservice.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-webservice.xsd deleted file mode 100644 index 60c642fbfe..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-webservice.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-ws.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-ws.xsd deleted file mode 100644 index 5ee7500578..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-ws.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-core.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/sca-core.xsd deleted file mode 100644 index cfe9d8d884..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-core.xsd +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-dll.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-dll.xsd deleted file mode 100644 index 6e1ec1d6eb..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-dll.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-java.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-java.xsd deleted file mode 100644 index 3f54089755..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-java.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-local-java.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-local-java.xsd deleted file mode 100644 index ce4f529f3e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-local-java.xsd +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-cpp.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-cpp.xsd deleted file mode 100644 index ddbfe540b7..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-cpp.xsd +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-java.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-java.xsd deleted file mode 100644 index 579f9483df..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-java.xsd +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-wsdl.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-wsdl.xsd deleted file mode 100644 index 9c15d87485..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-wsdl.xsd +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-java.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-java.xsd deleted file mode 100644 index 77a6df6772..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-java.xsd +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-xsd.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-xsd.xsd deleted file mode 100644 index 2820bd3dd6..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-xsd.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sca.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/sca.xsd deleted file mode 100644 index 72cc5f497b..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sca.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/scenario1.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/scenario1.txt deleted file mode 100644 index a0a3c7a203..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/scenario1.txt +++ /dev/null @@ -1,10 +0,0 @@ -Created object in changed list -The object is myspace#Company -===== Modified Object Starts -Xpath:#/ -The modified objects type is myspace#Root -===== Old Property Values Begin -Property companies[0](UNSET) of type DataObject - object null or unset - -===== Old Property Values End -=====Modified Object Ends diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/scenario2.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/scenario2.txt deleted file mode 100644 index 9728bd6f0a..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/scenario2.txt +++ /dev/null @@ -1,8 +0,0 @@ -===== Modified Object Starts -Xpath:#/companies.0 -The modified objects type is myspace#Company -===== Old Property Values Begin -Property name of type String:acme - -===== Old Property Values End -=====Modified Object Ends diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/scenario3.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/scenario3.txt deleted file mode 100644 index e174f62538..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/scenario3.txt +++ /dev/null @@ -1,22 +0,0 @@ -=====Deleted Object Starts -===== Old Property Values Begin -Property name of type String:acme - -Property id of type String:123 - -===== Old Property Values End -=====Deleted Object Ends -===== Modified Object Starts -Xpath:#/ -The modified objects type is myspace#Root -===== Old Property Values Begin -Property companies[0] of type DataObject - object deleted -===== Old Property Values Begin -Property name of type String:acme - -Property id of type String:123 - -===== Old Property Values End - -===== Old Property Values End -=====Modified Object Ends diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/scenario4.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/scenario4.txt deleted file mode 100644 index f678499e15..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/scenario4.txt +++ /dev/null @@ -1,108 +0,0 @@ -Created object in changed list -The object is myspace#Employee -===== Modified Object Starts -Xpath:#/companies.0/departments.0 -The modified objects type is myspace#Department -===== Old Property Values Begin -Property employees[0] of type DataObject object still exists - -Property employees[1] of type DataObject object still exists - -===== Old Property Values End -=====Modified Object Ends -===== Modified Object Starts -Xpath:#/companies.0/departments.1 -The modified objects type is myspace#Department -===== Old Property Values Begin -Property employees[0] of type DataObject - object deleted -===== Old Property Values Begin -Property name of type String:Ed Memoire - -Property id of type String:1 - -===== Old Property Values End - -Property employees[1] of type DataObject object still exists - -===== Old Property Values End -=====Modified Object Ends -=====Deleted Object Starts -===== Old Property Values Begin -Property name of type String:Ed Memoire - -Property id of type String:1 - -===== Old Property Values End -=====Deleted Object Ends -=====Deleted Object Starts -===== Old Property Values Begin -Property name of type String:Ivor Payne - -Property id of type String:1 - -===== Old Property Values End -=====Deleted Object Ends -=====Deleted Object Starts -===== Old Property Values Begin -Property name of type String:Colin Poisson - -Property id of type String:2 - -===== Old Property Values End -=====Deleted Object Ends -=====Deleted Object Starts -===== Old Property Values Begin -Property name of type String:windows - -Property id of type String:1 - -Property employees[1] of type DataObject - object deleted -===== Old Property Values Begin -Property name of type String:Colin Poisson - -Property id of type String:2 - -===== Old Property Values End - -Property employees[0] of type DataObject - object deleted -===== Old Property Values Begin -Property name of type String:Ivor Payne - -Property id of type String:1 - -===== Old Property Values End - -===== Old Property Values End -=====Deleted Object Ends -===== Modified Object Starts -Xpath:#/companies.1 -The modified objects type is myspace#Company -===== Old Property Values Begin -Property departments[0] of type DataObject - object deleted -===== Old Property Values Begin -Property name of type String:windows - -Property id of type String:1 - -Property employees[1] of type DataObject - object deleted -===== Old Property Values Begin -Property name of type String:Colin Poisson - -Property id of type String:2 - -===== Old Property Values End - -Property employees[0] of type DataObject - object deleted -===== Old Property Values Begin -Property name of type String:Ivor Payne - -Property id of type String:1 - -===== Old Property Values End - -===== Old Property Values End - -Property departments[1] of type DataObject object still exists - -===== Old Property Values End -=====Modified Object Ends diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/scenario5.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/scenario5.txt deleted file mode 100644 index af5bf47102..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/scenario5.txt +++ /dev/null @@ -1,8 +0,0 @@ -===== Modified Object Starts -Xpath:#/companies.0 -The modified objects type is myspace#Company -===== Old Property Values Begin -Property eotm of type DataObject object still exists - -===== Old Property Values End -=====Modified Object Ends diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.cpp b/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.cpp deleted file mode 100644 index b070aecc7a..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.cpp +++ /dev/null @@ -1,9322 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* $Rev$ $Date$ */ - -#include -#include - -#pragma warning(disable:4786) - -#include -#include -using namespace std; - - - -#include "sdotest.h" - - - - - -using namespace commonj::sdo; - - - -/* USED IN RCPTEST */ - -typedef struct { - //zend_object zo; /* The standard zend_object */ - DataObjectPtr dop; /* The Hydra DataObject */ - //zend_object *df; /* The Data Factory */ -} sdo_doimpl_object; - - -int sdotest::rcptest() -{ - - try { - DataFactoryPtr mdg; - sdo_doimpl_object* ptr; - - mdg = DataFactory::getDataFactory(); - mdg = 0; - mdg = DataFactory::getDataFactory(); - mdg = NULL; - mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - - mdg->addType("myspace","Company"); - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","id", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Root","companies", - "myspace","Company", true, false, true); - - const Type& tcc = mdg->getType("myspace","Root"); - - - ptr = new sdo_doimpl_object; - - ptr->dop = mdg->create((Type&)tcc); - - ptr->dop = 0; // null ; - return 1; - } - catch (SDORuntimeException e) - { - if (!silent) cout << "RefCountingPointer test failed" << endl; - return 0; - } -} - -// JIRA 546 relaxes the restriction that when the data factory creates its -// first data object then the type structure known to that data factory is -// resolved and becomes read only. So, now we can add types after the first -// data object is created. We must also show that when data objects are copied -// from one data factory to another, the correct tests are performed to ensure -// that the destination factory contains the types required by the incoming -// data object and if not the copy is rejected. -int sdotest::jira546() -{ - - try { - DataFactoryPtr mdg; - - mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root1"); - - mdg->addType("myspace","Company1"); - - mdg->addPropertyToType("myspace","Company1","name1", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company1","id1", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Root1","companies1", - "myspace","Company1", true, false, true); - - const Type& tcc1 = mdg->getType("myspace","Root1"); - - - DataObjectPtr dop1 = mdg->create((Type&)tcc1); - - // The preceding data object creation forced a resolve of the type - // system. Can we still extend it? - - mdg->addType("myspace","Root2"); - - mdg->addType("myspace","Company2"); - - mdg->addPropertyToType("myspace","Company2","name2", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company2","id2", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Root2","companies2", - "myspace","Company2", true, false, true); - - const Type& tcc2 = mdg->getType("myspace","Root2"); - - DataObjectPtr dop2 = mdg->create((Type&)tcc2); - - } - catch (SDORuntimeException e) - { - if (!silent) cout << "JIRA-546 test (part 1) failed." << endl; - return 0; - } - - try { - DataFactoryPtr dfp_left = DataFactory::getDataFactory(); - DataFactoryPtr dfp_right = DataFactory::getDataFactory(); - - populateFactory(dfp_left); - populateFactory(dfp_right); - - // Extend each data factories with an additional type, the two types - // being different. Prior to TUSCANY-546 this would have made them - // incompatible. - - dfp_left->addType("Namespace", "LeftType"); - dfp_left->addPropertyToType("Namespace", - "LeftType", - "leftProperty", - "commonj.sdo", - "String", - false, - false, - false); - - dfp_right->addType("Namespace", "RightType"); - dfp_right->addPropertyToType("Namespace", - "RightType", - "rightProperty", - "commonj.sdo", - "String", - false, - false, - false); - - // Create a data object in the left factory - DataObjectPtr root = dfp_left->create("Namespace", "Root"); - DataObjectPtr project = root->createDataObject("project"); - project->setCString("id", "The TTP Project"); - DataObjectPtr str = project->createDataObject("string"); - str->setDataObject("proj", project); - str->setCString("value", "The Recursive Acronym Project"); - DataObjectPtr wp1 = project->createDataObject("packages"); - DataObjectPtr wp2 = project->createDataObject("packages"); - wp1->setCString("name", "Work Package 1"); - wp2->setCString("name", "Work Package 2"); - project->setDataObject("wp", wp2); - DataObjectPtr li1 = wp1->createDataObject("lineitems"); - DataObjectPtr li2 = wp1->createDataObject("lineitems"); - DataObjectPtr li3 = wp2->createDataObject("lineitems"); - DataObjectPtr li4 = wp2->createDataObject("lineitems"); - li1->setCString("itemname", "LineItem 1"); - li2->setCString("itemname", "LineItem 2"); - li3->setCString("itemname", "LineItem 3"); - li4->setCString("itemname", "LineItem 4"); - DataObjectPtr str1 = li1->createDataObject("string"); - DataObjectPtr str2 = li2->createDataObject("string"); - DataObjectPtr str3 = li3->createDataObject("string"); - DataObjectPtr str4 = li4->createDataObject("string"); - str1->setCString("value", "String1"); - str2->setCString("value", "String2"); - str3->setCString("value", "String3"); - str4->setCString("value", "String4"); - - if (!transferto(root, dfp_right, false)) return 0; - return 1; - } - catch (SDORuntimeException e) - { - if (!silent) cout << "JIRA-546 test (part 2) failed." << endl; - return 0; - } -} - -int sdotest::changesummarytest() -{ - if (scenario5() == 0) return 0; - if (scenario1() == 0) return 0; - if (scenario2() == 0) return 0; - if (scenario3() == 0) return 0; - if (scenario4() == 0) return 0; - return 1; -} - - -int sdotest::scenario1() -{ - // scenario 1 - // create root type - root has cs - // create a company type. and containment ref from root, many valued. - // props on comp id, name both strings single v. - // create root object - // begin logging - // create a company obj. name=acme id=123 - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addPropertyToType("myspace","Root","whatever", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addType("myspace","Company"); - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","id", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Root","companies", - "myspace","Company", true, false, true); - - const Type& tcc = mdg->getType("myspace","Root"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - ChangeSummaryPtr cs = dor->getChangeSummary(); - cs->beginLogging(); - - DataObjectPtr com = dor->createDataObject("companies"); - com->setCString("name","acme"); - com->setCString("id","123"); - - FILE *f = fopen("scenario1.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open secnario1.dat" << endl; - return 0; - } - - dumpchangesummary(f, cs); - - fclose(f); - - cs->endLogging(); - - //expect cdo: - //root - isChanged - //comp - isCreated - - return comparefiles("scenario1.dat","scenario1.txt"); -} - - -int sdotest::testui() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("companyNS","MainType"); - - - /* Now add the properties to the types...*/ - - - const Type& tmain = mdg->getType("companyNS","MainType"); - const Type& tshort = mdg->getType("commonj.sdo","Short"); - const Type& tint = mdg->getType("commonj.sdo","Integer"); - - - mdg->addPropertyToType(tmain,"short",tshort,true); - mdg->addPropertyToType(tmain,"int",tint, true); - - DataObjectPtr main = mdg->create((Type&)tmain); - - DataObjectList& dol1 = main->getList("short"); - DataObjectList& dol2 = main->getList("int"); - DataObjectList& dol3 = main->getList((unsigned int)0); - DataObjectList& dol4 = main->getList(1); - - return 1; - } - - catch (SDORuntimeException e) - { - if (!silent) cout << "Unsigned integer test failed" << endl << e << endl; - return 0; - } - -} - - - -int sdotest::scenario5() -{ - // scenario 5 - // create root type - root has cs - // create a company type. and containment ref from root, many valued. - // props on comp id, name both strings single v. - // create root object - // begin logging - // create a company obj. name=acme id=123 - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addPropertyToType("myspace","Root","whatever", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Employee"); - mdg->addPropertyToType("myspace","Employee","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","id", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","eotm", - "myspace","Employee", false, false, false); - - mdg->addPropertyToType("myspace","Company","employees", - "myspace","Employee", true, false, true); - - mdg->addPropertyToType("myspace","Root","companies", - "myspace","Company", true, false, true); - - const Type& tcc = mdg->getType("myspace","Root"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - ChangeSummaryPtr cs = dor->getChangeSummary(); - - DataObjectPtr com = dor->createDataObject("companies"); - com->setCString("name","acme"); - com->setCString("id","123"); - - const Type& te = mdg->getType("myspace","Employee"); - - DataObjectPtr emp = mdg->create(te); - emp->setCString("name", "Mr Expendible"); - - DataObjectList& emps = com->getList("employees"); - - emps.append(emp); - - com->setDataObject("eotm",emp); - - cs->beginLogging(); - - com->unset("eotm"); - - FILE *f = fopen("scenario5.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open scenario5.dat" << endl; - return 0; - } - - dumpchangesummary(f, cs); - - fclose(f); - - cs->endLogging(); - - return comparefiles("scenario5.dat","scenario5.txt"); - - //expect com to have change record, nothing for eotm: - -} - -int sdotest::scenario2() -{ - // create root type - root has cs - // create a company type. and containment ref from root, many valued. - // 2 props on comp id, name both strings single v. - // create root object - // create a company obj. name=acme id=123 - // begin logging() - // name="megacorp" - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addPropertyToType("myspace","Root","whatever", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addType("myspace","Company"); - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","id", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Root","companies", - "myspace","Company", true, false, true); - - const Type& tcc = mdg->getType("myspace","Root"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectPtr com = dor->createDataObject("companies"); - com->setCString("name","acme"); - com->setCString("id","123"); - - ChangeSummaryPtr cs = dor->getChangeSummary(); - cs->beginLogging(); - - com->setCString("name","megacorp"); - - FILE *f = fopen("scenario2.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open scenario2.dat" << endl; - return 0; - } - - dumpchangesummary(f, cs); - - fclose(f); - - cs->endLogging(); - - //expect cdo: - //root- nothing - // company- isChanged - //setting prop=name, value="acme" - - return comparefiles("scenario2.dat","scenario2.txt"); - -} - -int sdotest::scenario3() -{ - - //create root type - root has cs - //create a company type. and containment ref from root, many valued. - //2 props on comp id, name both strings single v. - //create root object - //create a company obj. name=acme id=123 - //begin logging() - //delete company - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addPropertyToType("myspace","Root","whatever", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addType("myspace","Company"); - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","id", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Root","companies", - "myspace","Company", true, false, true); - - const Type& tcc = mdg->getType("myspace","Root"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectPtr com = dor->createDataObject("companies"); - com->setCString("name","acme"); - com->setCString("id","123"); - - ChangeSummaryPtr cs = dor->getChangeSummary(); - cs->beginLogging(); - - com->detach(); - - FILE *f = fopen("scenario3.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open scenario3.dat" << endl; - return 0; - } - - dumpchangesummary(f, cs); - - cs->endLogging(); - - fclose(f); - - // expect cdo - // root - changed - // company - deleted - - return comparefiles("scenario3.dat","scenario3.txt"); - -} - -int sdotest::scenario4() -{ - //create root type - root has cs - //create a company type. and containment ref from root, many valued. - //create a dept type. and containment ref from comp, many valued. - //create a emp type. and containment ref from dept, many valued. - // give name and id properties to comp,dept, emp - - //create root object - //create a company obj. name=acme id=123 - //create a company obj. name=megacorp id=124 - // give each company 2 depts - // give each dept 2 employees - - // begin logging() - // add new employee to first dept of acme - // delete employee from second dept of acme - - // change name of first employee of first dept megacorp. - // delete first dept of megacorp. - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addPropertyToType("myspace","Root","whatever", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addType("myspace","Company"); - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","id", - "commonj.sdo","String", false, false, false); - - mdg->addType("myspace","Department"); - mdg->addPropertyToType("myspace","Department","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Department","id", - "commonj.sdo","String", false, false, false); - - mdg->addType("myspace","Employee"); - mdg->addPropertyToType("myspace","Employee","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Employee","id", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Root","companies", - "myspace","Company", true, false, true); - - mdg->addPropertyToType("myspace","Company","departments", - "myspace","Department", true, false, true); - - mdg->addPropertyToType("myspace","Department","employees", - "myspace","Employee", true, false, true); - - const Type& tcc = mdg->getType("myspace","Root"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectPtr com = dor->createDataObject("companies"); - com->setCString("name","acme"); - com->setCString("id","123"); - - DataObjectPtr dep = com->createDataObject("departments"); - dep->setCString("name","widgets"); - dep->setCString("id","1"); - - DataObjectPtr emp = dep->createDataObject("employees"); - emp->setCString("name","John O'Watt"); - emp->setCString("id","1"); - - emp = dep->createDataObject("employees"); - emp->setCString("name","Ida Know"); - emp->setCString("id","2"); - - - dep = com->createDataObject("departments"); - dep->setCString("name","gadgets"); - dep->setCString("id","2"); - - emp = dep->createDataObject("employees"); - emp->setCString("name","Ed Memoire"); - emp->setCString("id","1"); - - emp = dep->createDataObject("employees"); - emp->setCString("name","Phyllis Tyne"); - emp->setCString("id","2"); - - - DataObjectPtr com2 = dor->createDataObject("companies"); - com2->setCString("name","megacorp"); - com2->setCString("id","124"); - - dep = com2->createDataObject("departments"); - dep->setCString("name","windows"); - dep->setCString("id","1"); - - emp = dep->createDataObject("employees"); - emp->setCString("name","Ivor Payne"); - emp->setCString("id","1"); - - emp = dep->createDataObject("employees"); - emp->setCString("name","Colin Poisson"); - emp->setCString("id","2"); - - dep = com2->createDataObject("departments"); - dep->setCString("name","portholes"); - dep->setCString("id","2"); - - emp = dep->createDataObject("employees"); - emp->setCString("name","Graham Angreeneggs"); - emp->setCString("id","1"); - - emp = dep->createDataObject("employees"); - emp->setCString("name","Helen Highwater"); - emp->setCString("id","2"); - - DataObjectList& deps = com->getList("departments"); - DataObjectList& emps = deps[0]->getList("employees"); - DataObjectList& emps2 = deps[1]->getList("employees"); - DataObjectList& deps2 = com2->getList("departments"); - DataObjectList& emps3 = deps2[0]->getList("employees"); - DataObjectList& emps4 = deps2[1]->getList("employees"); - - // should be able to get the change summary property, but it - // should be zero. - // should be able to find out if the type is a change summary type - - if (! dor->getType().isChangeSummaryType()) - { - if (!silent) cout << "The root object DOESNT HAVE a change summary !!!" << endl; - return 0; - } - - try { - DataObjectPtr csptr = dor->getDataObject("whatever"); - - if (!csptr) { - if (!silent) cout << "CS property was zero - should be invisible!!!!" << endl; - return 0; - } - else { - if (!silent) cout << "CS property was NOT zero !!" << endl; - return 0; - } - } - catch (SDOPropertyNotFoundException e) - { - // cout << "No property shows - this is correct" << endl; - } - - - if (com->getType().isChangeSummaryType()) - { - if (!silent) cout << "The company object has a change summary !!!!" << endl; - return 0; - } - - ChangeSummaryPtr cs = dor->getChangeSummary(); - cs->beginLogging(); - - DataObjectList& depsout = com->getList("departments"); - - emp = depsout[0]->createDataObject("employees"); - emp->setCString("name","Irma Newby"); - emp->setCString("id","3"); - - DataObjectList& empsout = depsout[1]->getList("employees"); - empsout.remove(0); - - DataObjectList& depsout2 = com2->getList("departments"); - DataObjectList& empsout2 = depsout2[0]->getList("employees"); - empsout2[0]->setCString("name","Ive had my name changed"); - - depsout2[0]->detach(); - - FILE *f = fopen("scenario4.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open secnario4.dat" << endl; - return 0; - } - - dumpchangesummary(f, cs); - - cs->endLogging(); - - fclose(f); - - // expect: - // company acme, department widgets changed. - // employee 3 of dept widgets of acme (Irma Newby) created. - // employee 1 of dept gadgets or acme deleted - // no change record for employee 1 of company megacorp, dept windows - // deletion for dept windows of megacorp - // deletion for emp 1 of windows - showing original value for name (Ivor Payne) - // deletion for emp 2 of windows. - - return comparefiles("scenario4.dat","scenario4.txt"); - - -} - -int sdotest::seqtest() -{ - DataFactoryPtr mdg = DataFactory::getDataFactory(); - // company is sequenced. - mdg->addType("myspace","Company",true,false); - - mdg->addType("myspace","Department",true,false); - // string is many - - mdg->addPropertyToType("myspace","Company","string","commonj.sdo","String", - true); - - mdg->addPropertyToType("myspace","Company","departments","myspace","Department", - true); - - mdg->addPropertyToType("myspace","Department","name","commonj.sdo","String"); - - - const Type& tcc = mdg->getType("myspace","Company"); - - DataObjectPtr dor = mdg->create(tcc); - const Property& sprop = dor->getType().getProperty("string"); - SequencePtr sptr = dor->getSequence(); - - FILE *f = fopen("sequence.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Cannot open sequence.dat" << endl; - return 0; - } - - printseq(f, sptr); - - sptr->addCString(sprop,"I am Item 1 of string"); - - printseq(f, sptr); - - sptr->addText("I am the first free text"); - - printseq(f, sptr); - - sptr->addCString(sprop,"I am Item 2 of string"); - - printseq(f, sptr); - - sptr->setCStringValue(1,"I am free text which has been modified"); - - DataObjectPtr dep1 = dor->createDataObject("departments"); - - printseq(f, sptr); - - dep1->setCString("name","department1"); - - printseq(f, sptr); - - DataObjectList& dol = dor->getList("departments"); - - const Type& tcd = mdg->getType("myspace","Department"); - DataObjectPtr dep2 = mdg->create(tcd); - - printseq(f, sptr); - - dep2->setCString("name","department2"); - - printseq(f, sptr); - - dol.append(dep2); - - printseq(f, sptr); - - fclose(f); - - return comparefiles("sequence.dat","sequence.txt"); - - -} - - -int sdotest::boolbug() -{ - DataFactoryPtr mdg = DataFactory::getDataFactory(); - mdg->addType("myspace","Company"); - mdg->addPropertyToType("myspace","Company","bool","commonj.sdo","Boolean"); - const Type& tcc = mdg->getType("myspace","Company"); - DataObjectPtr dor = mdg->create((Type&)tcc); - try { - bool b = dor->getBoolean("bool"); - return 1; - } - catch (SDOPropertyNotSetException) - { - if (!silent) cout << "WRONG not set exception" << endl; - return 0; - } -} - -int sdotest::scope1() -{ - try - { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - return 1; - } - catch(SDORuntimeException e) - { - return 0; - } -} - -int sdotest::scope2() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - mdg->addType("myspace","Company"); - mdg->addPropertyToType("myspace","Company","csumm","commonj.sdo","ChangeSummary"); - const Type& tcc = mdg->getType("myspace","Company"); - DataObjectPtr dor = mdg->create((Type&)tcc); - return 1; - } - catch (SDORuntimeException e) - { - return 0; - } -} - -int sdotest::scope3() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - mdg->addType("myspace","Main"); - mdg->addType("myspace","Subs"); - mdg->addPropertyToType("myspace","Main","name","commonj.sdo","String"); - mdg->addPropertyToType("myspace","Main","subs","myspace","Subs", true); - mdg->addPropertyToType("myspace","Subs","name","commonj.sdo","String"); - - const Type& tcc = mdg->getType("myspace","Main"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectPtr sub = dor->createDataObject("subs"); - sub->setCString("name", "sub1"); - - sub = dor->createDataObject("subs"); - sub->setCString("name", "sub2"); - return 1; - } - catch (SDORuntimeException e) - { - return 0; - } - -} - -int sdotest::testGetters(DataObjectPtr dor) -{ - if (!testGetter(dor,"boolean")) return 0; - if (!testGetter(dor,"byte")) return 0; - if (!testGetter(dor,"character")) return 0; - if (!testGetter(dor,"short")) return 0; - if (!testGetter(dor,"integer")) return 0; - if (!testGetter(dor,"long")) return 0; - if (!testGetter(dor,"double")) return 0; - if (!testGetter(dor,"float")) return 0; - if (!testGetter(dor,"date")) return 0; - if (!testGetter(dor,"string")) return 0; - if (!testGetter(dor,"bytes")) return 0; - if (!testGetter(dor,"dataobject")) return 0; - return 1; -} - -int sdotest::testGetter(DataObjectPtr dor, char* str) -{ - try - { - bool b = dor->getBoolean(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) - { - cout << "WRONG unset and undefaulted" << endl; - } - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) - { - return 1; - } - return 0; - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - char by = dor->getByte(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - wchar_t cy = dor->getCharacter(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - short s = dor->getShort(str); - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - if (!strcmp(str,"bytes")) return 1; - return 0; - - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - int i = dor->getInteger(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - long l = dor->getLong(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - int64_t ll = dor->getLong(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - float f = dor->getFloat(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - long double d = dor->getDouble(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - unsigned int len; - - try { - len = dor->getLength(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) - { - cout << "WRONG unset and undefaulted" << endl; - } - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) - { - return 1; - } - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - if (len > 0) { - try { - wchar_t * buf = new wchar_t[len]; - unsigned int gotlen = dor->getString(str,buf,len); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - try { - char * cbuf = new char[len]; - unsigned int gotlen = dor->getBytes(str,cbuf,len); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - } - - try { - SDODate t = dor->getDate(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << " WRONG unset and undefaulted" << endl; - return 0; - } - - // The following catch block returns to the caller, regardless of whether - // the getDate call succeeded or failed. This has the effect of aborting - // further tests in this method. Similar remarks apply to many of the catch - // blocks here. They should be cleaned up so that as many tests as possible - // are run, certainly when predecessors succeed and preferably even if they fail. - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"bytes")) return 1; - if (!strcmp(str,"boolean")) return 1; - if (!strcmp(str,"string")) return 1; - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - const char * string = dor->getCString(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG - unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - if (!strcmp(str,"date")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - DataObjectPtr dob = dor->getDataObject(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 0; - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - return 1; - -} - -int sdotest::conversiontest() -{ - - if (!silent) - { - cout << "Conversion tests" << endl; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - mdg->addType("myspace","Container"); - mdg->addType("myspace","Contained"); - mdg->addPropertyToType("myspace","Container","boolean","commonj.sdo","Boolean"); - mdg->addPropertyToType("myspace","Container","byte","commonj.sdo","Byte"); - mdg->addPropertyToType("myspace","Container","character","commonj.sdo","Character"); - mdg->addPropertyToType("myspace","Container","short","commonj.sdo","Short"); - mdg->addPropertyToType("myspace","Container","integer","commonj.sdo","Integer"); - mdg->addPropertyToType("myspace","Container","long","commonj.sdo","Long"); - mdg->addPropertyToType("myspace","Container","float","commonj.sdo","Float"); - mdg->addPropertyToType("myspace","Container","double","commonj.sdo","Double"); - mdg->addPropertyToType("myspace","Container","string","commonj.sdo","String"); - mdg->addPropertyToType("myspace","Container","bytes","commonj.sdo","Bytes"); - mdg->addPropertyToType("myspace","Container","dataobject","myspace","Contained"); - mdg->addPropertyToType("myspace","Container","date","commonj.sdo","Date"); - mdg->addPropertyToType("myspace","Container","bigint","commonj.sdo","BigInteger"); - mdg->addPropertyToType("myspace","Container","bigdec","commonj.sdo","BigDecimal"); - - const Type& tcc = mdg->getType("myspace","Container"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - if (!silent) - { - cout << "+++++++++++++++PROPERTY VALUES UNSET ++++++++++++++++++" << endl; - } - - if (!testGetters(dor)) - { - return 0; - } - - if (!silent) - { - cout << "+++++++++++++++PROPERTY VALUES SET ++++++++++++++++++++" << endl; - } - - // RHEL 4 has problems processing 64 bit integer constants, so we'll do it - // the hard way. This is overkill but gives the option to vary the value a - // bit. - - int64_t largeInt = 0xFFFF; - for (int j = 0; j < 2; j++) - { - largeInt <<= 16; - largeInt += 0xFFFF; - } - - DataObjectPtr sub = dor->createDataObject("dataobject"); - dor->setBoolean("boolean", true); - dor->setByte("byte",20); - dor->setCharacter("character", 1000); - dor->setShort("short", (short)12345678); - dor->setInteger("integer", 87654321); - dor->setLong("long", largeInt); - dor->setFloat("float", (float)12345.678); - dor->setDouble("double", 1234567.891); - dor->setDate("date", 37575); - wchar_t* chars = new wchar_t[50]; - for (int i=0;i<50;i++) {chars[i] = 0x7F20 + i ;} - dor->setString("string",chars, 50); - - char* tchars = new char[50]; - for (int ii=0;ii<50;ii++) {tchars[ii] = ii + 32;} - dor->setBytes("bytes",tchars, 50); - - if (!testGetters(dor)) - { - return 0; - } - - if (!silent) - { - cout << "+++++++++++++++END OF TEST ++++++++++++++++++++++++++++" << endl; - } - - return 1; -} - - -int sdotest::usertest() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addType("myspace","UserTest"); - mdg->addType("myspace","AnObject"); - - const Type& tr = mdg->getType("myspace", "Root"); - const Type& tm = mdg->getType("myspace", "UserTest"); - const Type& to = mdg->getType("myspace", "AnObject"); - - mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean"); - mdg->addPropertyToType(tm,"unsetboolean", "commonj.sdo","Boolean"); - mdg->addPropertyToType(tm,"object", "myspace","AnObject"); - mdg->addPropertyToType(tm,"unsetobject","myspace","AnObject"); - - // many valued... - mdg->addPropertyToType(tm,"longs", "commonj.sdo","Integer", true); - mdg->addPropertyToType(tm,"objects", "myspace","AnObject", true); - - mdg->addPropertyToType(tr,"usertest", "myspace","UserTest"); - - DataObjectPtr root = mdg->create((Type&)tr); - DataObjectPtr test = root->createDataObject("usertest"); - DataObjectPtr do1 = test->createDataObject("object"); - DataObjectPtr do2 = test->createDataObject("objects"); - DataObjectPtr do3 = test->createDataObject("objects"); - - test->setBoolean("boolean", true); - - - void* value = (void*)0xF1F1F1F1; - - test->setUserData(value); - - if (test->getUserData() != (void*)0xf1f1f1f1) return 0; - - root->setUserData("usertest",value); - - if (root->getUserData("usertest") != (void*)0xf1f1f1f1) return 0; - - root->setUserData((unsigned int)0,(void*)0x20); - - if (root->getUserData((unsigned int)0) != (void*)0x20) return 0; - - const Property& prop = root->getType().getProperty("usertest"); - - root->setUserData(prop,(void*)0x40020); - - if (root->getUserData(prop) != (void*)0x40020) return 0;; - - test->setUserData("boolean", (void*)0x120); - - - if (test->getUserData("boolean") != (void*)0) return 0; - - test->setUserData("unsetboolean", (void*)0x340); - - if (test->getUserData("unsetboolean") != (void*)0) return 0; - - test->setUserData("object", (void*)0x120); - - if (test->getUserData("object") != (void*)0x120) return 0; - - test->setUserData("unsetobject", (void*)0x540); - - if (test->getUserData("unsetobject") != (void*)0) return 0; - - test->setUserData("objects", (void*)0x640); - - if (test->getUserData("objects") != (void*)0x640) return 0; - - test->setUserData("objects[1]", (void*)0x740); - - if (test->getUserData("objects[1]") != (void*)0x740) return 0; - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << "Exception in user test - unexpected" << endl; - return 0; - } -} - -int sdotest::versiontest() -{ - if (!silent) cout << "The SDO version is :" << SdoRuntime::getVersion() << endl; - if (!silent) cout << "The Major version is: " << SdoRuntime::getMajor() << endl; - if (!silent) cout << "The Minor version is: " << SdoRuntime::getMinor() << endl; - if (!silent) cout << "The Fix level is: " << SdoRuntime::getFix() << endl; - return 1; -} - -int sdotest::noncontest() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Department"); - mdg->addType("myspace","Employee"); - - const Type& tr = mdg->getType("myspace", "Company"); - const Type& tm = mdg->getType("myspace", "Department"); - const Type& to = mdg->getType("myspace", "Employee"); - - // many... - mdg->addPropertyToType(tr,"departments","myspace", "Department", - true); - - //mdg->addPropertyToType(to,"name","commonj.sdo", "String"); - - mdg->addPropertyToType(tm,"employees","myspace", "Employee", true); - - // single, non containment - mdg->addPropertyToType(tr,"eom", "myspace","Employee", false - , false, false); - - DataObjectPtr comp = mdg->create((Type&)tr); - - { - DataObjectPtr dept = comp->createDataObject("departments"); - DataObjectPtr emp1 = dept->createDataObject("employees"); - //emp1->setCString("name", "Will"); - DataObjectPtr emp2 = dept->createDataObject("employees"); - //emp1->setCString("name", "Bill"); - DataObjectPtr emp3 = dept->createDataObject("employees"); - //emp1->setCString("name", "Gill"); - comp->setDataObject("eom", emp3); - } - return 1; - } - catch (SDORuntimeException e) - { - if (!silent) cout << "Failed in containment" << e << endl; - return 0; - } -} - - -int sdotest::defaulttest() -{ - try{ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","DefaultTest"); - mdg->addType("myspace","AnObject"); - - const Type& tm = mdg->getType("myspace", "DefaultTest"); - const Type& to = mdg->getType("myspace", "AnObject"); - - mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean"); - - mdg->setDefault("myspace","DefaultTest","boolean", true); - - mdg->addPropertyToType(tm,"byte", "commonj.sdo","Byte"); - - mdg->setDefault("myspace","DefaultTest","byte", (char)'d'); - - mdg->addPropertyToType(tm,"character", "commonj.sdo","Character"); - - mdg->setDefault("myspace","DefaultTest","character", (wchar_t)'e'); - - mdg->addPropertyToType(tm,"short", "commonj.sdo","Short"); - - mdg->setDefault("myspace","DefaultTest","short", (short)300); - - mdg->addPropertyToType(tm,"long", "commonj.sdo","Integer"); - - mdg->setDefault("myspace","DefaultTest","long", (long)400); - - mdg->addPropertyToType(tm,"longs", "commonj.sdo","Integer", true); - - mdg->setDefault("myspace","DefaultTest","longs", (long)800); - - mdg->addPropertyToType(tm,"longlong", "commonj.sdo","Long"); - - mdg->setDefault("myspace","DefaultTest","longlong", (int64_t)500); - - mdg->addPropertyToType(tm,"float", "commonj.sdo","Float"); - - mdg->setDefault("myspace","DefaultTest","float", (float)600.0); - - mdg->addPropertyToType(tm,"longdouble", "commonj.sdo","Double"); - - mdg->setDefault("myspace","DefaultTest","longdouble", (long double)700.0); - - mdg->addPropertyToType(tm,"date", "commonj.sdo","Date"); - - mdg->setDefault("myspace","DefaultTest","date", (long)900); - - mdg->addPropertyToType(tm,"string", "commonj.sdo","String"); - - wchar_t* help = new wchar_t[4]; - help[0] = 'H'; - help[1] = 'E'; - help[2] = 'L'; - help[3] = 'P'; - - mdg->setDefault("myspace","DefaultTest","string", help, 4); - - delete[] help; - - char* help2 = new char[4]; - help2[0] = 'H'; - help2[1] = 'E'; - help2[2] = 'L'; - help2[3] = 'P'; - - mdg->addPropertyToType(tm,"bytes", "commonj.sdo","Bytes"); - - mdg->setDefault("myspace","DefaultTest","bytes", help2, 4); - - delete[] help2; - - mdg->addPropertyToType(tm,"object", "myspace","AnObject"); - - DataObjectPtr test = mdg->create((Type&)tm); - - FILE *f = fopen("defaults.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open file defaults.dat" << endl; - return 0; - } - - - fprintf(f, "Boolean default is true: %d\n",test->getBoolean("boolean")); - - fprintf(f, "Byte default is d: %d\n",test->getByte("byte")); - - fprintf(f, "Character default is e: %d\n",test->getCharacter("character")); - - fprintf(f, "Short default is 300: %d\n",test->getShort("short")); - - fprintf(f, "Long default is 400: %d\n",test->getInteger("long")); - - try { - fprintf(f, "Longs default is 800: %d\n" ,test->getInteger("longs[1]")); - } - catch (SDOIndexOutOfRangeException ex) - { - fprintf(f,"Expected index out of range OK\n"); - } - - fprintf(f,"Float default is 600: %.3f\n",test->getFloat("float")); - - fprintf(f, "LongDouble default is 700: %.3f\n",(float)test->getDouble("longdouble")); - - fprintf(f, "String default is HELP: "); - unsigned int lenw = test->getLength("string"); - if (lenw > 0) { - char* tw = new char[lenw]; - test->getBytes("string",tw,lenw); - for (unsigned int i=0;igetLength("bytes"); - if (len > 0) { - char* tc = new char[len]; - test->getBytes("bytes",tc,len); - for (unsigned int i=0;iaddType(ns1, testName); - mdg->addType(ns1, objectName); - - const Type& tm = mdg->getType(ns1, testName); - const Type& to = mdg->getType(ns1, objectName); - - mdg->addPropertyToType(tm, "boolean", propName, "Boolean"); - - mdg->setDefault(ns1, testName, "boolean", true); - - mdg->addPropertyToType(tm, "byte", propName, "Byte"); - - mdg->setDefault(ns1, testName, "byte", (char)'d'); - - mdg->addPropertyToType(tm, "character", propName, "Character"); - - mdg->setDefault(ns1, testName, "character", (wchar_t)'e'); - - mdg->addPropertyToType(tm, "short", propName, "Short"); - - mdg->setDefault(ns1, testName, "short", (short)300); - - mdg->addPropertyToType(tm, "long", propName, "Integer"); - - mdg->setDefault(ns1, testName, "long", (long)400); - - mdg->addPropertyToType(tm, "longs", propName, "Integer", true); - - mdg->setDefault(ns1, testName, "longs", (long)800); - - mdg->addPropertyToType(tm, "longlong", propName, "Long"); - - mdg->setDefault(ns1, testName, "longlong", (int64_t)500); - - mdg->addPropertyToType(tm, "float", propName, "Float"); - - mdg->setDefault(ns1, testName, "float", (float)600.0); - - mdg->addPropertyToType(tm, "longdouble", propName, "Double"); - - mdg->setDefault(ns1, testName, "longdouble", (long double)700.0); - - mdg->addPropertyToType(tm, "date", propName, "Date"); - - mdg->setDefault(ns1, testName, "date", (long)900); - - mdg->addPropertyToType(tm, "string", propName, "String"); - - wchar_t* help = new wchar_t[4]; - help[0] = 'H'; - help[1] = 'E'; - help[2] = 'L'; - help[3] = 'P'; - - mdg->setDefault(ns1, testName, "string", help, 4); - - delete[] help; - - char* help2 = new char[4]; - help2[0] = 'H'; - help2[1] = 'E'; - help2[2] = 'L'; - help2[3] = 'P'; - - mdg->addPropertyToType(tm, "bytes", propName, "Bytes"); - - mdg->setDefault(ns1, testName, "bytes", help2, 4); - - delete[] help2; - - mdg->addPropertyToType(tm, "object", ns1, objectName); - - DataObjectPtr test = mdg->create((Type&)tm); - - FILE *f = fopen("defaults.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open file defaults.dat" << endl; - return 0; - } - - - fprintf(f, "Boolean default is true: %d\n",test->getBoolean("boolean")); - - fprintf(f, "Byte default is d: %d\n",test->getByte("byte")); - - fprintf(f, "Character default is e: %d\n",test->getCharacter("character")); - - fprintf(f, "Short default is 300: %d\n",test->getShort("short")); - - fprintf(f, "Long default is 400: %d\n",test->getInteger("long")); - - try { - fprintf(f, "Longs default is 800: %d\n" ,test->getInteger("longs[1]")); - } - catch (SDOIndexOutOfRangeException ex) - { - fprintf(f,"Expected index out of range OK\n"); - } - - fprintf(f,"Float default is 600: %.3f\n",test->getFloat("float")); - - fprintf(f, "LongDouble default is 700: %.3f\n",(float)test->getDouble("longdouble")); - - fprintf(f, "String default is HELP: "); - unsigned int lenw = test->getLength("string"); - if (lenw > 0) { - char* tw = new char[lenw]; - test->getBytes("string",tw,lenw); - for (unsigned int i=0;igetLength("bytes"); - if (len > 0) { - char* tc = new char[len]; - test->getBytes("bytes",tc,len); - for (unsigned int i=0;i 0) - { - wchar_t * buf = new wchar_t[l+1]; - l = pstring.getStringDefault(buf,l); - fprintf(f, "String default length is %d\n", l); - for (unsigned int i=0;i 0) - { - char * buf = new char[l+1]; - l = pbytes.getBytesDefault(buf,l); - fprintf(f, "Bytes default length is %d\n",l); - for (unsigned int i=0;iaddType("myspace","DefaultTest"); - mdg->addType("myspace","AnObject"); - - const Type& tm = mdg->getType("myspace", "DefaultTest"); - const Type& to = mdg->getType("myspace", "AnObject"); - - mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean"); - mdg->addPropertyToType(tm,"byte", "commonj.sdo","Byte"); - mdg->addPropertyToType(tm,"character", "commonj.sdo","Character"); - mdg->addPropertyToType(tm,"short", "commonj.sdo","Short"); - mdg->addPropertyToType(tm,"long", "commonj.sdo","Integer"); - mdg->addPropertyToType(tm,"longs", "commonj.sdo","Integer", true); - mdg->addPropertyToType(tm,"longlong", "commonj.sdo","Long"); - mdg->addPropertyToType(tm,"float", "commonj.sdo","Float"); - mdg->addPropertyToType(tm,"longdouble", "commonj.sdo","Double"); - mdg->addPropertyToType(tm,"date", "commonj.sdo","Date"); - mdg->addPropertyToType(tm,"string", "commonj.sdo","String"); - mdg->addPropertyToType(tm,"bytes", "commonj.sdo","Bytes"); - mdg->addPropertyToType(tm,"object" , "myspace","AnObject"); - - //cout << "Testing unset defaults....." << endl; - - FILE *f; - - f = fopen("showdefault1.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open showdefault1.dat" << endl; - return 0; - } - showdefault(f, tm); - - fclose (f); - if (!comparefiles("showdefault1.dat","showdefault1.txt")) - { - return 0; - } - - //now set all the defaults.... - - mdg->setDefault("myspace","DefaultTest","boolean", true); - mdg->setDefault("myspace","DefaultTest","byte", (char)'d'); - mdg->setDefault("myspace","DefaultTest","character", (wchar_t)'e'); - mdg->setDefault("myspace","DefaultTest","short", (short)300); - mdg->setDefault("myspace","DefaultTest","long", (long)400); - mdg->setDefault("myspace","DefaultTest","longs", (long)800); - mdg->setDefault("myspace","DefaultTest","longlong", (int64_t)500); - mdg->setDefault("myspace","DefaultTest","float", (float)600.0); - mdg->setDefault("myspace","DefaultTest","longdouble", (long double)700.0); - mdg->setDefault("myspace","DefaultTest","date", (long)900); - - - wchar_t* help = new wchar_t[4]; - help[0] = 'H'; - help[1] = 'E'; - help[2] = 'L'; - help[3] = 'P'; - - mdg->setDefault("myspace","DefaultTest","string", help, 4); - - delete[] help; - - char* help2 = new char[4]; - help2[0] = 'H'; - help2[1] = 'E'; - help2[2] = 'L'; - help2[3] = 'P'; - - - mdg->setDefault("myspace","DefaultTest","bytes", help2, 4); - - delete[] help2; - - // and have another go at getting them.... - - f = fopen("showdefault2.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open showdefault2.dat" << endl; - return 0; - } - showdefault(f, tm); - - fclose (f); - if (!comparefiles("showdefault2.dat","showdefault2.txt")) - { - return 0; - } - - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << e.getEClassName() << " in "; - if (!silent)cout << e.getFileName() << " at line "; - if (!silent)cout << e.getLineNumber() << endl; - if (!silent)cout << e.getFunctionName() << " "; - if (!silent)cout << e.getMessageText() << endl; - return 0; - } - -} - -int sdotest::nulltest() -{ - - FILE *f = 0; - - try { - - unsigned int i; - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","NullTest",true, false); // sequenced - mdg->addType("myspace","AnObject"); - - try - { - mdg->addType("myspace", 0); - if (!silent) cout << "WRONG - SDOIllegalArgumentException should have been thrown for null Type name" << endl; - return 0; - } - catch (SDOIllegalArgumentException e) - {} - - const Type& tm = mdg->getType("myspace", "NullTest"); - const Type& to = mdg->getType("myspace", "AnObject"); - - mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean"); - mdg->addPropertyToType(tm,"byte", "commonj.sdo","Byte"); - mdg->addPropertyToType(tm,"character", "commonj.sdo","Character"); - mdg->addPropertyToType(tm,"short", "commonj.sdo","Short"); - mdg->addPropertyToType(tm,"long", "commonj.sdo","Integer"); - mdg->addPropertyToType(tm,"longlong", "commonj.sdo","Long"); - mdg->addPropertyToType(tm,"float", "commonj.sdo","Float"); - mdg->addPropertyToType(tm,"longdouble", "commonj.sdo","Double"); - mdg->addPropertyToType(tm,"date", "commonj.sdo","Date"); - mdg->addPropertyToType(tm,"string", "commonj.sdo","String"); - mdg->addPropertyToType(tm,"bytes", "commonj.sdo","Bytes"); - mdg->addPropertyToType(tm,"object", "myspace","AnObject"); - - try - { - mdg->addPropertyToType(tm, 0, "myspace", "AnObject"); - if (!silent) cout << "WRONG - SDOIllegalArgumentException should have been thrown for null Property name" << endl; - return 0; - } - catch (SDOIllegalArgumentException e) - {} - - - mdg->addPropertyToType(tm,"cs", "commonj.sdo","ChangeSummary"); - - DataObjectPtr test = mdg->create((Type&)tm); - DataObjectPtr ob = mdg->create((Type&)to); - DataObjectPtr ob2 = mdg->create((Type&)to); - DataObjectPtr ob3 = mdg->create((Type&)to); - - - f = fopen("nulltest.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open file nulltest.dat" << endl; - return 0; - } - - // first check all props are unset - - ChangeSummaryPtr cs = test->getChangeSummary(); - - cs->beginLogging(); - - PropertyList pl = test->getInstanceProperties(); - - fprintf(f, "Initially - all properties unset, and default values...\n"); - for (i=0;iisSet(pl[i])); - const char *xx = test->getCString(pl[i]); - if (xx != 0) - { - fprintf(f, "%s\n",xx); - } - else - { - fprintf(f, " is empty \n"); - } - } - else { - fprintf(f,"%s set: %d value:", pl[i].getName(),test->isSet(pl[i])); - DataObjectPtr xy = test->getDataObject(pl[i]); - if (xy != 0) - { - fprintf(f, " is not empty\n"); - } - else - { - fprintf(f, " is empty \n"); - } - } - } - catch (SDOPropertyNotSetException) - { - if (!silent) cout << " WRONG - got not set exception" << endl; - return 0; - } - } - test->setBoolean("boolean", false); - test->setByte("byte",0); - test->setCharacter("character",0); - test->setShort("short",0); - test->setInteger("long",0); - test->setLong("longlong",0 ); - test->setFloat("float",0); - test->setDouble("longdouble",0 ); - test->setDate("date",0 ); - test->setString("string",0,0); - test->setBytes("bytes","",0) ; - test->setDataObject("object",0) ; - - - - fprintf(f, "Should now have all properties set, and zero values...\n"); - for (i=0;iisSet(pl[i]),test->getCString(pl[i])); - } - else { - fprintf(f,"%s set:%d dataobject\n", pl[i].getName(),test->isSet(pl[i])); - } - - } - - for (i=0;iunset(pl[i]); - } - fprintf(f, "Should be back to having properties unset, and default values...\n"); - for (i=0;iisSet(pl[i])); - const char *xx = test->getCString(pl[i]); - if (xx != 0) - { - fprintf(f, "%s\n", xx); - } - else - { - fprintf(f, " is empty \n"); - } - } - else { - fprintf(f, "%s set: %d dataobject", pl[i].getName(),test->isSet(pl[i])); - DataObjectPtr dp = test->getDataObject(pl[i]); - if (dp != 0) - { - fprintf(f, " is not empty\n"); - } - else - { - fprintf(f, " is empty \n"); - } - } - } - catch (SDOPropertyNotSetException) - { - if (!silent) cout << "WRONG - not set exception" << endl; - return 0; - } - } - - SequencePtr s = test->getSequence(); - - s->addBoolean(test->getType().getProperty("boolean")/*"boolean"*/, false); - s->addByte(1/*"byte"*/,0); - s->addCharacter(2/*"character"*/,0); - s->addShort(3/*"short"*/,0); - s->addInteger(4/*"long"*/,0); - s->addLong(5/*"longlong"*/,0 ); - s->addFloat(6/*"float"*/,0); - s->addDouble(7/*"longdouble"*/,0 ); - // bug ...s->setDate(8/*"date"*/,0 ); - s->addString(9/*"string"*/,0,0); - s->addBytes(10/*"bytes"*/,"",0) ; - s->addDataObject(11/*"object"*/,0) ; - - for (i=0;iisSet(pl[i])); - const char* xx = test->getCString(pl[i]); - if ( xx != 0) - { - fprintf(f, "%s\n", xx); - } - else - { - fprintf(f, " is empty \n"); - } - } - else { - fprintf(f, "%s set:%d dataobject", pl[i].getName(),test->isSet(pl[i])); - DataObjectPtr db = test->getDataObject(pl[i]); - if (db != 0) - { - fprintf(f, "\n"); - } - else - { - fprintf(f, " is empty \n"); - } - } - } - catch (SDOPropertyNotSetException) - { - if (!silent) cout << "WRONG - not set exception " << endl; - return 0; - } - } - ChangedDataObjectList& cl = cs->getChangedDataObjects(); - for ( i =0; i< cl.size() ; i++) - { - if (cs->isCreated(cl[i])) { - fprintf(f, "Created dataobject\n"); - } - if (cs->isDeleted(cl[i])) { - fprintf(f, "Deleted dataobject\n"); - } - if (cs->isModified(cl[i])) { - fprintf(f, "Modified dataobject\n"); - } - } - - // now unset all the properties... - for (i=0;iunset(pl[i]); - } - - for (i=0;isetNull(i); - } - } - - fprintf(f, "Should all be null, and default values...\n"); - for (i=0;iisNull(i),test->isSet(pl[i])); - if (test->getCString(pl[i]) == 0) fprintf(f, "\n"); - else fprintf(f, "%s\n", test->getCString(pl[i])); - } - else { - fprintf(f, "%s isNull:%d set:%d value",pl[i].getName(), - test->isNull(i),test->isSet(pl[i])); - if (test->getDataObject(pl[i]) == 0) fprintf(f, " empty\n"); - else fprintf(f, " dataobject\n"); - } - } - - s->addBoolean(test->getType().getProperty("boolean")/*"boolean"*/, true); - s->addByte(1/*"byte"*/,1); - s->addCharacter(2/*"character"*/,1); - s->addShort(3/*"short"*/,1); - s->addInteger(4/*"long"*/,1); - s->addLong(5/*"longlong"*/,1 ); - s->addFloat(6/*"float"*/,1.0); - s->addDouble(7/*"longdouble"*/,1.0 ); - // bug ...s->setDate(8/*"date"*/,0 ); - wchar_t* chs = new wchar_t[5]; - chs[0] = 'h'; - chs[1] = 'e'; - chs[2] = 'l'; - chs[3] = 'l'; - chs[4] = 'o'; - s->addString(9/*"string"*/,chs,5); - delete[] chs; - s->addBytes(10/*"bytes"*/,"hello",5) ; - s->addDataObject(11/*"object"*/,ob) ; - - fprintf(f, "Should all have values, and not be null..\n"); - for (i=0;iisNull(i),test->isSet(pl[i])); - if (test->getCString(pl[i]) == 0) fprintf(f, "\n"); - else fprintf(f, "%s\n", test->getCString(pl[i])); - - } - else { - fprintf(f, "%s isNull%d set:%d value:", pl[i].getName(), - test->isNull(i),test->isSet(pl[i])); - if (test->getDataObject(pl[i]) == 0) fprintf(f, " empty\n"); - else fprintf(f, " dataobject\n"); - } - } - - for (i=0;isetNull(pl[i]); - } - } - - fprintf(f, "Should all be null, and default values...\n"); - for (i=0;iisNull(i),test->isSet(pl[i])); - if (test->getCString(pl[i]) == 0) fprintf(f, "\n"); - else fprintf(f, "%s\n",test->getCString(pl[i])); - - } - else { - fprintf(f, "%s isNull;%d set:%d value:", pl[i].getName(), - test->isNull(i),test->isSet(pl[i])); - if (test->getDataObject(pl[i]) == 0) fprintf(f," empty\n"); - else fprintf(f, " dataobject\n"); - } - } - catch (SDOPropertyNotSetException) - { - if (!silent) cout << " WRONG - not set exception" << endl; - return 0; - } - } - - cs->endLogging(); - fclose(f); - - int rr = comparefiles("nulltest.dat","nulltest.txt"); - - if (rr == 0) - { - if (!silent) cout << "Nulltest compare failed - probably because of differences is formats for doubles/floats" << endl; - // accept the test. - return 1; - - } - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << "Nulltest failed " << e << endl; - if (f) fclose(f); - return 0; - } -} - -int sdotest::maintest() -{ - - unsigned int i; - - FILE *f; - - try{ - - f = fopen("maintest.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Failed to open maintest.dat" << endl; - } - - fprintf(f,"Test Program starting to create types ...\n"); - - /* First create a DataFactory , then add some types and props...*/ - - /* This is dms creation of metadata */ - - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Department"); - // manager is a sequenced type... - mdg->addType("myspace","Manager", true, false); - - mdg->addType("myspace","Employee"); - - // tests of base types - - // note - base type of a seq type must be seq... - mdg->addType("myspace","Person", true, false); - - mdg->addType("myspace","DerivedString"); - mdg->addType("myspace","SubDepartment"); - - /* Now add the properties to the types...*/ - - const Type& tc = mdg->getType("myspace","Company"); - const Type& ts = mdg->getType("commonj.sdo","String"); - const Type& ti = mdg->getType("commonj.sdo","Integer"); - const Type& tf = mdg->getType("commonj.sdo","Float"); - const Type& tm = mdg->getType("myspace","Manager"); - - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - - const Type& td = mdg->getType("myspace","Department"); - const Type& te = mdg->getType("myspace","Employee"); - const Type& tp = mdg->getType("myspace","Person"); - const Type& tds= mdg->getType("myspace","DerivedString"); - const Type& tsd= mdg->getType("myspace","SubDepartment"); - - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - - - - - - /* By type, with a type */ - mdg->addPropertyToType(tc,"name",ts); - - /* by name/uri with a type */ - mdg->addPropertyToType("myspace","Company","address",ts); - - /* by type with name/uri */ - mdg->addPropertyToType(tc,"departments", "myspace","Department", - true); - - - // add a reference to employee of the month - mdg->addPropertyToType(tc,"employee of the month", "myspace","Employee", - false, false, false); - - - - /* A list of floats */ - - mdg->addPropertyToType(tc,"floatlist", tf,true); - - mdg->addPropertyToType(tc,"pdg", tm); - - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - - mdg->addPropertyToType(td,"name", ts); - - mdg->addPropertyToType(td,"id", ti, false, true, false); - - mdg->addPropertyToType(td,"manager", tm); - - mdg->addPropertyToType(tm,"name", ts); - - - mdg->addPropertyToType(te,"name",ts); - mdg->addPropertyToType(td,"employees",te,true,false,true); - - - - // emps and managers are both people (in theory). - mdg->setBaseType(te,tp); - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - mdg->setBaseType(tm,tp); - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - mdg->addPropertyToType(tp,"haircolour", ts); - mdg->addPropertyToType(tp,"name", ts); - mdg->addPropertyToType(tm,"officeid", ts); - mdg->addPropertyToType(te,"cubelocation", ts); - - mdg->addPropertyToType(tc,"shareholder", tp); - - //derived string - derived from string - cannot have properties!!! - mdg->setBaseType(tds,ts); - - // subdept derived from dept - mdg->setBaseType(tsd,td); - mdg->addPropertyToType(tsd,"subname",ts); - - mdg->addPropertyToType(tc, "substring",tds); - - /* by type with name/uri */ - mdg->addPropertyToType(tc,"subdepartments", "myspace","SubDepartment", - true); - - /* This is the data structure */ - - - - /* company - ----shareholder (Person) - ----substring (DerivedString) - * ----name (String) - * ----pdg (Manager) - (inherits haircolour from person, - has name as duplicate property - should use person.name - has officeid) - * ----name(String) - ----haircolour(String) - ----officeid(String) - * - * ----depts[] (Department) - * ----name (String) - * ----id (Integer) - * ----manager (Manager). - * ----name(String) - ----haircolour(String) from Person - * ----employees[] (Employee) - * ----name(String) - ----haircolour(String) - from Person - ----cubelocation(String) - --subdepartments[] (SubDepartment) - ----name (String) from Department - ----id (String) from Department - ----manager (Manager) from Department - ----employees (from department) - */ - - /* Now add a primitive type test to the manager */ - mdg->addPropertyToType(tm,"str",ts); - - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - - mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean"); - mdg->addPropertyToType(tm,"byte", "commonj.sdo","Byte"); - mdg->addPropertyToType(tm,"character", "commonj.sdo","Character"); - mdg->addPropertyToType(tm,"short", "commonj.sdo","Short"); - mdg->addPropertyToType(tm,"long", "commonj.sdo","Integer"); - mdg->addPropertyToType(tm,"longlong", "commonj.sdo","Long"); - mdg->addPropertyToType(tm,"float", "commonj.sdo","Float"); - mdg->addPropertyToType(tm,"longdouble", "commonj.sdo","Double"); - mdg->addPropertyToType(tm,"date", "commonj.sdo","Date"); - // dead mdg->addPropertyToType(tm,"charptr", "commonj.sdo","Bytes"); - mdg->addPropertyToType(tm,"string", "commonj.sdo","String"); - mdg->addPropertyToType(tm,"bytes", "commonj.sdo","Bytes"); - - - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - - // create a few aliases - - mdg->setAlias("myspace","Company","TheFirm"); - mdg->setAlias("myspace","Company","departments","TheDepartments"); - mdg->setAlias("myspace","Company","TheBigFirm"); - mdg->setAlias("myspace","Company","TheLittleFirm"); - - const Type& tlf = mdg->getType("myspace","TheBigFirm"); - - fprintf(f, "Should be Company :%s\n", tlf.getName()); - - fprintf(f, "Should be 3: %d\n", tlf.getAliasCount()); - - for (unsigned int ai = 0; ai < tlf.getAliasCount(); ai++) - { - fprintf(f, "Alias: %s\n",tlf.getAlias(ai)); - } - - - // Change summary test begins - mdg->addPropertyToType(tc,"csumm","commonj.sdo","ChangeSummary"); - // should log an error - but not fail - mdg->addPropertyToType(td,"csumm","commonj.sdo","ChangeSummary"); - - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - - fprintf(f, "BEFORE RESOLUTION\n"); - printDataStructure(f, mdg); - - /* Now create some objects in the dg */ - -// DataObjectPtr dor; - - const Type& tcc = mdg->getType("myspace","Company"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - fprintf(f, "AFTER RESOLUTION\n"); - printDataStructure(f, mdg); - - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - - dor->setCString("substring","This is the sub string - its primitive, but not a string"); - - const char* subby = dor->getCString("substring"); - - fprintf(f, "%s\n", subby); - - dor->setCString("name","acmecorp"); - const char* chnam = dor->getCString("name"); - fprintf(f, "%s\n", chnam); - - dor->unset("name"); - - dor->setCString("name","acmecorp"); - - // Set up the two departments before logging starts - - DataObjectPtr dep1 = dor->createDataObject("departments"); - dep1->setCString("name","Developement"); - - try - { - dep1->setInteger("id", 1); - if (!silent)cout << "WRONG read-only Property shouldn't have allowed setting" << endl; - fclose(f); - return 0; - } - catch (SDOUnsupportedOperationException e) - {} - - DataObjectPtr dep2= dor->createDataObject("departments"); - dep2->setCString("name","Marketing"); - - // add a couple of floats to the floatlist - DataObjectList& dolist = dor->getList("floatlist"); - dolist.append((float)1.4); - dolist.append((float)1.5); - - //TODO - change summaries should live on the DataObject - // interface - can this be done? - - ChangeSummaryPtr cs = dor->getChangeSummary(); - cs->beginLogging(); - - const char* sname = dor->getCString("name"); - - fprintf(f, "%s\n", sname); - - // This should put a created entry in the cs. - - // This should be equivalent to the alternative below......... - const Type& tcd = mdg->getType("myspace","Manager"); - DataObjectPtr pdg = mdg->create((Type&)tcd); - - // This set should put the entry into the change summary. - // both in the creations and in the changes. - dor->setDataObject("pdg",pdg); - - - // try getting the boolean as a string - should be defaulted to false: - const char *bol; - try{ - bol = pdg->getCString("boolean"); - if (bol != 0) - { - fprintf(f, "Expected default boolean (false) : %s\n",bol); - } - else - { - fprintf(f, " is empty \n"); - } - } - catch (SDOPropertyNotSetException) - { - if (!silent)cout << "WRONG handled notset exception " << endl; - fclose(f); - return 0; - } - - pdg->setBoolean("boolean", true); - bol = pdg->getCString("boolean"); - fprintf(f, "Expected boolean (true) : %s\n",bol); - - // and the widechars? - const char* wdc; - try { - wdc = pdg->getCString("string"); - if (wdc != 0) - { - fprintf(f, "Expected default string (0) : ",wdc); - } - else - { - fprintf(f, " is empty \n"); - } - } - catch (SDOPropertyNotSetException) - { - if (!silent) cout << "WRONG handled notset exception" <getSequence(); - - - // The alternative............................................. - // Here the create should put the entry into the change summary - //DataObject* pdg = dor->createDataObject("pdg"); - - // This should do nothing to the cs, as its in a created object - pdg->setCString("name","Jacques LePlace"); - - // This should modify the property, and add an item to the sequence. - sq->addCString("name", "Jacques LePlagne"); - - - // The creation entry should be removed from the change summary - // The entry should no longer exist and the pointer is invalid - pdg->detach(); - - pdg = dor->getDataObject("pdg"); - - if (pdg != 0) - { - fprintf(f, " A deleted data object should be zero and was not\n"); - } - - pdg = mdg->create((Type&)tcd); - - // A new creation in the change summary - dor->setDataObject("pdg",pdg); - - // No modification as the object is created - pdg->setCString("name", "Mr Horace Walker"); - - sq = pdg->getSequence(); - - try { - // element 0 is the first setting - which we just deleted! - sq->setCStringValue(0,"Unable to set"); - } - catch (SDOIndexOutOfRangeException) - { - // thats OK - sq->addCString("name","Now able to set"); - } - - - sq->addText(" - should say now able to set\n"); - - for (unsigned int ii=0;iisize();ii++) - { - fprintf(f, "%s\n", sq->getCStringValue(ii)); - } - - try { - const char* n = pdg->getCString("name"); - fprintf(f, " Name from deleted item: %s\n",n); - } - catch (SDOPropertyNotFoundException e) - { - // thats ok - fprintf(f, "Correctly caught prop not found\n"); - } - - - // This should put a change in the cs. - dor->setCString("name","mega-new-acmecorp"); - - - // At this point, we should know that pdg was empty and is now - // a created object. And that the old string for company name - // was "acmecorp" - - // cs->DebugPrint(); - - - /* Now set up the primitive type test on PDG */ - - pdg->setCString("string","Hello I am a string"); - pdg->setBoolean("boolean",true); - pdg->setByte("byte",23); - pdg->setCharacter("character",45); - pdg->setShort("short",34); - pdg->setLong("long", 56); - pdg->setDouble("longdouble",89.0); - pdg->setFloat("float",90.0); - pdg->setDate("date",(time_t)200); - - // RHEL 4 has problems processing 64 bit integer constants, so we'll do it the hard way - // This is overkill but gives the option to vary the value a bit. - - int64_t largeInt1 = 0xFFFF; - int64_t largeInt2 = 0x7FFF; - for (int j = 0; j < 3; j++) - { - largeInt1 <<= 16; - largeInt1 += 0xFFFF; - largeInt2 <<= 16; - largeInt2 += 0xFFFF; - } - - pdg->setLong("longlong", largeInt1); - - // try reading the longlong as a string - const char *lls = pdg->getCString("longlong"); - fprintf(f, "0xffffffffffffffff = : %s\n", lls); - - pdg->setLong("longlong", largeInt2); - - lls = pdg->getCString("longlong"); - fprintf(f, "0x7fffffffffffffff = %s\n",lls); - - pdg->setLong("longlong",0x7FFFFFFF); - lls = pdg->getCString("longlong"); - fprintf(f, "0x7fffffff = %s\n",lls); - - pdg->setLong("longlong",0x80000000); - lls = pdg->getCString("longlong"); - fprintf(f, "0x80000000 = %s\n",lls); - - pdg->setLong("longlong",78); - - - wchar_t* wide = new wchar_t[4]; - wide[0] = 'W'; - wide[1] = 'i'; - wide[2] = 'd'; - wide[3] = 'e'; - - pdg->setString("string",wide,4); - - // and as a string? - wdc = pdg->getCString("string"); - fprintf(f, " Expected Wide - got : %s\n",wdc); - - delete[] wide; - - char* thin = new char[4]; - thin[0] = 'T'; - thin[1] = 'h'; - thin[2] = 'i'; - thin[3] = 'n'; - - pdg->setBytes("bytes",thin,4); - - const char* dc = pdg->getCString("bytes"); - fprintf(f, " Expected Thin - got : %s\n",dc); - - delete[] thin; - - const char* ps = pdg->getCString("string"); - fprintf(f, "Expecting string, got %s\n", ps); - - bool pb = pdg->getBoolean("boolean"); - fprintf(f, "Expected bool true, got %d\n",pb); - - char pc = pdg->getByte("byte"); - fprintf(f, "Expected char 23, got %d\n",pc); - - wchar_t pw = pdg->getCharacter("character"); - fprintf(f, "expected wchar 45, got %d",pw); - - short pss = pdg->getShort("short"); - fprintf(f, "Expected short 34, got %d\n",pss); - - long pl = pdg->getLong("long"); - fprintf(f, "Expected long 56 , got %ld\n",pl); - - int64_t pi = pdg->getLong("longlong"); - fprintf(f, "Expected long long 78, got %ld\n",(long)pi); - - long double ld = pdg->getDouble("longdouble"); - fprintf(f, "Expected long double 89, got %.3f\n",(float)ld); - - float pf = pdg->getFloat("float"); - fprintf(f, "Expected float 90, got %.3f\n",pf); - - SDODate pt = pdg->getDate("date"); - fprintf(f, "Expected time_t 200, got %d\n",pt.getTime()); - - - wchar_t* result; - // get the length to allocate: - unsigned int widelen = pdg->getString("string",0,0); - if (widelen > 0) { - result = new wchar_t[widelen]; - widelen = pdg->getString("string",result,widelen); - for ( i=0;igetBytes("bytes",0,0); - if (thinlen > 0) { - thinresult = new char[thinlen]; - thinlen = pdg->getBytes("bytes",thinresult,thinlen); - for ( i=0;icreateDataObject("departments"); - dep3->setCString("name","Architecture"); - - // The second should do no logging in the change summary - - DataObjectPtr dep4= dor->createDataObject("departments"); - dep4->setCString("name","Pyrotechnics"); - - - // create another one using tha alias - DataObjectPtr dep5= dor->createDataObject("TheDepartments"); - dep5->setCString("name","Accounts"); - - DataObjectPtr emp1 = dep1->createDataObject("employees"); - emp1->setCString("name","Eric"); - - - DataObjectPtr emp2 = dep1->createDataObject("employees"); - emp2->setCString("name","Bill"); - - // now lets make eric employee of the month - dor->setDataObject("employee of the month",emp1); - - // no - actually it was bill - dor->setDataObject("employee of the month",emp2); - - - - // Now add to the list of floats, hopefully the two old - // values will get change summarised. - - dolist = dor->getList("floatlist"); - float f1 = dolist.getFloat(0); - - fprintf(f, "%.3f",f1); - - dolist.setFloat(0,(float)567.7); - - f1 = dolist.getFloat(0); - - fprintf(f, "%.3f",f1); - - dolist.insert(0,(float)34.56); - - - DataObjectPtr ddd = dor->getDataObject("departments[1]/employees[2]"); - - const char* ch = ddd->getCString("name"); - - fprintf(f, "Should be Bill:%s\n",ch); - - - DataObjectPtr ddd2 = dor->getDataObject("TheDepartments[1]/employees[2]"); - - const char* ch2 = ddd2->getCString("name"); - - fprintf(f, "Should be Bill:%s\n",ch2); - - - DataObjectPtr dempofm = dor->getDataObject("employee of the month"); - - const char* chh = dempofm->getCString("name"); - - fprintf(f, "The employee of the month is %s\n",chh); - - // Suppose we delete bill - - DataObjectList& dlo = dor->getList("departments[1]/employees"); - DataObjectPtr fred = dlo.remove(1); - - const char* chh2 = fred->getCString("name"); - - dempofm = dor->getDataObject("employee of the month"); - - // uncertain bahaviour - should the reference be zeroed - // becuase the item is removed from a list or not? - // Right now it doesnt get done, as the assumption is that - // the object will be put somewhere else, or dropped. - // fprintf(f, "Emp of month is now zero : %p",dempofm); - - - /* "The client would create a data mediator and get graph which - would return the root data object " */ - - const char* boss = dor->getCString("pdg/name"); - - fprintf(f, "%s\n", boss); - - DataObjectPtr mypdg = dor->getDataObject("pdg"); - - Type::Types t = mypdg->getTypeEnum(); - - if (t != Type::OtherTypes) { - fprintf(f, "pdg correctly identified\n"); - } - - const char* boss2 = mypdg->getCString("name"); - - fprintf(f, "%s\n", boss2); - - /* getPrimitiveArrayListVectorThingy() */ - - DataObjectList& deps = dor->getList("departments"); - - fprintf(f, "size of list %d\n",deps.size()); - - DataObjectPtr dout = deps[0]; - - dout->setCString("name","Research And Development"); - - const char* snew = dout->getCString("name"); - - fprintf(f, "%s\n", snew); - - string snew2 = dor->getCString("departments[1 ] /name"); - - fprintf(f, "%s\n", snew2.c_str()); - - for (unsigned int lx = 0; lx < deps.size(); lx++) - { - fprintf(f, "Department: %s\n",deps[lx]->getCString("name")); - } - - cs->endLogging(); - - - try { - // should fail - if localtype not set - dor->setCString("departments","department label"); - const char* slabel = dor->getCString("departments"); - fprintf(f, "String in list type:%s\n", slabel); - // SDOValue change. Setting values usually works now, so no - //exception expected (the error is thrown on the get) - //return 0; - } - catch (SDORuntimeException e) - { - fprintf(f, "Normal expected exception\n"); - } - - try - { - const char* snew3 = dor->getCString(" ]awep50wi4,0qw9q]45]# q2345 -t -v3lt6o -56o 56=-o7nl ewv/;sdl f[vxddglh]px dfju/ g#k./jh#.k./"); - fprintf(f, "%s\n", snew3); - return 0; - } - catch (SDOPropertyNotFoundException e) - { - fprintf(f, "Normal Invalid path exception\n"); - } - - try - { - - // catch a and a property not found - const Property& pp = dor->getType().getProperty("notaproperty"); - return 0; - } - catch (SDOPropertyNotFoundException e) - { - fprintf(f, "Normal SDOPropertyNotFound exception\n"); - } - fclose(f); - return comparefiles("maintest.dat","maintest.txt"); - - } - - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << " in "; - if (!silent) cout << e.getFileName() << " at line "; - if (!silent) cout << e.getLineNumber() << endl; - if (!silent) cout << e.getFunctionName() << " "; - if (!silent) cout << e.getSeverity() << " "; - if (!silent) cout << e.getMessageText() << endl; - return 0; - } -} - -int sdotest::jira705() -{ - - char* retval = NULL; - - try - { - DataFactoryPtr dataFactoryPtr = DataFactory::getDataFactory(); - XSDHelperPtr xsdHelperPtr = HelperProvider::getXSDHelper((DataFactory *)dataFactoryPtr); - XMLHelperPtr xmlHelperPtr = HelperProvider::getXMLHelper((DataFactory *)dataFactoryPtr); - xsdHelperPtr->defineFile("jira705.xsd"); - - DataObjectPtr dataObjectPtr = dataFactoryPtr->create("http://ConvertedStockQuote", - "getQuote"); - - dataObjectPtr->setCString("ticker1", "IBM"); - dataObjectPtr->setNull("ticker2"); - - XMLDocumentPtr xmlDocumentPtr = xmlHelperPtr->createDocument(dataObjectPtr, 0, "getQuote"); - - retval = xmlHelperPtr->save(xmlDocumentPtr, 2); - } - catch (SDORuntimeException e) - { - if (!silent) cout << "jira705 test failed" << endl; - if (retval != NULL) - { - delete[] retval; - } - - return 0; - } - - FILE *outfile = fopen("jira705_out.xml", "w+"); - if (outfile == 0) - { - if (!silent) cout << "Unable to open jira705_out.xml" << endl; - if (retval != NULL) - { - delete[] retval; - } - return 0; - } - - fprintf(outfile, "%s", retval); - - fclose(outfile); - if (retval != NULL) - { - delete[] retval; - } - - return comparefiles("jira705_out.xml", "jira705_out.txt"); - -} - -int sdotest::jira490() -{ - - FILE *f; - - f = fopen("jira490.dat", "w+"); - if (f == 0) - { - if (!silent) cout << "Failed to open jira490.dat" << endl; - } - - fprintf(f,"Test Program starting to create types ...\n"); - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Employee"); - - const Type& ts = mdg->getType("commonj.sdo","String"); - const Type& te = mdg->getType("myspace","Employee"); - - mdg->addPropertyToType(te,"name",ts); - mdg->addPropertyToType(te,"officeNumber",ts); - - fprintf(f, "\nBefore Resolution\n\n"); - printDataStructure(f, mdg); - - /* Now create some objects in the dg */ - - DataObjectPtr dor = mdg->create((Type&) te); - - fprintf(f, "\nAfter Resolution\n\n"); - printDataStructure(f, mdg); - - dor->setCString("name", "Mr A Trader"); - dor->setCString("officeNumber", "123"); - - const char* chnam = dor->getCString("name"); - fprintf(f, "%s\n", chnam); - - const char* offnum = dor->getCString("officeNumber"); - fprintf(f, "%s\n", offnum); - - char c = dor->getByte("officeNumber"); - fprintf(f, "%d\n", c); - fprintf(f, "%c\n", c); - - fclose(f); - - return comparefiles("jira490.dat", "jira490.txt"); - -} - -int sdotest::getproptest() -{ - // should be able to get a property by xpath... - - FILE *f; - - f = fopen("getproptest.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open getproptest.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Department"); - // manager is a sequenced type... - mdg->addType("myspace","Manager", true, false); - mdg->addType("myspace","Employee"); - - - /* Now add the properties to the types...*/ - - const Type& tc = mdg->getType("myspace","Company"); - const Type& ts = mdg->getType("commonj.sdo","String"); - const Type& ti = mdg->getType("commonj.sdo","Integer"); - const Type& tf = mdg->getType("commonj.sdo","Float"); - const Type& tm = mdg->getType("myspace","Manager"); - const Type& td = mdg->getType("myspace","Department"); - const Type& te = mdg->getType("myspace","Employee"); - - mdg->addPropertyToType(tc,"name",ts); - - mdg->addPropertyToType(tc,"address",ts); - - mdg->addPropertyToType(tc,"departments", td,true); - - // add a reference to employee of the month - mdg->addPropertyToType(tc,"employee of the month", te, false, false, false); - - /* A list of floats */ - mdg->addPropertyToType(tc,"floatlist", tf,true); - mdg->addPropertyToType(tc,"director", tm); - - mdg->addPropertyToType(td,"name", ts); - mdg->addPropertyToType(td,"id", ti); - - mdg->addPropertyToType(td,"manager", tm); - mdg->addPropertyToType(tm,"name", ts); - - mdg->addPropertyToType(te,"name",ts); - mdg->addPropertyToType(td,"employees",te,true,false,true); - - //company/departments/employees. - // company - name, address, floatlist - // department name, id, manager - // employee name - - - const Type& tcc = mdg->getType("myspace","Company"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - - const Property& p = dor->getType().getProperty("name"); - fprintf(f, "Companys name property is: %s\n",p.getName()); - - const Property& p1 = dor->getType().getProperty("departments"); - fprintf(f, "Companys dept property is:%s\n",p1.getName()); - - // now try some xpaths... - - try { - - const Property& p2 = dor->getType().getProperty("departments/employees"); - fprintf(f,"Departments empl property is:%s\n",p2.getName()); - - const Property& p3 = dor->getType().getProperty("departments[456]/employees[123]"); - fprintf(f,"Departments empl property is:%s\n", p3.getName()); - - const Property& p4 = dor->getType().getProperty("departments.34/employees.123/name"); - fprintf(f,"Employees name property is:%s\n", p4.getName()); - - } - catch (SDORuntimeException e) - { - if (!silent) cout <<"Exceptions - xpath didnt work" << endl; - return 0; - } - try { - const Property& p5 = dor->getType().getProperty("departments.34/[]/name"); - fprintf(f,"Employees name property is:%s\n",p5.getName()); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f,"Normal exception caught\n"); - } - - try { - const Property& p6 = dor->getType().getProperty("deptartments"); - fprintf(f,"Deptartments property is:%s\n",p6.getName()); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f,"Normal exception caught\n"); - } - - try { - const Property& p7 = dor->getType().getProperty("../company"); - fprintf(f,"Company property is:%s\n",p7.getName()); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f,"Normal exception caught\n"); - } - fclose (f); - return comparefiles("getproptest.dat","getproptest.txt"); - -} - -int sdotest::querytest() -{ - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - FILE *f = fopen("querytest.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open querytest.dat" << endl; - return 0; - } - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Department"); - // manager is a sequenced type... - mdg->addType("myspace","Manager", true, false); - mdg->addType("myspace","Employee"); - - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool= mdg->getType("commonj.sdo","Boolean"); - const Type& tbyte= mdg->getType("commonj.sdo","Byte"); - const Type& tchar= mdg->getType("commonj.sdo","Character"); - const Type& tint= mdg->getType("commonj.sdo","Integer"); - const Type& tlong= mdg->getType("commonj.sdo","Long"); - const Type& tfloat= mdg->getType("commonj.sdo","Float"); - const Type& tbytes = mdg->getType("commonj.sdo","Bytes"); - const Type& tdouble= mdg->getType("commonj.sdo","Double"); - - const Type& tc = mdg->getType("myspace","Company"); - const Type& tm = mdg->getType("myspace","Manager"); - const Type& td = mdg->getType("myspace","Department"); - const Type& te = mdg->getType("myspace","Employee"); - - mdg->addPropertyToType(tc,"name",tstring); - - mdg->addPropertyToType(tc,"departments", td,true); - - // add a reference to employee of the month - mdg->addPropertyToType(tc,"employee of the month", te, false, false, false); - - mdg->addPropertyToType(tc,"director", tm); - - mdg->addPropertyToType(td,"name", tstring); - - mdg->addPropertyToType(td,"manager", tm); - - mdg->addPropertyToType(tm,"name", tstring); - - - mdg->addPropertyToType(td,"employees",te,true,false,true); - - mdg->addPropertyToType(te,"bool",tbool); - mdg->addPropertyToType(te,"byte",tbyte); - mdg->addPropertyToType(te,"char",tchar); - mdg->addPropertyToType(te,"int",tint); - mdg->addPropertyToType(te,"float",tfloat); - mdg->addPropertyToType(te,"long",tlong); - mdg->addPropertyToType(te,"double",tdouble); - mdg->addPropertyToType(te,"bytes",tbytes); - mdg->addPropertyToType(te,"string",tstring); - mdg->addPropertyToType(te,"name",tstring); - - //company/departments/employees. - // company - name, address, floatlist - // department name, id, manager - // employee name - - const Type& tcc = mdg->getType("myspace","Company"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectPtr dept = dor->createDataObject("departments"); - - DataObjectPtr emp1 = dept->createDataObject("employees"); - DataObjectPtr emp2 = dept->createDataObject("employees"); - DataObjectPtr emp3 = dept->createDataObject("employees"); - - emp1->setCString("name","Employee1"); - emp2->setCString("name","Employee2"); - emp3->setCString("name","Employee3"); - - - emp1->setBoolean("bool",true); - emp1->setByte("byte",'1'); - emp1->setCharacter("char",'1'); - emp1->setInteger("int",1); - emp1->setFloat("float",1.0); - emp1->setLong("long",1); - emp1->setDouble("double",1.0); - - char* bytes = new char[6]; - bytes[0] = 'h'; - bytes[1] = 'e'; - bytes[2] = 'l'; - bytes[3] = 'l'; - bytes[4] = 'o'; - - emp1->setBytes("bytes",bytes,5); - - wchar_t* mbytes = new wchar_t[6]; - mbytes[0] = 'h'; - mbytes[1] = 'e'; - mbytes[2] = 'l'; - mbytes[3] = 'l'; - mbytes[4] = 'o'; - - emp1->setString("string",mbytes,5); - - - emp2->setBoolean("bool",true); - emp2->setByte("byte",'2'); - emp2->setCharacter("char",'2'); - emp2->setInteger("int",200); - emp2->setFloat("float",200.0); - emp2->setLong("long",200); - emp2->setDouble("double",200.0); - - char* bytes2 = new char[6]; - bytes2[0] = 'h'; - bytes2[1] = 'e'; - bytes2[2] = 'l'; - bytes2[3] = 'p'; - bytes2[4] = '!'; - - emp2->setBytes("bytes",bytes2,5); - - wchar_t* mbytes2 = new wchar_t[6]; - mbytes2[0] = 'h'; - mbytes2[1] = 'e'; - mbytes2[2] = 'l'; - mbytes2[3] = 'p'; - mbytes2[4] = '!'; - - emp2->setString("string",mbytes2,5); - - emp3->setBoolean("bool",false); - emp3->setByte("byte",'4'); - emp3->setCharacter("char",'4'); - emp3->setInteger("int",400); - emp3->setFloat("float",400.0); - emp3->setLong("long",400); - emp3->setDouble("double",400.0); - - char* bytes3 = new char[6]; - bytes3[0] = 'w'; - bytes3[1] = 'o'; - bytes3[2] = 'm'; - bytes3[3] = 'p'; - bytes3[4] = '!'; - - emp3->setBytes("bytes",bytes3,5); - - wchar_t* mbytes3 = new wchar_t[6]; - mbytes3[0] = 'w'; - mbytes3[1] = 'o'; - mbytes3[2] = 'm'; - mbytes3[3] = 'p'; - mbytes3[4] = '!'; - - emp3->setString("string",mbytes3,5); - - - - try { - DataObjectPtr dob1 = dor->getDataObject("departments[1]/employees[bool=false]"); - fprintf(f, "Expected employee3: got %s\n",dob1->getCString("name")); - - DataObjectPtr dob2 = dor->getDataObject("departments[1]/employees[bool=true]"); - fprintf(f, "Expected employee1: got %s\n",dob2->getCString("name")); - - DataObjectPtr dob3 = dor->getDataObject("departments[1]/employees[byte=2]"); - fprintf(f, "Expected employee2: got %s\n",dob3->getCString("name")); - - DataObjectPtr dob4 = dor->getDataObject("departments[1]/employees[byte=1]"); - fprintf(f, "Expected employee1: got %s\n",dob4->getCString("name")); - - DataObjectPtr dob5 = dor->getDataObject("departments[1]/employees[bytes=hello]"); - fprintf(f, "Expected employee1: got %s\n",dob5->getCString("name")); - - DataObjectPtr dob5a = dor->getDataObject("departments[1]/employees[bytes=\"hello\"]"); - fprintf(f, "Expected employee1: got %s\n",dob5a->getCString("name")); - - DataObjectPtr dob5b = dor->getDataObject("departments[1]/employees[bytes='hello']"); - fprintf(f, "Expected employee1: got %s\n",dob5b->getCString("name")); - - DataObjectPtr dob6 = dor->getDataObject("departments[1]/employees[bytes=womp!]"); - fprintf(f, "Expected employee3: got %s\n",dob6->getCString("name")); - - DataObjectPtr dob7 = dor->getDataObject("departments[1]/employees[double=200.0]"); - fprintf(f, "Expected employee2: got %s\n",dob7->getCString("name")); - - DataObjectPtr dob8 = dor->getDataObject("departments[1]/employees[string=help!]"); - fprintf(f, "Expected employee2: got %s\n",dob8->getCString("name")); - - DataObjectPtr dob8a = dor->getDataObject("departments[1]/employees[string=\"help!\"]"); - fprintf(f, "Expected employee2: got %s\n",dob8a->getCString("name")); - - DataObjectPtr dob8b = dor->getDataObject("departments[1]/employees[string= 'help!']"); - fprintf(f, "Expected employee2: got %s\n",dob8b->getCString("name")); - } - catch (SDORuntimeException e) - { - if (!silent)cout << e.getEClassName() << " in "; - if (!silent)cout << e.getFileName() << " at line "; - if (!silent)cout << e.getLineNumber() << endl; - if (!silent)cout << e.getFunctionName() << " "; - if (!silent)cout << e.getMessageText() << endl; - return 0; - } - try { - DataObjectPtr dob1 = dor->getDataObject("departments[1]/employees[bool=doughnut]"); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f, "Normal exception caught\n"); - } - - try { - DataObjectPtr dob1 = dor->getDataObject("departments[4]/employees[bool=true]"); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f, "Normal exception caught\n"); - } - - try { - DataObjectPtr dob1 = dor->getDataObject("departments[1]/employees[bytes=whoomp!]"); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f, "Normal exception caught\n"); - } - - try { - DataObjectPtr dob1 = dor->getDataObject("departments[1]/blmployees[bool=true]"); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f, "Normal exception caught\n"); - } - - try { - DataObjectPtr dob1 = dor->getDataObject("departments[teapot]/employees[bool=true]"); - return 0; - } - - catch (SDORuntimeException e) - { - fprintf(f, "Normal exception caught\n"); - } - - delete[] bytes; - delete[] bytes2; - delete[] bytes3; - delete[] mbytes; - delete[] mbytes2; - delete[] mbytes3; - - fclose (f); - return comparefiles("querytest.dat","querytest.txt"); -} - -int sdotest::setmany() -{ - - FILE *f; - f = fopen("setmany.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open setmany.dat" << endl; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","School"); - mdg->addType("myspace","Class"); - mdg->addType("myspace","Teacher"); - mdg->addType("myspace","Child"); - mdg->addType("myspace","Address"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tint = mdg->getType("commonj.sdo","Integer"); - const Type& ts = mdg->getType("myspace","School"); - const Type& tc = mdg->getType("myspace","Class"); - const Type& tch = mdg->getType("myspace","Child"); - const Type& tt = mdg->getType("myspace","Teacher"); - const Type& ta = mdg->getType("myspace","Address"); - - mdg->addPropertyToType(tc,"name",tstring); - mdg->addPropertyToType(ts,"name",tstring); - mdg->addPropertyToType(tch,"name",tstring); - mdg->addPropertyToType(tt,"name",tstring); - - mdg->addPropertyToType(tc,"number",tint); - mdg->addPropertyToType(ts,"number",tint); - mdg->addPropertyToType(tch,"number",tint); - mdg->addPropertyToType(tt,"number",tint); - - mdg->addPropertyToType(ts,"classes", tc,true); - mdg->addPropertyToType(tc,"children", tch,true); - mdg->addPropertyToType(tc,"teacher", tt); - - mdg->addPropertyToType(tch,"address", ta); - mdg->addPropertyToType(ts,"address", ta); - mdg->addPropertyToType(tt,"address", ta); - - mdg->addPropertyToType(ta,"lines", tstring, true); - - DataObjectPtr school = mdg->create((Type&)ts); - - DataObjectPtr class1 = school->createDataObject("classes"); - DataObjectPtr class2 = school->createDataObject("classes"); - - DataObjectPtr teach1 = class1->createDataObject("teacher"); - - DataObjectPtr kid1 = class1->createDataObject("children"); - DataObjectPtr kid2 = class1->createDataObject("children"); - DataObjectPtr kid3 = class1->createDataObject("children"); - - DataObjectPtr teach2 = class2->createDataObject("teacher"); - - DataObjectPtr kid4 = class2->createDataObject("children"); - DataObjectPtr kid5 = class2->createDataObject("children"); - DataObjectPtr kid6 = class2->createDataObject("children"); - - school->setCString("name","King Norberts"); - school->createDataObject("address"); - school->setCString("address/lines.0","The Place"); - school->setCString("address/lines.1","1 The Avenue"); - school->setCString("address/lines.2","Murchester"); - school->setCString("address/lines.3","England"); - - class1->setCString("name","Primary"); - class2->setCString("name","Secondary"); - - class1->setCString("teacher/name","Mr Philbert Chloroform"); - class2->setCString("teacher/name","Mr Brian Onasis"); - - kid1->setCString("name", "Witherspoon Jnr"); - kid2->setCString("name", "Snape"); - kid3->setCString("name", "Thannet"); - kid4->setCString("name", "Grimbling"); - kid5->setCString("name", "Snagget Minor"); - kid6->setCString("name", "Van Den Bograt"); - - kid1->setInteger("number", 1); - kid2->setInteger("number", 2); - kid3->setInteger("number", 3); - kid4->setInteger("number", 4); - kid5->setInteger("number", 5); - kid6->setInteger("number", 6); - - fprintf(f," School :%s\n", school->getCString("name")); - - fprintf(f," Address1:%s\n",school->getCString("address/lines.0")); - fprintf(f," Address2:%s\n",school->getCString("address/lines.1")); - fprintf(f," Address3:%s\n",school->getCString("address/lines.2")); - fprintf(f," Address4:%s\n",school->getCString("address/lines.3")); - - fprintf(f," Class :%s\n",class1->getCString("name")); - fprintf(f," Teacher :%s\n",class1->getCString("teacher/name")); - fprintf(f," Pupil1 :%s\n",class1->getCString("children.0/name")); - fprintf(f," Pupil2 :%s\n",class1->getCString("children[number=2]/name")); - fprintf(f," Pupil3 :%s\n",class1->getCString("children[3]/name")); - - fprintf(f," Class :%s\n",class2->getCString("name")); - fprintf(f," Teacher :%s\n",class2->getCString("teacher/name")); - fprintf(f," Pupil1 :%s\n",class2->getCString("children[1]/name")); - fprintf(f," Pupil2 :%s\n",class2->getCString("children.1/name")); - fprintf(f," Pupil3 :%s\n",class2->getCString("children[number=6]/name")); - - try { - fprintf(f," Pupil3 :%s\n",class2->getCString("children[4]/name")); - return 0; - } - catch (SDOPathNotFoundException e) - { - fprintf(f,"Expected path not found exception caught\n"); - } - if (XpathHelper::isIndexed("abc[2]")) { - fprintf(f, "Indexed as expected\n"); - } - else { - fprintf(f, "Bad - not indexed\n"); - } - - if (XpathHelper::isIndexed("wibble/[2]")) { - fprintf(f, "Indexed as expected\n"); - } - else { - fprintf(f, "Bad - not indexed\n"); - } - - if (XpathHelper::isIndexed("wibble/wobble[2]")) { - fprintf(f, "Indexed as expected\n"); - } - else { - fprintf(f, "Bad - not indexed\n"); - } - - if (XpathHelper::isIndexed("wibble/wobble.2")) { - fprintf(f, "Indexed as expected\n"); - } - else { - fprintf(f, "Bad - not indexed\n"); - } - - if (XpathHelper::isIndexed("wibble/wobble.2")) { - fprintf(f, "Indexed as expected\n"); - } - else { - fprintf(f, "Bad - not indexed\n"); - } - - try { - fprintf(f," Address5 :%s\n",school->getCString("address/lines[5]")); - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - fprintf(f,"Normal index out of range caught\n"); - } - - try { - school->setCString("address/lines[6]","PostCode"); - fprintf(f, "Debatable behaviour - appended\n"); - fprintf(f," Address4 :%s\n",school->getCString("address/lines[5]")); - } - catch (SDORuntimeException e) - { - if (!silent)cout <<"Unexpected exception"<< endl; - return 0; - } - - fclose(f); - return comparefiles("setmany.dat","setmany.txt"); -} - -int sdotest::carotest2() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","root"); - - mdg->addPropertyToType("myspace","root","cs", - "commonj.sdo","ChangeSummary", false, false, false); - - const Type& troot = mdg->getType("myspace","root"); - - DataObjectPtr root = mdg->create((Type&)troot); - return 1; - } - catch (SDORuntimeException e) - { - return 0; - } -} - -int sdotest::adddeletetest() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","root"); - mdg->addType("myspace","bill"); - - mdg->addPropertyToType("myspace","root","cs", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addPropertyToType("myspace","root","bill", - "myspace","bill"); - - const Type& troot = mdg->getType("myspace","root"); - - DataObjectPtr root = mdg->create((Type&)troot); - - ChangeSummaryPtr cs = root->getChangeSummary(); - cs->beginLogging(); - DataObjectPtr dob = root->createDataObject("bill"); - root->unset("bill"); - return 1; - } - catch (SDORuntimeException e) - { - return 0; - } -} - -int sdotest::carotest() -{ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","root"); - mdg->addType("myspace","company"); - mdg->addType("myspace","department"); - mdg->addType("myspace","employee"); - - mdg->addPropertyToType("myspace","root","cs", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addPropertyToType("myspace","company","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","department","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","employee","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","root","companies", - "myspace","company", true, false, true); - - mdg->addPropertyToType("myspace","company","departments", - "myspace","department", true, false, true); - - mdg->addPropertyToType("myspace","company","eotm", - "myspace","employee", false, false, false); - - mdg->addPropertyToType("myspace","department","employees", - "myspace","employee", true, false, true); - - const Type& troot = mdg->getType("myspace","root"); - - - DataObjectPtr root = mdg->create((Type&)troot); - ChangeSummaryPtr cs = root->getChangeSummary(); - - cs->beginLogging(); - - DataObjectPtr comp = root->createDataObject("companies"); - - comp->setCString("name","Acme"); - - //cout << "name of the company is " << comp->getCString("name") << endl; - try { - root->unset("companies[0]"); - return 1; - } - catch (SDOUnsupportedOperationException e) - { - if (!silent)cout << "Abnormal unsupported operation for unset of many valued item" << endl; - return 0; - } -} - - -int sdotest::bug2() -{ - - FILE *f; - - f = fopen("bug2.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open bug2.dat" << endl; - return 0; - } - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","root"); - mdg->addType("myspace","company"); - - mdg->addPropertyToType("myspace","root","cs", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addPropertyToType("myspace","company","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","root","companies", - "myspace","company", true, false, true); - - - const Type& troot = mdg->getType("myspace","root"); - - - DataObjectPtr root = mdg->create((Type&)troot); - - ChangeSummaryPtr cs = root->getChangeSummary(); - - cs->beginLogging(); - - DataObjectPtr comp = root->createDataObject("companies"); - - comp->setCString("name","Acme"); - - dumpproperties(f,root); - - DataObjectList& dl = root->getList("companies"); - dl.remove(0); - - dumpproperties(f,root); - - - fprintf(f, "Change summary should have no entries...\n"); - - dumpchangesummary(f,cs); - - dumpproperties(f,root); - - fprintf(f, "Change summary should have no entries...\n"); - - dumpchangesummary(f,cs); - - fclose(f); - return comparefiles("bug2.dat","bug2.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << " in "; - if (!silent) cout << e.getFileName() << " at line "; - if (!silent) cout << e.getLineNumber() << endl; - if (!silent) cout << e.getFunctionName() << " "; - if (!silent) cout << e.getMessageText() << endl; - return 0; - } -} - - -int sdotest::dumpproperties(FILE *f, DataObjectPtr root) -{ - PropertyList pl = root->getInstanceProperties(); - for (unsigned int i=0;igetList(pl[i]); - if (pl[i].getType().isDataType()) - { - char buf[10]; - for (unsigned int j=0;jgetCString(pl[i])); - } - else - { - fprintf(f,"Object Property%s\n:",pl[i].getName()); - DataObjectPtr d = root->getDataObject(pl[i]); - if (d != 0) - { - dumpproperties(f, d); - } - else - { - fprintf(f," Value was not set or null\n"); - } - fprintf(f,"End of Object Property %s\n",pl[i].getName()); - } - } - } - return 1; -} - - -int sdotest::datetest() -{ - - try { - - FILE *f = fopen("datetest.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open datetest.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","root"); - mdg->addType("myspace","company"); - - mdg->addPropertyToType("myspace","root","cs", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addPropertyToType("myspace","company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","company","startupdate", - "commonj.sdo","Date", false, false, false); - - mdg->addPropertyToType("myspace","company","reviewdates", - "commonj.sdo","Date", true, false, false); - - - mdg->addPropertyToType("myspace","root","company", - "myspace","company", false, false, true); - - - - const Type& troot = mdg->getType("myspace","root"); - - - DataObjectPtr root = mdg->create((Type&)troot); - ChangeSummaryPtr cs = root->getChangeSummary(); - - cs->beginLogging(); - - DataObjectPtr comp = root->createDataObject("company"); - - - comp->setCString("name","DateTest"); - - fprintf(f,"Name of the company is %s\n",comp->getCString("name")); - - comp->setDate("startupdate",SDODate( 1000 )); - - fprintf(f,"Set start of the company is %d\n",comp->getDate("startupdate").getTime()); - - DataObjectList& dol = comp->getList("reviewdates"); - - dol.append(SDODate(2000)); - dol.append(SDODate(4000)); - - for (unsigned int i=0;i < dol.size(); i++) - { - fprintf(f,"Review number:%d was:%d\n", i,dol.getDate(i).getTime()); - - // ascTime gives different values on windows and linux, - // so comparison of the output is not a valid test. - - //fprintf(f,"Formatted:%d was:%s\n",i,dol.getDate(i).ascTime()); - } - - cs->endLogging(); - - fclose(f); - - return comparefiles("datetest.dat","datetest.txt"); - } - - catch (SDORuntimeException e) - { - if (!silent)cout << e.getEClassName() << " in "; - if (!silent)cout << e.getFileName() << " at line "; - if (!silent)cout << e.getLineNumber() << endl; - if (!silent)cout << e.getFunctionName() << " "; - if (!silent)cout << e.getMessageText() << endl; - return 0; - } - -} - -int sdotest::matttest1() -{ - - try { - FILE *f = fopen("matttest1.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open matttest1.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","root"); - mdg->addType("myspace","company"); - mdg->addType("myspace","department"); - mdg->addType("myspace","employee"); - - mdg->addPropertyToType("myspace","root","cs", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addPropertyToType("myspace","company","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","department","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","employee","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","root","companies", - "myspace","company", true, false, true); - - mdg->addPropertyToType("myspace","company","departments", - "myspace","department", true, false, true); - - mdg->addPropertyToType("myspace","company","eotm", - "myspace","employee", false, false, false); - - mdg->addPropertyToType("myspace","department","employees", - "myspace","employee", true, false, true); - - const Type& troot = mdg->getType("myspace","root"); - - - DataObjectPtr root = mdg->create((Type&)troot); - - DataObjectPtr comp = root->createDataObject("companies"); - - comp->setCString("name","Acme"); - - DataObjectPtr dept1 = comp->createDataObject("departments"); - - dept1->setCString("name","Shoe"); - - DataObjectPtr dept2 = comp->createDataObject("departments"); - - dept2->setCString("name","IT"); - - DataObjectPtr sue = dept1->createDataObject("employees"); - - sue->setCString("name","Sue"); - - DataObjectPtr billy = dept2->createDataObject("employees"); - - billy->setCString("name","Billy"); - - // Want to swap Sue and Billy so, while holding them in variables, should be - //able to unset from department then reinsert - - // method 1 - clear the lists... - dept1->unset("employees"); - dept2->unset("employees"); - - DataObjectPtr cont = billy->getContainer(); - - if (cont != 0) - { - if (!silent)cout << "Container of Billy should be zero, but is :" << cont->getCString("name") << endl; - return 0; - } - - DataObjectList& li1 = dept1->getList("employees"); - DataObjectList& li2 = dept2->getList("employees"); - li1.append(billy); - li2.append(sue); - - DataObjectPtr cont2 = billy->getContainer(); - - if (cont2 != 0) - { - fprintf(f,"Container of Billy should be dept1, and is :%s\n", cont2->getCString("name")); - } - else { - if (!silent)cout << "Problem - Billy is not contained." << endl; - return 0; - } - - li1.remove(0); - li2.remove(0); - - DataObjectPtr cont3 = billy->getContainer(); - - if (cont3 != 0) - { - if (!silent)cout << "Container of Billy should be zero, but is :" << cont3->getCString("name") << endl; - return 0; - } - - li1.append(sue); - li2.append(billy); - - DataObjectPtr cont4 = billy->getContainer(); - - if (cont4 != 0) - { - fprintf(f,"Container of Billy should be dept2, and is :%s\n", cont4->getCString("name")); - } - else { - if (!silent)cout << "Problem - Billy is not contained." << endl; - return 0; - } - - fclose(f); - - return comparefiles("matttest1.dat","matttest1.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << e.getEClassName() << " in "; - if (!silent)cout << e.getFileName() << " at line "; - if (!silent)cout << e.getLineNumber() << endl; - if (!silent)cout << e.getFunctionName() << " "; - if (!silent)cout << e.getMessageText() << endl; - return 0; - } -} - -int sdotest::carotest3() -{ - // sequence new APIs - // data object list, new getLength(unsigned int) - - - FILE *f = fopen("carotest3.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open carotest3.dat" << endl; - return 0; - } - DataFactoryPtr mdg = DataFactory::getDataFactory(); - // company is sequenced. - mdg->addType("myspace","Company",true,false); - - mdg->addType("myspace","Department",true,false); - // string is many - - mdg->addPropertyToType("myspace","Company","string","commonj.sdo","String", - true); - - mdg->addPropertyToType("myspace","Company","departments","myspace","Department", - true); - - mdg->addPropertyToType("myspace","Company","strings","commonj.sdo","String", - true); - - mdg->addPropertyToType("myspace","Company","integers","commonj.sdo","Integer", - true); - - - mdg->addPropertyToType("myspace","Department","name","commonj.sdo","String"); - - - const Type& tcc = mdg->getType("myspace","Company"); - - DataObjectPtr dor = mdg->create(tcc); - const Property& sprop = dor->getType().getProperty("string"); - - SequencePtr sptr = dor->getSequence(); - - printseq(f,sptr); - - sptr->addCString(sprop,"I am Item 1 of string"); - - printseq(f,sptr); - - sptr->addText("I am the first free text"); - - printseq(f,sptr); - - sptr->addCString(sprop,"I am Item 2 of string"); - - printseq(f,sptr); - - sptr->setText(1,"I am free text which has been modified"); - - printseq(f,sptr); - - DataObjectPtr dep1 = dor->createDataObject("departments"); - - printseq(f,sptr); - - dep1->setCString("name","department1"); - - printseq(f,sptr); - - DataObjectList& dol = dor->getList("departments"); - - unsigned int ii = dol.getLength(0); - - if (ii != 0) - { - if (!silent)cout << "Length of a data object should be zero:" << ii << endl; - return 0; - } - - DataObjectList& strl = dor->getList("strings"); - - wchar_t * buf = new wchar_t[5]; - buf[0] = 'a'; - buf[1] = 'b'; - buf[2] = 'c'; - buf[3] = 'd'; - buf[4] = 'e'; - - strl.append(buf,1); - strl.append(buf,2); - strl.append(buf,3); - strl.append(buf,4); - strl.append(buf,5); - - fprintf(f,"Element zero, length 1: %d\n",strl.getLength(0)); - fprintf(f,"Element one, length 2: %d\n",strl.getLength(1)); - fprintf(f,"Element two, length 3: %d\n",strl.getLength(2)); - fprintf(f,"Element three,length 4: %d\n",strl.getLength(3)); - fprintf(f,"Element four, length 5: %d\n",strl.getLength(4)); - - try { - int xx = strl.getLength(5); - if (!silent)cout << "problem - element 5 should not exist" << endl; - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - if (!silent)cout << "Normal out of range exception in test" << endl; - } - - DataObjectList& numl = dor->getList("integers"); - - try { - int xx2 = numl.getLength(0); - if (!silent)cout << "problem - element 0 should not exist" << endl; - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - if (!silent)cout << "Normal out of range exception in test" << endl; - } - fclose(f); - return comparefiles("carotest3.dat","carotest3.txt"); -} - - -int sdotest::eqhelpertest() -{ - - // copy and equality helpers - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Assembly"); - mdg->addType("myspace","SubAssembly"); - mdg->addType("myspace","Part"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tint = mdg->getType("commonj.sdo","Integer"); - const Type& tassy = mdg->getType("myspace","Assembly"); - const Type& tsubassy = mdg->getType("myspace","SubAssembly"); - const Type& tpart = mdg->getType("myspace","Part"); - - - mdg->addPropertyToType(tassy,"name",tstring); - mdg->addPropertyToType(tsubassy,"name",tstring); - mdg->addPropertyToType(tpart,"name",tstring); - - mdg->addPropertyToType(tassy,"number",tint); - mdg->addPropertyToType(tsubassy,"number",tint); - mdg->addPropertyToType(tpart,"number",tint); - - mdg->addPropertyToType(tassy,"subassemblies", tsubassy,true); - mdg->addPropertyToType(tsubassy,"parts", tpart,true); - - - // assy 1 - - DataObjectPtr assy1 = mdg->create((Type&)tassy); - - DataObjectPtr subassy1 = assy1->createDataObject("subassemblies"); - DataObjectPtr subassy2 = assy1->createDataObject("subassemblies"); - - DataObjectPtr part1 = subassy1->createDataObject("parts"); - DataObjectPtr part2 = subassy1->createDataObject("parts"); - DataObjectPtr part3 = subassy1->createDataObject("parts"); - - DataObjectPtr part4 = subassy2->createDataObject("parts"); - DataObjectPtr part5 = subassy2->createDataObject("parts"); - DataObjectPtr part6 = subassy2->createDataObject("parts"); - - - assy1->setCString("name","MicroFrame"); - assy1->setInteger("number",32768); - - subassy1->setCString("name","Legs"); - subassy2->setCString("name","Body"); - subassy1->setInteger("number",1); - subassy2->setInteger("number",2); - - part1->setCString("name","Leg1"); - part2->setCString("name","Leg2"); - part3->setCString("name","Leg3"); - part1->setInteger("number",10001); - part2->setInteger("number",10002); - part3->setInteger("number",10003); - - - part4->setCString("name","MainStrut"); - part5->setCString("name","Brace1"); - part6->setCString("name","Brace2"); - part4->setInteger("number",20001); - part5->setInteger("number",20002); - part6->setInteger("number",20003); - - // assy2 - shallow equal to assy, but not deep equal - - DataObjectPtr assy2 = mdg->create((Type&)tassy); - - DataObjectPtr subassy3 = assy2->createDataObject("subassemblies"); - DataObjectPtr subassy4 = assy2->createDataObject("subassemblies"); - - DataObjectPtr part7 = subassy3->createDataObject("parts"); - DataObjectPtr part8 = subassy3->createDataObject("parts"); - DataObjectPtr part9 = subassy3->createDataObject("parts"); - - DataObjectPtr part10 = subassy4->createDataObject("parts"); - DataObjectPtr part11 = subassy4->createDataObject("parts"); - DataObjectPtr part12 = subassy4->createDataObject("parts"); - - - assy2->setCString("name","MicroFrame"); - assy2->setInteger("number",32768); - - subassy3->setCString("name","Legs"); - subassy4->setCString("name","Body"); - subassy3->setInteger("number",1); - subassy4->setInteger("number",2); - - part7->setCString("name","Leg1"); - part8->setCString("name","Leg2"); - part9->setCString("name","Leg3"); - part7->setInteger("number",10001); - part8->setInteger("number",10002); - part9->setInteger("number",10003); - - - part10->setCString("name","MainStrut"); - part11->setCString("name","Brace1"); - part12->setCString("name","OddBrace2"); - part10->setInteger("number",20001); - part11->setInteger("number",20002); - part12->setInteger("number",20003); - - if (!EqualityHelper::equalShallow(assy1, assy2)) - { - if (!silent) cout << "EQUALITY HELPER TEST - failure at first test" << endl; - return 0; - } - if (EqualityHelper::equal(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at second test" << endl; - return 0; - } - - // Now alter assy2 to be deep equal... - - - part12->setCString("name","Brace2"); - - if (!EqualityHelper::equalShallow(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at third test" << endl; - return 0; - } - if (!EqualityHelper::equal(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at fourth test" << endl; - return 0; - } - - // now add a part, so its not deep equal again - DataObjectPtr part13 = subassy4->createDataObject("parts"); - - if (!EqualityHelper::equalShallow(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at fifth test" << endl; - return 0; - } - if (EqualityHelper::equal(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at sixth test" << endl; - return 0; - } - - // now remove that part again... - DataObjectList& dl = subassy4->getList("parts"); - dl.remove(3); - - // should be deep equal again... - - if (!EqualityHelper::equalShallow(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at seventh test" << endl; - return 0; - } - if (!EqualityHelper::equal(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at eighth test" << endl; - return 0; - } - // now make them not shallow equal - assy2->setInteger("number",32767); - - if (EqualityHelper::equalShallow(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at nineth test" << endl; - return 0; - } - if (EqualityHelper::equal(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at tenth test" << endl; - return 0; - } - return 1; -} - -int sdotest::cohelpertest() -{ - - // copy and equality helpers - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Assembly"); - mdg->addType("myspace","SubAssembly"); - mdg->addType("myspace","Part"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tint = mdg->getType("commonj.sdo","Integer"); - const Type& tassy = mdg->getType("myspace","Assembly"); - const Type& tsubassy = mdg->getType("myspace","SubAssembly"); - const Type& tpart = mdg->getType("myspace","Part"); - - - mdg->addPropertyToType(tassy,"name",tstring); - mdg->addPropertyToType(tsubassy,"name",tstring); - mdg->addPropertyToType(tpart,"name",tstring); - - mdg->addPropertyToType(tassy,"number",tint); - mdg->addPropertyToType(tsubassy,"number",tint); - mdg->addPropertyToType(tpart,"number",tint); - - mdg->addPropertyToType(tassy,"subassemblies", tsubassy,true); - mdg->addPropertyToType(tsubassy,"parts", tpart,true); - - - // assy 1 - - DataObjectPtr assy1 = mdg->create((Type&)tassy); - - DataObjectPtr subassy1 = assy1->createDataObject("subassemblies"); - DataObjectPtr subassy2 = assy1->createDataObject("subassemblies"); - - DataObjectPtr part1 = subassy1->createDataObject("parts"); - DataObjectPtr part2 = subassy1->createDataObject("parts"); - DataObjectPtr part3 = subassy1->createDataObject("parts"); - - DataObjectPtr part4 = subassy2->createDataObject("parts"); - DataObjectPtr part5 = subassy2->createDataObject("parts"); - DataObjectPtr part6 = subassy2->createDataObject("parts"); - - - assy1->setCString("name","MicroFrame"); - assy1->setInteger("number",32768); - - subassy1->setCString("name","Legs"); - subassy2->setCString("name","Body"); - subassy1->setInteger("number",1); - subassy2->setInteger("number",2); - - part1->setCString("name","Leg1"); - part2->setCString("name","Leg2"); - part3->setCString("name","Leg3"); - part1->setInteger("number",10001); - part2->setInteger("number",10002); - part3->setInteger("number",10003); - - - part4->setCString("name","MainStrut"); - part5->setCString("name","Brace1"); - part6->setCString("name","Brace2"); - part4->setInteger("number",20001); - part5->setInteger("number",20002); - part6->setInteger("number",20003); - - // first lets shallow copy assy1: - - DataObjectPtr assy2 = CopyHelper::copyShallow(assy1); - - if (strcmp(assy2->getCString("name"),"MicroFrame")) - { - if (!silent)cout << "COPYHELPER shallow copy failed(1)" << endl; - return 0; - } - else if (assy2->getInteger("number") != 32768) - { - if (!silent)cout << "COPYHELPER shallow copy 1 failed(2)" << endl; - return 0; - } - else if (assy2->getList("subassemblies").size() != 0) - { - if (!silent)cout << "COPYHELPER shallow copy 1 failed(3)" << endl; - return 0; - } - else if (assy2->getContainer() != 0) - { - if (!silent)cout << "COPYHELPER shallow copy failed(4)" << endl; - return 0; - } - - // now deep copy it - - DataObjectPtr assy3 = CopyHelper::copy(assy1); - - if (!EqualityHelper::equal(assy1, assy3)) - { - if (!silent)cout << "COPYHELPER deep copy failed(1)" << endl; - return 0; - } - else if (assy3->getContainer() != 0) - { - if (!silent)cout << "COPYHELPER deep copy failed(2)" << endl; - return 0; - } - return 1; -} - - -int sdotest::cssave() -{ - - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("company.xsd"); - - //mdg->addType("companyNS","CompanyType"); - //mdg->addType("companyNS","EmployeeType"); - //mdg->addType("companyNS","DepartmentType"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - - //mdg->addPropertyToType(tcomp,"name",tstring); - // not containment... - //mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp, false,false,false); - //mdg->addPropertyToType(tcomp,"departments",tdept, true); - //mdg->addPropertyToType(tcomp,"cs",tcs); - - //mdg->addPropertyToType(tdept,"name",tstring); - //mdg->addPropertyToType(tdept,"location",tstring); - //mdg->addPropertyToType(tdept,"number",tstring); - //mdg->addPropertyToType(tdept,"employees",temp,true); - - //mdg->addPropertyToType(temp, "name",tstring); - //mdg->addPropertyToType(temp, "SN", tstring); - //mdg->addPropertyToType(temp, "manager", tbool); - - - // create a graph, then save it - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","ACME"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","Advanced Technologies"); - dept->setCString("location","NY"); - dept->setCString("number","123"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - - emp1->setCString("name","John Jones"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Mary Smith"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Jane Doe"); - emp3->setCString("SN","E0003"); - - DataObjectList& dol2 = dept->getList("employees"); - dol2.append(emp1); - dol2.append(emp2); - dol2.append(emp3); - - comp->setDataObject("employeeOfTheMonth",emp2); - - ChangeSummaryPtr cs = comp->getChangeSummary(); - - cs->beginLogging(); - - DataObjectPtr emp4 = mdg->create(temp); - emp4->setCString("name","Al Smith"); - emp4->setCString("SN","E0004"); - emp4->setBoolean("manager",true); - - // first change - create employee 4 - dol2.append(emp4); - - dol2.remove(1); // element 1 is Mary - - DataObjectPtr emp5 = mdg->create(temp); - emp5->setCString("name","Bill Withers"); - emp5->setCString("SN","E0005"); - - dol2.append(emp5); - - - comp->setCString("name","MegaCorp"); - comp->setDataObject("employeeOfTheMonth",emp4); - - // silly test - add mary back again - dol2.append(emp2); - - - - - cs->endLogging(); - - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company"); - xmh->save(doc,"cssave-output.xml"); - return comparefiles("cssave-output.xml","cssave-output.txt"); - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "CSSAVE FAILED" << e << endl; - return 0; - } -} - -int sdotest::cssave2() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("company.xsd"); - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - - // create a graph, then save it - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","Eastleigh Borough Council"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","Waste Disposal"); - dept->setCString("location","Botley"); - dept->setCString("number","123"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - DataObjectPtr emp4 = mdg->create(temp); - DataObjectPtr emp5 = mdg->create(temp); - - emp1->setCString("name","Alphonse Dodet"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Bridget Jones"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Colin Thorne"); - emp3->setCString("SN","E0003"); - - emp4->setCString("name","Donald Trump"); - emp4->setCString("SN","E0004"); - - emp5->setCString("name","Eddy the eagle"); - emp5->setCString("SN","E0005"); - - DataObjectList& dol2 = dept->getList("employees"); - dol2.append(emp1); - dol2.append(emp2); - dol2.append(emp3); - dol2.append(emp4); - dol2.append(emp5); - - //comp->setDataObject("employeeOfTheMonth",emp2); - - DataObjectPtr dept2 = mdg->create((Type&)tdept); - dol.append(dept2); - - dept2->setCString("name","Tax Collection"); - dept2->setCString("location","Winchester"); - dept2->setCString("number","666"); - - DataObjectPtr empb1 = mdg->create(temp); - DataObjectPtr empb2 = mdg->create(temp); - DataObjectPtr empb3 = mdg->create(temp); - DataObjectPtr empb4 = mdg->create(temp); - DataObjectPtr empb5 = mdg->create(temp); - - empb1->setCString("name","Arch Meanie"); - empb1->setCString("SN","D0001"); - - empb2->setCString("name","Boris the Spider"); - empb2->setCString("SN","D0002"); - empb2->setBoolean("manager",true); - - empb3->setCString("name","Cash Hoarder"); - empb3->setCString("SN","D0003"); - - empb4->setCString("name","Dean Giyatoss"); - empb4->setCString("SN","D0004"); - - empb5->setCString("name","Ebenezer Scrooge"); - empb5->setCString("SN","D0005"); - - DataObjectList& dol3 = dept2->getList("employees"); - dol3.append(empb1); - dol3.append(empb2); - dol3.append(empb3); - dol3.append(empb4); - dol3.append(empb5); - - ChangeSummaryPtr cs = comp->getChangeSummary(); - - cs->beginLogging(); - - // start by deleting a few employees from dept 1 - - dol2.remove(1); // B - dol2.remove(1); // C - dol2.remove(1); // D - - // Now delete the tax collectors as a whole - - dol.remove(1); - - // now perhaps add back one of the employees - - dol2.append(emp3); // C - - comp->setCString("name","MegaCorp"); - - try { - comp->setDataObject("employeeOfTheMonth",emp4); - if (!silent)cout << "emp4 was not in the tree" << endl; - return 0; - } - catch (SDORuntimeException e) - { - } - - comp->setDataObject("employeeOfTheMonth",emp5); - - cs->endLogging(); - - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company"); - xmh->save(doc,"cssave2-output.xml"); - return comparefiles("cssave2-output.xml","cssave2-output.txt"); - } - catch (SDORuntimeException e) - { - if (!silent)cout << "CSSAVE FAILED" << e << endl; - return 0; - } -} - - - - - -int sdotest::b45933() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - - mdg->addType("companyNS","CompanyType"); - mdg->addType("companyNS","WombatType"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& twom = mdg->getType("companyNS","WombatType"); - - - mdg->addPropertyToType(tcomp,"name",tstring); - mdg->addPropertyToType(tcomp,"bools",tbool, true); - mdg->addPropertyToType(tcomp,"woms",twom, true); - mdg->addPropertyToType(tcomp,"cs",tcs); - - - // create a graph, then save it - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","Bug45933"); - - ChangeSummaryPtr cs = comp->getChangeSummary(); - - cs->beginLogging(); - - DataObjectList& dol = comp->getList("bools"); - dol.append(false); - dol.remove(0); - DataObjectPtr awom = mdg->create((Type&)twom); - DataObjectList& dol2 = comp->getList("woms"); - dol2.append(awom); - dol2.remove(0); - - cs->endLogging(); - - //dumpchangesummary(cs); - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company"); - xmh->save(doc,"bug45933-output.xml"); - return comparefiles("bug45933-output.xml","bug45933-output.txt"); - } - catch (SDORuntimeException e) - { - if (!silent)cout << "BUG45933 FAILED" << endl << e << endl; - return 0; - } -} - -int sdotest::b46617() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - //XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - //xsh->defineFile("b46617.xsd"); - mdg->addType("companyNS","CompanyType"); - mdg->addType("companyNS","DepartmentType"); - mdg->addType("companyNS","EmployeeType"); - - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - mdg->addPropertyToType(tcomp,"name",tstring); - mdg->addPropertyToType(tcomp,"departments",tdept,true,false,true); - mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp,false,false,false); - mdg->addPropertyToType(tcomp,"CEO",temp,false,false,true); - - mdg->addPropertyToType(tdept,"employees",temp,true,false,true); - mdg->addPropertyToType(tdept,"name",tstring,false,false,true); - mdg->addPropertyToType(tdept,"location",tstring,false,false,true); - mdg->addPropertyToType(tdept,"number",tstring,false,false,true); - - mdg->addPropertyToType(temp,"name",tstring,false,false,true); - mdg->addPropertyToType(temp,"SN",tstring,false,false,true); - mdg->addPropertyToType(temp,"manager",tbool,false,false,true); - - // create a graph, then save it - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","Eastleigh Borough Council"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","Waste Disposal"); - dept->setCString("location","Botley"); - dept->setCString("number","123"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - - emp1->setCString("name","Alphonse Dodet"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Bridget Jones"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Carl Marx"); - emp3->setCString("SN","E0003"); - - comp->setDataObject("CEO",emp2); - - DataObjectList& dol2 = dept->getList("employees"); - dol2.append(emp1); - //dol2.append(emp2); - dol2.append(emp3); - - comp->setDataObject("employeeOfTheMonth",emp2); - - XSDHelperPtr xmd = HelperProvider::getXSDHelper(mdg); - xmd->generateFile(mdg->getTypes(), - "b46617.xsd","companyNS"); - - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company"); - xmh->save(doc,"b46617.xml"); - - // now try loading the xml, using the same schema, and see if we get the - // same answer - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("b46617.xml", "companyNS"); - DataObjectPtr newdob = myXMLDocument->getRootDataObject(); - - - if (strcmp(newdob->getDataObject("employeeOfTheMonth")->getCString("name"), - "Bridget Jones")) - { - if (!silent)cout << "Employee of the month name has changed" << endl; - return 0; - } - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "b46617 failed" << e << endl; - return 0; - } -} - -int sdotest::b46617b() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("b46617b.xsd"); - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("b46617b.xml", "companyNS"); - DataObjectPtr newdob = myXMLDocument->getRootDataObject(); - - if (strcmp(newdob->getDataObject("employeeOfTheMonth")->getCString("name"), - "Fred Smith")) - { - if (!silent)cout << "Employee of the month name has changed" << endl; - return 0; - } - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "b46617b failed" << e << endl; - return 0; - } -} - -int sdotest::notfound() -{ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - try { - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("not_present.xsd"); - } - catch (SDOFileNotFoundException e) - { - //cout << "NotFound threw correct exception " << endl; - } - - catch (SDORuntimeException e) - { - if (!silent)cout << "NOTFOUND THREW THE WRONG EXCEPTION" << e << endl; - return 0; - } - - try { - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("not-present.xml", "companyNS"); - - } - catch (SDOFileNotFoundException ee) - { - //cout << "NotFound threw the correct exception" << endl; - } - - catch (SDORuntimeException e) - { - if (!silent)cout << "NOTFOUND THREW THE WRONG EXCEPTION" << e << endl; - return 0; - } - return 1; -} - -int sdotest::csload() -{ - try - { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("company.xsd"); - - //cout << "TYPES LOADED FROM COMPANY XSD" << endl; - - //TypeList tl = mdg->getTypes(); - //for (int i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("cssave-output.xml", "companyNS"); - //myXMLDocument->setRootElementName("company"); - //myXMLHelper->save(myXMLDocument,"csload-output.xml"); - myXMLHelper->save(myXMLDocument->getRootDataObject(), - 0, "company", "csload-output.xml"); - - return comparefiles("csload-output.xml","csload-output.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "CSLOAD FAILED" << e << endl; - return 0; - } - -} - -int sdotest::testsubsload() -{ - try - { - FILE *f = fopen("testsubsload.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open testsubsload.dat" << endl; - return 0; - } - - fprintf(f,"TEST: TestSubsLoad ==========================================\n"); - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("companysubs.xsd"); - - //cout << "TYPES LOADED FROM COMPANYSUBS XSD" << endl; - - //TypeList tl = mdg->getTypes(); - //for (int i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - // so now we should be able to put book or a magazine into - // the publication under company... - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& book = mdg->getType("companyNS","BookType"); - const Type& mag = mdg->getType("companyNS","MagazineType"); - const Type& pub = mdg->getType("companyNS","PublicationType"); - - - // create a graph, then save it - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","Puflet Publishing"); - - - DataObjectPtr book1 = mdg->create(book); - book1->setCString("author","Mr P B Writer"); - // inherted from publication - book1->setCString("title","Nowhere Man"); - - DataObjectPtr mag1 = mdg->create(mag); - mag1->setCString("editor","Mr B Picky"); - // inherited from publication - mag1->setCString("title","Bionicle Weekly"); - - DataObjectPtr pub1 = mdg->create(pub); - pub1->setCString("title","Noddy In Toyland"); - - - // publication should accept any of them... - - comp->setDataObject("Publication",pub1); - const Type& tpub1 = comp->getDataObject("Publication")->getType(); - fprintf(f,"Publication is of type %s\n",tpub1.getName()); - - comp->setDataObject("Publication",book1); - const Type& tpub2 = comp->getDataObject("Publication")->getType(); - fprintf(f,"Publication is of type %s\n",tpub2.getName()); - - comp->setDataObject("Publication",mag1); - const Type& tpub3 = comp->getDataObject("Publication")->getType(); - fprintf(f,"Publication is of type %s\n",tpub3.getName()); - - // should be able to address publication as book or magazine - - comp->setDataObject("Book",book1); - const Type& tpub4 = comp->getDataObject("Book")->getType(); - fprintf(f, "Book is of type %s\n",tpub4.getName()); - - comp->setDataObject("Magazine",mag1); - const Type& tpub5 = comp->getDataObject("Magazine")->getType(); - fprintf(f,"Magazine is of type %s\n",tpub5.getName()); - fprintf(f,"END TEST: TestSubsLoad ======================================\n"); - fclose(f); - return comparefiles("testsubsload.dat","testsubsload.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ERROR in TeseSubsLoad" << e << endl; - return 0; - } -} - -int sdotest::testSCA() -{ - try - { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("sca.xsd"); - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ERROR in TeseSCA" << e << endl; - return 0; - } -} - -int sdotest::testabstract() -{ - try - { - - FILE *f = fopen("testabstract.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open testabstract.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("companyabs.xsd"); - - //cout << "TYPES LOADED FROM COMPANYABS XSD" << endl; - - //TypeList tl = mdg->getTypes(); - //for (int i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - // so now we should be able to put book or a magazine into - // the publication under company... - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& book = mdg->getType("companyNS","BookType"); - const Type& mag = mdg->getType("companyNS","MagazineType"); - const Type& pub = mdg->getType("companyNS","PublicationType"); - - - // create a graph, then save it - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","Puflet Publishing"); - - // should be allowed... - DataObjectPtr book1 = mdg->create(book); - book1->setCString("author","Mr P B Writer"); - // inherted from publication - book1->setCString("title","Nowhere Man"); - - DataObjectPtr mag1 = mdg->create(mag); - mag1->setCString("editor","Mr B Picky"); - // inherited from publication - mag1->setCString("title","Bionicle Weekly"); - - try { - DataObjectPtr pub1 = mdg->create(pub); - pub1->setCString("title","Noddy In Toyland"); - } - catch (SDOUnsupportedOperationException e) - { - fprintf(f,"Normal unsupportedoperation for creation of abstract type\n"); - } - - - // publication should accept books and magazines... - - comp->setDataObject("Publication",book1); - const Type& tpub2 = comp->getDataObject("Publication")->getType(); - fprintf(f,"Publication is of type %s\n",tpub2.getName()); - - comp->setDataObject("Publication",mag1); - const Type& tpub3 = comp->getDataObject("Publication")->getType(); - fprintf(f,"Publication is of type %s\n",tpub3.getName()); - - // should be able to address publication as book or magazine - - comp->setDataObject("Book",book1); - const Type& tpub4 = comp->getDataObject("Book")->getType(); - fprintf(f,"Book is of type %s\n",tpub4.getName()); - - comp->setDataObject("Magazine",mag1); - const Type& tpub5 = comp->getDataObject("Magazine")->getType(); - fprintf(f,"Magazine is of type %s\n",tpub5.getName()); - - fclose(f); - return comparefiles("testabstract.dat","testabstract.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ERROR in TestAbstract" << e << endl; - return 0; - } -} - -int sdotest::testOpen() -{ - try - { - - FILE *f = fopen("testopen.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open testopen.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - - mdg->addType("companyNS","CompanyType"); - // employee will be an open type... - mdg->addType("companyNS","EmployeeType", /*seq*/false, - /*open*/true, - /*abs */ false, - /*data*/ false); - - mdg->addType("companyNS","DepartmentType"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - - mdg->addPropertyToType(tcomp,"name",tstring); - // not containment... - mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp, false,false,false); - mdg->addPropertyToType(tcomp,"departments",tdept, true); - mdg->addPropertyToType(tcomp,"cs",tcs); - - mdg->addPropertyToType(tdept,"name",tstring); - mdg->addPropertyToType(tdept,"location",tstring); - mdg->addPropertyToType(tdept,"number",tstring); - mdg->addPropertyToType(tdept,"employees",temp,true); - - mdg->addPropertyToType(temp, "name",tstring); - mdg->addPropertyToType(temp, "SN", tstring); - mdg->addPropertyToType(temp, "manager", tbool); - - - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","ACME"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","Advanced Technologies"); - dept->setCString("location","NY"); - dept->setCString("number","123"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - - emp1->setCString("name","Albert"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Boris"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Carl"); - emp3->setCString("SN","E0003"); - - // now we should be able to add extra properties to employees, - // and get them back again... - - try { - emp1->setNull("openstring"); - return 0; - } - catch (SDOUnsupportedOperationException e) - { - fprintf(f,"Normal exception for setting null on undefined prop\n"); - } - - emp1->setCString("openstring","Value Of Open String"); - emp1->setBoolean("openboolean",true); - - const char* c = emp1->getCString("openstring"); - - fprintf(f,"Open Type string value: %s\n",c); - - bool b = emp1->getBoolean("openboolean"); - - fprintf(f,"Open Type boolean value: %d\n", b); - - // unknown list type at present.. - DataObjectList& dl = emp1->getList("opentypelist"); - - unsigned int i = 45; - dl.append((short)i); // now the list must be primitive - - // we should now have instance properties - PropertyList pl = emp1->getType().getProperties(); - - for (i=0;igetInstanceProperties(); - - for (i=0;isetNull("openstring"); - - emp1->setCString("openstring","New Value Of Open String"); - - - // now unset them and see them disappear - what happens to the indices? - - emp1->unset("openstring"); - - PropertyList plk = emp1->getInstanceProperties(); - - for (i=0;iunset("openboolean"); - - dl.remove(0); // so is this list gone, or empty - I vote for still there. - - PropertyList pll = emp1->getInstanceProperties(); - for (i=0;iunset("opentypelist"); - - // now I vote for gone... - - PropertyList plm = emp1->getInstanceProperties(); - for (i=0;iaddType("companyNS","CompanyType"); - // employee will be an open type... - mdg->addType("companyNS","EmployeeType", /*seq*/false, - /*open*/true, - /*abs */ false, - /*data*/ false); - - mdg->addType("companyNS","DepartmentType"); - - mdg->addType("companyNS","OpenType"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - const Type& topen = mdg->getType("companyNS","OpenType"); - - - mdg->addPropertyToType(tcomp,"name",tstring); - // not containment... - mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp, false,false,false); - mdg->addPropertyToType(tcomp,"departments",tdept, true); - mdg->addPropertyToType(tcomp,"cs",tcs); - - mdg->addPropertyToType(tdept,"name",tstring); - mdg->addPropertyToType(tdept,"location",tstring); - mdg->addPropertyToType(tdept,"number",tstring); - mdg->addPropertyToType(tdept,"employees",temp,true); - - mdg->addPropertyToType(temp, "name",tstring); - mdg->addPropertyToType(temp, "SN", tstring); - mdg->addPropertyToType(temp, "manager", tbool); - - mdg->setAlias("companyNS","CompanyType","TheFirm"); - mdg->setAlias("companyNS","CompanyType","departments","TheDepartments"); - mdg->setAlias("companyNS","CompanyType","departments","MYDepartments"); - mdg->setAlias("companyNS","CompanyType","TheBigFirm"); - - mdg->addPropertyToType(topen,"name",tstring); - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","ACME"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - ChangeSummaryPtr cs = comp->getChangeSummary(); - - cs->beginLogging(); - - dept->setCString("name","Advanced Technologies"); - dept->setCString("location","NY"); - dept->setCString("number","123"); - - DataObjectList& emps = dept->getList("employees"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - - emps.append(emp1); - emps.append(emp2); - emps.append(emp3); - - emp1->setCString("name","Albert"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Boris"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Carl"); - emp3->setCString("SN","E0003"); - - // now we should be able to add extra properties to employees, - // and get them back again... - - - emp1->setCString("openstring","Value Of Open String"); - emp1->setBoolean("openboolean",true); - - const char* c = emp1->getCString("openstring"); - - //cout << "Open Type string value: " << c << endl; - - bool b = emp1->getBoolean("openboolean"); - - //cout << "Open Type boolean value: " << b << endl; - - // unknown list type at present.. - DataObjectList& dl = emp1->getList("openintlist"); - - int i = 45; - dl.append((short)i); // now the list must be primitive and short!! - - // unknown list type at present.. - DataObjectList& dl2 = emp1->getList("opendataobjectlist"); - - DataObjectPtr myopen = mdg->create("companyNS","OpenType"); - myopen->setCString("name","MyOpenName"); - dl2.append(myopen); // now the list must be of data objects - - - // now a single valued data object - should have an xsi:type - emp1->setDataObject("opendataobject", myopen); - - - cs->endLogging(); - - //dumpchangesummary(cs); - - XSDHelperPtr xdh = HelperProvider::getXSDHelper(mdg); - - xdh->generateFile(mdg->getTypes(), - "saveopen-output.xsd","companyNS"); - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company"); - xmh->save(doc,"saveopen-output.xml"); - - return comparefiles("saveopen-output.xml","saveopen-output.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ERROR in SaveOpen" << e << endl; - return 0; - } -} - -int sdotest::loadOpen() -{ - try - { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("saveopen-output.xsd"); - - - //cout << "TYPES LOADED FROM COMPANY XSD" << endl; - //int i; - //TypeList tl = mdg->getTypes(); - //for (i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - - - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("partial.xml", "companyNS"); - - - - // so, we now expect that the openboolean and openstring props will - // be of type boolean and String, and the openlist will be a list of integers. - // The dataobjectlist an dataobject will be of the correct OpenType - - // we need a test for data objects, and that we are writing out xsi:type - // correctly. - DataObjectPtr comp = myXMLDocument->getRootDataObject(); - DataObjectList& dl = comp->getList("departments"); - DataObjectPtr dept = dl[0]; - DataObjectList& dl2 = dept->getList("employees"); - DataObjectPtr emp = dl2[0]; - - if (strcmp(emp->getProperty("openboolean").getType().getName(), - "Boolean")) - { - if (!silent)cout << "OpenLoad failure - bool property not boolean" << endl; - return 0; - - } - if (emp->getBoolean("openboolean") != true) - { - if (!silent)cout << "OpenLoad failure - bool property not true" << endl; - return 0; - } - - if (strcmp(emp->getProperty("openstring").getType().getName(), - "String")) - { - if (!silent)cout << "OpenLoad failure - bytes property not String" << endl; - return 0; - - } - if (strcmp(emp->getCString("openstring"),"Value Of Open String")) - { - if (!silent)cout << "OpenLoad failure - string value is" << - emp->getCString("openstring") << endl; - return 0; - } - - - DataObjectList& dl3 = emp->getList("openintlist"); - - if (strcmp(emp->getProperty("openintlist").getType().getName(), - "Short")) - { - if (!silent)cout << "OpenLoad failure - IntegerList not Short " << - emp->getProperty("openintlist").getType().getName() << endl; - return 0; - } - - if (dl3.getInteger(0) != 45) - { - if (!silent)cout << "OpenLoad failure - Integer value is" << - dl.getInteger(0) << endl; - return 0; - } - - if (strcmp(emp->getProperty("opendataobjectlist").getType().getName(), - "OpenType")) - { - if (!silent)cout << "OpenLoad failure - OpenTypeList not OpenType" << endl; - return 0; - } - - DataObjectList& dl4 = emp->getList("opendataobjectlist"); - - if (strcmp(dl4[0]->getCString("name"),"MyOpenName")) - { - if (!silent)cout << "OpenLoad failure - list element name is " << - dl4[0]->getCString("name") << endl; - return 0; - } - - if (strcmp(emp->getProperty("opendataobject").getType().getName(), - "OpenType")) - { - if (!silent)cout << "OpenLoad failure - OpenType not OpenType" << endl; - return 0; - } - - DataObjectPtr dob2 = emp->getDataObject("opendataobject"); - - if (strcmp(dob2->getCString("name"),"MyOpenName")) - { - if (!silent)cout << "OpenLoad failure - open value name is " << - dob2->getCString("name") << endl; - return 0; - } - - - myXMLHelper->save(myXMLDocument->getRootDataObject(), - 0, "company", "loadload-output.xml"); - return comparefiles("loadload-output.xml","loadload-output.txt"); - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "LoadOpen FAILED" << e << endl; - return 0; - } - -} - -int sdotest::loadOpenNS() -{ - try - { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("openloadNS.xsd"); - xsh->defineFile("openloadNS2.xsd"); - - - //cout << "TYPES LOADED FROM COMPANY XSD" << endl; - //int i; - //TypeList tl = mdg->getTypes(); - //for (i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - - - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("openloadNS.xml", "companyNS"); - - - - // so, we now expect that the openboolean and openstring props will - // be of type boolean and Bytes, and the openlist will be a list of integers. - // The dataobjectlist an dataobject will be of the correct OpenType - - // we need a test for data objects, and that we are writing out xsi:type - // correctly. - DataObjectPtr comp = myXMLDocument->getRootDataObject(); - DataObjectList& dl = comp->getList("departments"); - DataObjectPtr dept = dl[0]; - DataObjectList& dl2 = dept->getList("employees"); - DataObjectPtr emp = dl2[0]; - - if (strcmp(emp->getProperty("openboolean").getType().getName(), - "Boolean")) - { - if (!silent)cout << "OpenLoadNS failure - bool property not boolean" << endl; - return 0; - - } - if (emp->getBoolean("openboolean") != true) - { - if (!silent)cout << "OpenLoadNS failure - bool property not true" << endl; - return 0; - } - - if (strcmp(emp->getProperty("openstring").getType().getName(), - "Bytes")) - { - if (!silent)cout << "OpenLoadNS failure - bytes property not bytes" << endl; - return 0; - - } - if (strcmp(emp->getCString("openstring"),"Value Of Open String")) - { - if (!silent)cout << "OpenLoadNS failure - string value is" << - emp->getCString("openstring") << endl; - return 0; - } - - - DataObjectList& dl3 = emp->getList("openintlist"); - - if (strcmp(emp->getProperty("openintlist").getType().getName(), - "Short")) - { - if (!silent)cout << "OpenLoadNS failure - IntegerList not Short " << - emp->getProperty("openintlist").getType().getName() << endl; - return 0; - } - - if (dl3.getInteger(0) != 45) - { - if (!silent)cout << "OpenLoadNS failure - Integer value is" << - dl.getInteger(0) << endl; - return 0; - } - - - - myXMLHelper->save(myXMLDocument->getRootDataObject(), - 0, "company", "openloadNSout.xml"); - - if (!comparefiles("openloadNSout.xml","openloadNSout.txt"))return 0; - - - // now try exactly the same, but with NS which doesnt exist - XMLDocumentPtr myXMLDocument2 = myXMLHelper->loadFile("openloadNS2.xml", "companyNS"); - - - - // so, we now expect that the openboolean and openstring props will - // be of type boolean and String, and the openlist will be a list of integers. - // The dataobjectlist an dataobject will be of the correct OpenType - - // we need a test for data objects, and that we are writing out xsi:type - // correctly. - DataObjectPtr comp2 = myXMLDocument2->getRootDataObject(); - DataObjectList& dld = comp2->getList("departments"); - DataObjectPtr dept2 = dld[0]; - DataObjectList& dl22 = dept2->getList("employees"); - DataObjectPtr emp2 = dl22[0]; - - if (strcmp(emp2->getProperty("openboolean").getType().getName(), - "String")) - { - if (!silent)cout << "OpenLoadNS2 failure - bool property not String" << endl; - return 0; - - } - if (emp2->getBoolean("openboolean") != true) - { - if (!silent)cout << "OpenLoadNS2 failure - bool property not true" << endl; - return 0; - } - - if (strcmp(emp2->getProperty("openstring").getType().getName(), - "String")) - { - if (!silent)cout << "OpenLoadNS2 failure - bytes property not String" << endl; - return 0; - - } - if (strcmp(emp2->getCString("openstring"),"Value Of Open String")) - { - if (!silent)cout << "OpenLoadNS failure - string value is" << - emp2->getCString("openstring") << endl; - return 0; - } - - - DataObjectList& dl32 = emp2->getList("openintlist"); - - if (strcmp(emp2->getProperty("openintlist").getType().getName(), - "OpenDataObject")) - { - if (!silent)cout << "OpenLoadNS2 failure - IntegerList not OpenDataObject " << - emp2->getProperty("openintlist").getType().getName() << endl; - return 0; - } - - if (atoi(dl32.getDataObject(0)->getSequence()->getCStringValue(0)) != 45) - { - if (!silent)cout << "OpenLoadNS2 failure - Integer value is" << - dl32.getInteger(0) << endl; - return 0; - } - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "LoadOpenNS FAILED" << e << endl; - return 0; - } - -} - -int sdotest::loadManyOpen() -{ - try - { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("many.xsd"); - - - //cout << "TYPES LOADED FROM COMPANY XSD" << endl; - //int i; - //TypeList tl = mdg->getTypes(); - //for (i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - - - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("many.xml", "companyNS"); - - - - // so, we now expect that the openboolean and openstring props will - // be of type boolean and Bytes, and the openlist will be a list of integers. - // The dataobjectlist an dataobject will be of the correct OpenType - - // we need a test for data objects, and that we are writing out xsi:type - // correctly. - DataObjectPtr comp = myXMLDocument->getRootDataObject(); - DataObjectList& dl = comp->getList("departments"); - DataObjectPtr dept = dl[0]; - DataObjectList& dl2 = dept->getList("employees"); - DataObjectPtr emp = dl2[0]; - - - DataObjectList& dl3 = emp->getList("openlist"); - - // change to match spec - now an open data object - // the list should contain a single data object with a sequence of three text elements - - if (strcmp(emp->getProperty("openlist").getType().getName(), - "OpenDataObject")) - { - if (!silent)cout << "OpenManyLoad failure - BytesList not OpenDataObject " << - emp->getProperty("openlist").getType().getName() << endl; - return 0; - } - - if (dl3.size() != 3) - { - if (!silent)cout << "OpenManyLoad failure - size is " << - dl3.size() << endl; - return 0; - } - - SequencePtr sq = dl3[0]->getSequence(); - if (strcmp(sq->getCStringValue(0),"Three member")) return 0; - - SequencePtr sq2 = dl3[1]->getSequence(); - if (strcmp(sq2->getCStringValue(0),"Open bytes")) return 0; - - SequencePtr sq3 = dl3[2]->getSequence(); - if (strcmp(sq3->getCStringValue(0),"List is complete")) return 0; - - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "LoadOpen FAILED" << e << endl; - return 0; - } - -} - -int sdotest::csload2() -{ - //cout << "TEST: CSLoad2 ===============================================" << endl; - try - { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("company.xsd"); - - //cout << "TYPES LOADED FROM COMPANY XSD" << endl; - - //TypeList tl = mdg->getTypes(); - //for (int i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("cssave2-output.xml", "companyNS"); - myXMLHelper->save(myXMLDocument->getRootDataObject(), - 0, "company", "csload2-output.xml"); - - if (!comparefiles("csload2-output.xml","csload2-output.txt")) return 0; - - XMLDocumentPtr myXMLDocument2 = myXMLHelper->loadFile("csload2-output.xml", "companyNS"); - myXMLHelper->save(myXMLDocument2->getRootDataObject(), - 0, "company", "csload3-output.xml"); - - return comparefiles("csload3-output.xml","csload3-output.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ERROR in CsLoad2" << e << endl; - return 0; - } -} - -int sdotest::bug1() -{ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - try { - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("bugs/1/company.xsd"); - - //TypeList tl = mdg->getTypes(); - //for (int i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("bugs/1/company.xml", - "http://www.mycompanyinc.com"); - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ERROR in Bug1" << e << endl; - return 0; - } - return 1; -} - -int sdotest::setnull() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("NullNS","NullMainType"); - mdg->addType("NullNS","NullSubType"); - - /* Now add the properties to the types...*/ - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tint = mdg->getType("commonj.sdo","Integer"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tmain = mdg->getType("NullNS","NullMainType"); - const Type& tsub = mdg->getType("NullNS","NullSubType"); - - - mdg->addPropertyToType(tmain,"name",tstring); - mdg->addPropertyToType(tmain,"subs",tsub, true); // many - mdg->addPropertyToType(tmain,"asub",tsub, false); // single - mdg->addPropertyToType(tmain,"bsub",tsub, false); // single - - mdg->addPropertyToType(tmain,"cs",tcs); // change summary - - mdg->addPropertyToType(tsub,"name",tstring); - mdg->addPropertyToType(tsub,"number",tint); - mdg->addPropertyToType(tsub,"bool",tbool); - - - // create a graph, then save it - - DataObjectPtr main1 = mdg->create((Type&)tmain); - main1->setCString("name","MainObject"); - - // asub is initially set - DataObjectPtr sub0 = main1->createDataObject("asub"); - // bsub is not set. - - DataObjectPtr sub1 = mdg->create((Type&)tsub); - DataObjectPtr sub2 = mdg->create((Type&)tsub); - DataObjectPtr sub3 = mdg->create((Type&)tsub); - - DataObjectList& dol = main1->getList("subs"); - - dol.append(sub1); - dol.append(sub2); - dol.append(sub3); - - // sub1 has all values set initially - - sub1->setCString("name","All Initially set"); - sub1->setInteger("number",100); - sub1->setBoolean("bool",false); - - // sub2 has no values set at all - - - // sub3 has all values set to null - sub3->setNull("name"); - sub3->setNull("number"); - sub3->setNull("bool"); - - - // report - - if (main1->isNull("asub")) return 0; - - if (!main1->isSet("asub")) return 0; - - if (main1->isNull("bsub")) return 0; - - if (main1->isSet("bsub")) return 0; - -// dol0 is set, not null - - if (dol[0]->isNull("name")) return 0; - - if (dol[0]->isNull("number")) return 0; - - if (dol[0]->isNull("bool")) return 0; - - if (!dol[0]->isSet("name")) return 0; - - if (!dol[0]->isSet("number")) return 0; - - if (!dol[0]->isSet("bool")) return 0; - -// dol1 is all unset , so no nulls - - if (dol[1]->isNull("name")) return 0; - - if (dol[1]->isNull("number")) return 0; - - if (dol[1]->isNull("bool")) return 0; - - if (dol[1]->isSet("name")) return 0; - - if (dol[1]->isSet("number")) return 0; - - if (dol[1]->isSet("bool")) return 0; - -// dol2 is all nulls, so all set - - if (!dol[2]->isNull("name")) return 0; - - if (!dol[2]->isNull("number")) return 0; - - if (!dol[2]->isNull("bool")) return 0; - - if (!dol[2]->isSet("name")) return 0; - - if (!dol[2]->isSet("number")) return 0; - - if (!dol[2]->isSet("bool")) return 0; - - ChangeSummaryPtr cs = main1->getChangeSummary(); - - cs->beginLogging(); - - main1->setNull("asub"); - main1->setNull("bsub"); - - dol[0]->setNull("name"); - dol[0]->setNull("number"); - dol[0]->setNull("bool"); - - dol[1]->setNull("bool"); - - dol[2]->setCString("name","NewName"); - dol[2]->setInteger("number",100); - dol[2]->setBoolean("bool",true); - - - cs->endLogging(); - - // what would we expect from the change summary? - - //cout << "==============Expected in Change Summary=================" << endl; - //cout << "change to main1 - object asub set to null, oldvalue asub (set)" << endl; - //cout << "change to main1 - object bsub set to null, oldvalue null (unset)" << endl; - //cout << "change to sub1 - name asub set to null, oldvalue \"All Initially Set\" (set)" << endl; - //cout << "change to sub1 - number asub set to null, oldvalue 100 (set)" << endl; - //cout << "change to sub1 - bool asub set to null, oldvalue false (set)" << endl; - //cout << "change to sub2 - bool asub set to null, oldvalue false (unset)" << endl; - //cout << "change to sub3 - name asub set to \"NewName\", oldvalue null, set" << endl; - //cout << "change to sub3 - number asub set to 100, oldvalue null, set" << endl; - //cout << "change to sub3 - bool asub set to true, oldvalue null, set" << endl; - //cout << "==============End Expected in Change Summary=============" << endl; - - FILE* f = fopen("setnull.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open setnull.dat" << endl; - return 0; - } - - dumpchangesummary(f, cs); - - fclose(f); - - if (!comparefiles("setnull.dat","setnull.txt")) return 0; - - // report - - if (!main1->isNull("asub")) return 0; - - if (!main1->isSet("asub")) return 0; - - if (!main1->isNull("bsub")) return 0; - - if (!main1->isSet("bsub")) return 0; - -// dol0 is set to null - - if (!dol[0]->isNull("name")) return 0; - - if (!dol[0]->isNull("number")) return 0; - - if (!dol[0]->isNull("bool")) return 0; - - if (!dol[0]->isSet("name")) return 0; - - if (!dol[0]->isSet("number")) return 0; - - if (!dol[0]->isSet("bool")) return 0; - -// dol1 is all unset except bool which is null - - if (dol[1]->isNull("name")) return 0; - - if (dol[1]->isNull("number")) return 0; - - if (!dol[1]->isNull("bool")) return 0; - - if (dol[1]->isSet("name")) return 0; - - if (dol[1]->isSet("number")) return 0; - - if (!dol[1]->isSet("bool")) return 0; - -// dol2 is all set non-null, so all set - - if (dol[2]->isNull("name")) return 0; - - if (dol[2]->isNull("number")) return 0; - - if (dol[2]->isNull("bool")) return 0; - - if (!dol[2]->isSet("name")) return 0; - - if (!dol[2]->isSet("number")) return 0; - - if (!dol[2]->isSet("bool")) return 0; - - - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in setnull" << e << endl; - return 0; - } -} - - -int sdotest::testsubs() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("companyNS","MainType"); - - mdg->addType("companyNS","SubType"); - mdg->addType("companyNS","SuperType"); - mdg->addType("companyNS","SubstituteType"); - mdg->addType("companyNS","UnrelatedType"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tmain = mdg->getType("companyNS","MainType"); - const Type& sub = mdg->getType("companyNS","SubType"); - const Type& super = mdg->getType("companyNS","SuperType"); - const Type& subst = mdg->getType("companyNS","SubstituteType"); - const Type& unrel = mdg->getType("companyNS","UnrelatedType"); - - - mdg->addPropertyToType(tmain,"name",tstring); - mdg->addPropertyToType(tmain,"sub",super, false); - mdg->addPropertyToType(tmain,"subs",super, true); - - - mdg->setPropertySubstitute(tmain, "sub","wilbur", subst); - mdg->setPropertySubstitute(tmain, "subs","wilburs", subst); - - mdg->setBaseType(sub,super); - - //now sub and subs should accept all the three types - - DataObjectPtr main = mdg->create((Type&)tmain); - main->setCString("name","SubstituteTest"); - - DataObjectList& dol = main->getList("subs"); - - DataObjectPtr sub1 = mdg->create(sub); - DataObjectPtr super1 = mdg->create(super); - DataObjectPtr subst1 = mdg->create(subst); - DataObjectPtr unrel1 = mdg->create(unrel); - - dol.append(sub1); - dol.append(super1); - dol.append(subst1); - try - { - dol.append(unrel1); - return 0; - } - catch (SDOInvalidConversionException e) - { - //cout << "Normal failure to append wrong type" << endl; - } - - dol.remove(0); - dol.remove(0); - dol.remove(0); - - DataObjectList& dol2 = main->getList("wilburs"); - - dol2.append(sub1); - dol2.append(super1); - dol2.append(subst1); - try - { - dol2.append(unrel1); - return 0; - } - catch (SDOInvalidConversionException e) - { - //cout << "Normal failure to append wrong type" << endl; - } - - main->setDataObject("sub",sub1); - main->setDataObject("sub",super1); - main->setDataObject("sub",subst1); - - main->setDataObject("wilbur",sub1); - main->setDataObject("wilbur",super1); - main->setDataObject("wilbur",subst1); - - try - { - main->setDataObject("sub", unrel1); - return 0; - } - catch (SDOInvalidConversionException e) - { - //cout << "Normal failure to set wrong type" << endl; - } - return 1; - } - - catch (SDORuntimeException e) - { - if (!silent)cout << "Substitute test failed" << endl << e << endl; - return 0; - } -} - - -int sdotest::merle1() -{ - - try { - - // Dynamic setup of the metadata - - FILE *f = fopen("merle1.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open merle1.dat" << endl; - return 0; - } - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("axis.xsd"); - - // or dynamically create, but that would get attributes for the strings, not elements - //mdg->addType("axis","ItemSearch",true); // sequenced - //mdg->addType("axis","ItemSearchRequest",true); // sequenced - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tsearch = mdg->getType("axis","ItemSearch"); - const Type& treq = mdg->getType("axis","ItemSearchRequest"); - - //mdg->addPropertyToType(tsearch,"SubscriptionId",tstring); - //mdg->addPropertyToType(tsearch,"AssociateTag",tstring); - //mdg->addPropertyToType(tsearch,"XMLEscaping",tstring); - //mdg->addPropertyToType(tsearch,"Validate",tstring); - //mdg->addPropertyToType(tsearch,"Shared",treq, false, false, true); - //mdg->addPropertyToType(tsearch,"Request",treq, true, false, true); - - //mdg->addPropertyToType(treq,"Keywords",tstring); - //mdg->addPropertyToType(treq,"SearchIndex",tstring); - - // dynamic creation of the data - - DataObjectPtr search = mdg->create((Type&)tsearch); - - search->setCString("SubscriptionId","I am the subscription ID string"); - search->setCString("AssociateTag","I am the associate Tag string"); - search->setCString("XMLEscaping","I am the XML escaping string"); - search->setCString("Validate","I am the Validate string"); - - DataObjectPtr shared = search->createDataObject("Shared"); - shared->setCString("Keywords","SharedKeywordsString"); - shared->setCString("SearchIndex","SearchIndexString"); - - DataObjectList& requests = search->getList("Request"); - DataObjectPtr request1 = mdg->create(treq); - requests.append(request1); - request1->setCString("Keywords","RequestKeywords"); - request1->setCString("SearchIndex","RequestSearchIndex"); - - // Read the data and put it into XML: - - PropertyList properties = search->getInstanceProperties(); - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - - for (unsigned int i=0;i%s\n",prop.getName(), search->getCString(prop), - prop.getName()); - break; - - case Type::DataObjectType: - if (prop.isMany()) - { - // many valued property, such as Requests , so get the list - DataObjectList& rq = search->getList(prop); - for (unsigned int j=0;jcreateDocument(dob, - "axis", prop.getName()); - doc->setXMLDeclaration(false); - char* dobXML = myXMLHelper->save(doc); - fprintf(f,"DataObject \"%s\" as XML:\n",prop.getName()); - fprintf(f,"%s\n", dobXML); - } // if dob - } // for - } // if many - else - { - DataObjectPtr dob = search->getDataObject(prop); - if (dob != 0) - { - XMLDocumentPtr doc = myXMLHelper->createDocument(dob, - "axis", prop.getName()); - doc->setXMLDeclaration(false); - char* dobXML = myXMLHelper->save(doc); - fprintf(f,"DataObject \"%s\" as XML:\n",prop.getName()); - fprintf(f, "%s\n", dobXML); - } // if - } // else - break; - - default: - break; - - } // switch - } // for - fclose(f); - return comparefiles("merle1.dat","merle1.txt"); - } // try - catch (SDORuntimeException e) - { - if (!silent)cout << "Merle 1 failed" << endl << e << endl; - return 0; - } -} - - -int sdotest::graham3() -{ - try { - - // Dynamic setup of the metadata - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("graham3.xsd"); - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Graham1 failed " << e << endl; - return 0; - } -} - -int sdotest::graham1() -{ - try { - - // Dynamic setup of the metadata - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("graham1.xsd"); - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Graham1 failed " << e << endl; - return 0; - } -} -int sdotest::graham2() -{ - try { - - // Dynamic setup of the metadata - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("graham2.xsd"); - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Graham2 failed " << e << endl; - return 0; - } -} - - -int sdotest::b46613() -{ - try { - - // Dynamic setup of the metadata - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->create("rubbish","MyObject"); - - return 0; - - } - catch (SDOTypeNotFoundException e) - { - //cout << "b46613 gave the correct exception" << endl; - return 1; - } -} - -int sdotest::doctest() -{ - try { - - FILE *f = fopen("doctest.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open doctest.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("doctest.xsd"); - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("doctest.xml", - "companyNS"); - fprintf(f,"RootURI=%s\n",myXMLDocument->getRootElementURI()); - fprintf(f,"RootName=%s\n",myXMLDocument->getRootElementName()); - fclose(f); - return comparefiles("doctest.dat","doctest.txt"); - } - catch (SDOTypeNotFoundException e) - { - if (!silent)cout << "doctest failed" << endl; - return 0; - } - -} - - -int sdotest::b46634() -{ - try { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("company_with_nillable_SN.xsd"); - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("company_with_nillable_SN.xml", - "companyNS"); - - DataObjectPtr dob = myXMLDocument->getRootDataObject(); - DataObjectList& dol = dob->getList("departments"); - DataObjectPtr dept = dol[0]; - DataObjectList& dol2 = dept->getList("employees"); - DataObjectPtr emp = dol2[0]; - - if (!emp->isSet("SN")) - { - if (!silent)cout << "B46634 WRONG - isSet should be true" << endl; - return 0; - } - if (!emp->isNull("SN")) - { - if (!silent)cout << "B46634 WRONG - isNull should be true" << endl; - return 0; - } - - // now write out the nill value and check its still nil - myXMLHelper->save(myXMLDocument->getRootDataObject(), - 0, "company", "b46634_out.xml"); - return comparefiles("b46634_out.xml","b46634_out.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "b46634 failed" << endl; - return 0; - } - -} - -int sdotest::testErrors() -{ - try { - - unsigned int i,j; - - FILE *f = fopen("testerrors.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open testerrors.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("error1.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - fprintf(f,"XSD reported some errors:\n"); - for (j=0;jgetErrorMessage(j); - if (m != 0) fprintf(f,"%s\n", m); - } - } - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("error1.xml", - "companyNS"); - - if ((i = myXMLHelper->getErrorCount()) > 0) - { - fprintf(f,"XML reported some errors:\n"); - for (j=0;jgetErrorMessage(j); - if (m != 0) fprintf(f,"%s\n",m); - } - } - - fclose(f); - return comparefiles("testerrors.dat","testerrors.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "testErrors failed" << endl << e << endl; - return 0; - } - -} - -int sdotest::b46734() -{ - try { - - unsigned int i,j; - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("http://schemas.xmlsoap.org/wsdl/"); - if ((i = xsh->getErrorCount()) > 0) - { - if (true) - { - cout << "WSDL XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - xsh->defineFile("http://schemas.xmlsoap.org/wsdl/soap/"); - if ((i = xsh->getErrorCount()) > 0) - { - if (true) - { - cout << "WSDL SOAP XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - xsh->defineFile("http://schemas.xmlsoap.org/wsdl/http/"); - if ((i = xsh->getErrorCount()) > 0) - { - if (true) - { - cout << "WSDL HTTP XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("StockQuoteService.wsdl" - ); - - if ((i = myXMLHelper->getErrorCount()) > 0) - { - if (true) - { - cout << "XML reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0)cout << m; - cout << endl; - } - } - return 0; - } - return 1; - - } - catch (SDORuntimeException e) - { - if (true)cout << "b46734 failed" << endl << e << endl; - return 0; - } - -} - -int sdotest::b46693() -{ - try { - - unsigned int i,j; - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("b46693.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "b46693 XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0)cout << m; - cout << endl; - } - } - return 0; - } - - // XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - // XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("b46693.xsd" - // ); - - // if ((i = myXMLHelper->getErrorCount()) > 0) - // { - // cout << "b46693 reported some errors:" << endl; - // for (j=0;jgetErrorMessage(j); - // if (m != 0)cout << m; - // cout << endl; - // } - // } - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "b46693 failed" << endl << e << endl; - return 0; - } - -} - -int sdotest::clonetest() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("companyNS","CompanyType"); - mdg->addType("companyNS","DepartmentType"); - mdg->addType("companyNS","EmployeeType"); - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - mdg->addPropertyToType(tcomp,"name",tstring); - mdg->addPropertyToType(tcomp,"departments",tdept,true,false,true); - mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp,false,false,false); - mdg->addPropertyToType(tcomp,"CEO",temp,false,false,true); - - mdg->addPropertyToType(tdept,"employees",temp,true,false,true); - mdg->addPropertyToType(tdept,"name",tstring,false,false,true); - mdg->addPropertyToType(tdept,"location",tstring,false,false,true); - mdg->addPropertyToType(tdept,"number",tstring,false,false,true); - - mdg->addPropertyToType(temp,"name",tstring,false,false,true); - mdg->addPropertyToType(temp,"SN",tstring,false,false,true); - mdg->addPropertyToType(temp,"manager",tbool,false,false,true); - - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","The Company"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","The Department"); - dept->setCString("location","Botley"); - dept->setCString("number","123"); - - - // now clone the data factory, and add more types - - DataFactoryPtr df2 = mdg->clone(); - - df2->addType("otherNS","DataSet"); - - df2->addPropertyToType("companyNS","DepartmentType","dataset", - "otherNS","DataSet", false, false, true); - - const Type& tstring2 = df2->getType("commonj.sdo","String"); - const Type& tbool2 = df2->getType("commonj.sdo","Boolean"); - const Type& tcs2 = df2->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp2 = df2->getType("companyNS","CompanyType"); - const Type& tdept2 = df2->getType("companyNS","DepartmentType"); - const Type& temp2 = df2->getType("companyNS","EmployeeType"); - - DataObjectPtr comp2 = df2->create((Type&)tcomp2); - comp->setCString("name","The Company"); - - DataObjectPtr dept2 = df2->create((Type&)tdept2); - - DataObjectList& dol2 = comp2->getList("departments"); - dol2.append(dept2); - - dept2->setCString("name","The Other Department"); - dept2->setCString("location","Not Botley"); - dept2->setCString("number","321"); - - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "clone failed " << e << endl; - return 0; - } - - -} - -int sdotest::testUtil() -{ - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - - mdg->addType("companyNS","CompanyType"); - // employee will be an open type... - mdg->addType("companyNS","EmployeeType", /*seq*/false, - /*open*/true, - /*abs */ false, - /*data*/ false); - - mdg->addType("companyNS","DepartmentType"); - - mdg->addType("companyNS","OpenType"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - const Type& topen = mdg->getType("companyNS","OpenType"); - - - mdg->addPropertyToType(tcomp,"name",tstring); - // not containment... - mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp, false,false,false); - mdg->addPropertyToType(tcomp,"departments",tdept, true); - mdg->addPropertyToType(tcomp,"cs",tcs); - - mdg->addPropertyToType(tdept,"name",tstring); - mdg->addPropertyToType(tdept,"location",tstring); - mdg->addPropertyToType(tdept,"number",tstring); - mdg->addPropertyToType(tdept,"employees",temp,true); - - mdg->addPropertyToType(temp, "name",tstring); - mdg->addPropertyToType(temp, "SN", tstring); - mdg->addPropertyToType(temp, "manager", tbool); - - mdg->addPropertyToType(topen,"name",tstring); - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","ACME"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","Advanced Technologies"); - dept->setCString("location","NY"); - dept->setCString("number","123"); - - DataObjectList& emps = dept->getList("employees"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - - emps.append(emp1); - emps.append(emp2); - emps.append(emp3); - - emp1->setCString("name","Albert"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Boris"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Carl"); - emp3->setCString("SN","E0003"); - - emp1->setCString("openstring","Value Of Open String"); - emp1->setBoolean("openboolean",true); - - const char* c = emp1->getCString("openstring"); - - bool b = emp1->getBoolean("openboolean"); - - // unknown list type at present.. - DataObjectList& dl = emp1->getList("openintlist"); - - int i = 45; - dl.append((short)i); // now the list must be primitive and short!! - - // unknown list type at present.. - DataObjectList& dl2 = emp1->getList("opendataobjectlist"); - - DataObjectPtr myopen = mdg->create("companyNS","OpenType"); - myopen->setCString("name","MyOpenName"); - dl2.append(myopen); // now the list must be of data objects - - emp1->setDataObject("opendataobject", myopen); - - filebuf fb; - fb.open ("testutils.dat",ios::out); - ostream os(&fb); - SDOUtils::printDataObject(os, comp); - fb.close(); - return comparefiles("testutils.dat","testutils.txt"); - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ERROR in UTILS test" << e << endl; - return 0; - } - -} - -int sdotest::printset(FILE *f, ChangeSummaryPtr cs) -{ - ChangedDataObjectList& cdl = cs->getChangedDataObjects(); - - // here there should be a creation of Ed, and a change to dept, which has a - // bool previously unset, and a int list previuously unset and an employees list - // previously unset - - for (unsigned int i=0;i< cdl.size();i++) - { - if (cs->isModified(cdl[i])) - { - - fprintf(f,"A modified of type %s#%s\n",cdl[i]->getType().getURI() - ,cdl[i]->getType().getName()); - - SettingList& sl = cs->getOldValues(cdl[i]); - if (sl.size() == 0) - { - fprintf(f,"No Settings found\n"); - } - else - { - for (int j=0;j< sl.size(); j++) - { - fprintf(f,"Property %s",sl[j].getProperty().getName()); - // this could be a many-valued property, and could be one which is - // a data object or a data type... - if (sl[j].getProperty().isMany()) - { - fprintf(f,"[%s]",sl[j].getIndex()); - } - if (!sl[j].isSet()) - { - fprintf(f," was unset before the change\n"); - } - else - { - fprintf(f," was set before the change !!\n"); - } - } - } - } - } - return 1; -} - - -int sdotest::b46633() -{ - try { - - FILE *f = fopen("b46633.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open b46633.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addPropertyToType("myspace","Root","cs", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Department"); - mdg->addType("myspace","Manager"); - mdg->addType("myspace","Employee"); - - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","Root","company", - "myspace","Company", false, false, true); - - mdg->addPropertyToType("myspace","Company","departments", - "myspace","Department", true, false, true); - - - mdg->addPropertyToType("myspace","Department","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Department","ints", - "commonj.sdo","Integer", true, false, false); - - - mdg->addPropertyToType("myspace","Department","bool", - "commonj.sdo","Boolean", false, false, false); - - mdg->addPropertyToType("myspace","Department","manager", - "myspace","Manager", false, false, true); - - mdg->addPropertyToType("myspace","Department","employees", - "myspace","Employee", true, false, true); - - mdg->addPropertyToType("myspace","Manager","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Employee","name", - "commonj.sdo","String", false, false, false); - - const Type& tcc = mdg->getType("myspace","Root"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - - ChangeSummaryPtr cs = dor->getChangeSummary(); - - DataObjectPtr com = dor->createDataObject("company"); - com->setCString("name","IBM"); - - DataObjectPtr dept = com->createDataObject("departments"); - dept->setCString("name","JTC"); - - // employees initally unset - - cs->beginLogging(); - - DataObjectPtr emp = dept->createDataObject("employees"); - emp->setCString("name","Ed"); - - - - DataObjectList& dl = dept->getList("ints"); - dl.append((long)400); - - dept->setBoolean("bool", true); - - printset(f,cs); - - cs->endLogging(); - - // unset them all , restart logging, and get the same results - - dept->unset("bool"); - dept->unset("ints"); - dept->unset("employees"); - - cs->beginLogging(); - - DataObjectPtr emp2 = dept->createDataObject("employees"); - emp2->setCString("name","Ed2"); - - dl.append((long)600); - - dept->setBoolean("bool", true); - - printset(f, cs); - - cs->endLogging(); - - fclose(f); - - return comparefiles("b46633.dat","b46633.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "b46633 failed " << e << endl; - return 0; - } - -} - - - -int sdotest::testLoad() -{ - try - { - unsigned int i,j; - DataFactoryPtr mdg = DataFactory::getDataFactory(); - FILE* f = fopen("company_with_nillable_SN.xsd","r+"); - char* buffer = new char[4000]; - j = 0; - while ((i = fgetc(f)) != EOF) - { - buffer[j++] = (char)i; - } - buffer[j] = 0; - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->define(buffer); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) { - cout << "XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - FILE* f2 = fopen("company_with_nillable_SN.xml","r+"); - j = 0; - while ((i = fgetc(f2)) != EOF) - { - buffer[j++] = (char)i; - } - buffer[j] = 0; - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->load(buffer); - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in testDAS " << e << endl; - return 0; - } -} - -int sdotest::includetest() -{ - try - { - unsigned int i,j; - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("include.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "INCLUDE XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - xsh->defineFile("../test/test/includeother.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "INCLUDE XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in include test" << e << endl; - return 0; - } -} - -int sdotest::detachtest() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Department"); - mdg->addType("myspace","Manager"); - mdg->addType("myspace","Employee"); - - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","Root","company", - "myspace","Company", false, false, true); - - mdg->addPropertyToType("myspace","Company","departments", - "myspace","Department", true, false, true); - - - mdg->addPropertyToType("myspace","Department","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","Department","manager", - "myspace","Manager", false, false, true); - - mdg->addPropertyToType("myspace","Department","employees", - "myspace","Employee", true, false, true); - - mdg->addPropertyToType("myspace","Manager","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Employee","name", - "commonj.sdo","String", false, false, false); - - const Type& tcc = mdg->getType("myspace","Root"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectPtr com = dor->createDataObject("company"); - com->setCString("name","IBM"); - - DataObjectPtr dept = com->createDataObject("departments"); - - dept->setCString("name","JTC"); - - - DataObjectPtr emp = dept->createDataObject("employees"); - emp->setCString("name","Ed"); - - DataObjectPtr emp2 = dept->createDataObject("employees"); - emp2->setCString("name","Tom"); - - DataObjectList& dol = dept->getList("employees"); - - DataObjectPtr e = dol[0]; - e->detach(); - - DataObjectPtr cont = emp->getContainer(); - - if (cont != 0) - { - if (!silent)cout << "EMP STILL ATTACHED - problem" << endl; - return 0; - } - - DataObjectPtr cont2 = dol[0]->getContainer(); - - if (cont2 == 0) - { - if (!silent)cout << "SECOND DETACHED - problem" << endl; - return 0; - } - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "detach failed " << e << endl; - return 0; - } - -} - - -int sdotest::leak() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - - - mdg->addPropertyToType("myspace","Root","ints", - "commonj.sdo","Integer", true, false, false); - - - const Type& tcc = mdg->getType("myspace","Root"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - - - if (dor->isSet("ints")) return 0; - - DataObjectList& dl = dor->getList("ints"); - - if (dor->isSet("ints")) return 0; - - dl.append((long)400); - - if (!dor->isSet("ints")) return 0; - - dl.remove(0); - - if (dor->isSet("ints")) return 0; - - dl.append((long)400); - - if (!dor->isSet("ints")) return 0; - - dor->unset("ints"); - - if (dor->isSet("ints")) return 0; - - dl.append((long)600); - - if (!dor->isSet("ints")) return 0; - - return 1; - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "leak failed " << e << endl; - return 0; - } - -} - -int sdotest::twolists() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - - mdg->addPropertyToType("myspace","Root","ints", - "commonj.sdo","Integer", true, false, false); - - mdg->addPropertyToType("myspace","Root","ints2", - "commonj.sdo","Integer", true, false, false); - - - const Type& tcc = mdg->getType("myspace","Root"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectList& dl2 = dor->getList("ints2"); - dl2.append((long)400); - - - DataObjectList& dl = dor->getList("ints"); - dl.append((long)400); - return 1; - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "twolists failed " << e << endl; - return 0; - } - -} - - -int sdotest::graham4() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addType("myspace","ListItem"); - - - mdg->addPropertyToType("myspace","ListItem","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","Root","ints", - "commonj.sdo","Integer", true, false, false); - - mdg->addPropertyToType("myspace","Root","items", - "myspace","ListItem", true, false, true); - - - const Type& tcc = mdg->getType("myspace","Root"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - - - // first try with no elements in lists - - try { - DataObjectPtr pitem = dor->getDataObject("items[name=\"hello\"]"); - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - //cout << "Normal exception in Graham4" << endl; - } - - try { - int inty = dor->getInteger("ints[1]"); - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - //cout << "Normal exception in Graham4" << endl; - } - - // now populate them - - DataObjectPtr myitem = dor->createDataObject("items"); - myitem->setCString("name","not hello"); - - try { - DataObjectPtr pitem2 = dor->getDataObject("items[name=\"hello\"]"); - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - //cout << "Normal exception in Graham4" << endl; - } - - DataObjectList& dl = dor->getList("ints"); - dl.append((long)100); - - try { - int inty2 = dor->getInteger("ints[2]"); - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - //cout << "Normal exception in Graham4" << endl; - } - - try - { - DataObjectPtr pitem2 = dor->getDataObject("items[name=\"not hello\"]"); - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ABNORMAL exception in Graham4" << endl; - return 0; - } - - try { - int inty2 = dor->getInteger("ints[1]"); - //cout << "Integer is " << inty2 << endl; - return 1; - } - catch (SDOIndexOutOfRangeException e) - { - - if (!silent)cout << "ABNORMAL exception in Graham4" << endl; - return 0; - } - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "twolists failed " << e << endl; - return 0; - } - -} - - -int sdotest::graham5() -{ - try - { - unsigned int i,j; - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("Order.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "INCLUDE XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - return 1; - } - catch (SDORuntimeException r) - { - if (!silent)cout << "Graham5 failed " << r << endl; - return 0; - } -} - -int sdotest::graham6() -{ - try - { - unsigned int i,j; - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("g/Order.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "INCLUDE XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->loadFile("g/order.xml", "orderNS"); - - char* str = xmh->save(doc); - FILE* f = fopen("g/string-output.xml","w+"); - if (f != 0) - { - fputs(str,f); - fclose(f); - } - - xmh->save(doc,"g/graham6-output.xml"); - - // now get the root and try that - DataObjectPtr dob = doc->getRootDataObject(); - char* str2 = xmh->save(dob,"orderNS","order"); - FILE* f2 = fopen("g/string-output-2.xml","w+"); - if (f2 != 0) - { - fputs(str2,f2); - fclose(f2); - } - - xmh->save(dob,"orderNS","order", "g/graham6-output-2.xml"); - - if (!comparefiles("g/string-output.xml","g/string-output.txt"))return 0; - if (!comparefiles("g/graham6-output.xml","g/graham6-output.txt")) return 0; - if (!comparefiles("g/string-output-2.xml","g/string-output-2.txt")) return 0; - return 1; - - } - catch (SDORuntimeException r) - { - if (!silent)cout << "Graham6 failed " << r << endl; - return 0; - } -} - -int sdotest::b47137() -{ - - try - { - FILE *f = fopen("b47137.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open b47137.dat" << endl; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("b47137.xsd"); - - DataObjectPtr dob = mdg->create("","guid"); - - const Type& t = dob->getType(); - - PropertyList pl = t.getProperties(); - - for (unsigned int i=0;isetCString("value","Hello"); - dob->setBoolean("isPermaLink",true); - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - xmh->save(dob,"","fluid","b47137_out.xml"); - - // now try to read back the file .. - - XMLDocumentPtr doc = xmh->loadFile("b47137_out.xml", ""); - - DataObjectPtr dob2 = doc->getRootDataObject(); - - const Type& t2 = dob2->getType(); - - PropertyList pl2 = t2.getProperties(); - - for (unsigned int j=0;jgetCString(pl2[j])); - } - - fclose(f); - return comparefiles("b47137.dat","b47137.txt"); - } - catch (SDORuntimeException e) - { - if (!silent)cout << "B47137 failed " << e << endl; - return 0; - } -} - -int sdotest::b47137b() -{ - unsigned int i,j; - try - { - - FILE *f = fopen("b47137b.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open b47137b.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("b47137b.xsd"); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "INCLUDE XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - TypeList tl = mdg->getTypes(); - for (unsigned int k=0;kcreate("companyNS","CompanyType"); - - const Type& t = dob->getType(); - - PropertyList pl = t.getProperties(); - - for (unsigned int i=0;icreateDataObject("guid"); - - dobguid->setCString("value","Wilbur"); - dobguid->setBoolean("isPermaLink",true); - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - xmh->save(dob,"","company","b47137b_out.xml"); - - // now try to read back the file .. - - XMLDocumentPtr doc = xmh->loadFile("b47137b_out.xml", ""); - - DataObjectPtr dob2 = doc->getRootDataObject(); - - const Type& t2 = dob2->getType(); - - PropertyList pl2 = t2.getProperties(); - - for (unsigned int j=0;jgetDataObject("guid"); - if (dobguid2 != 0) - { - fprintf(f,"guid Value:%s\n",dobguid2->getCString("value")); - fprintf(f,"guid isPermaLink:",dobguid2->getCString("isPermaLink")); - } - else - { - fprintf(f,"GUID is empty\n"); - } - } - } - fclose(f); - return comparefiles("b47137b.dat","b47137b.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "B47137b failed " << e << endl; - return 0; - } -} - -int sdotest::b47293() -{ - unsigned int i,j,k; - try - { - FILE *f = fopen("b47293.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open b47293.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("47293Catalog.xsd"); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "47293 XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - TypeList tl = mdg->getTypes(); - for ( k=0;kgenerateFile(tl,"47293Catalog-out.xsd","catalogNS",0); - - DataFactoryPtr mdg2 = DataFactory::getDataFactory(); - - XSDHelperPtr xsh2 = HelperProvider::getXSDHelper(mdg2); - - xsh2->defineFile("47293Catalog-out.xsd"); - - if ((i = xsh2->getErrorCount()) > 0) - { - if (!silent) - { - cout << "47293-out XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - TypeList tl2 = mdg2->getTypes(); - for (k=0;kaddType("myspace","Root"); - mdg->addType("myspace","ListItem"); - - mdg->addPropertyToType("myspace","Root","ints", - "commonj.sdo","Integer", true, false, false); - - mdg->addPropertyToType("myspace","Root","items", - "myspace","ListItem", true, false, true); - - - const Type& tcc = mdg->getType("myspace","Root"); - const Type& tcl = mdg->getType("myspace","ListItem"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectList& dol1 = dor->getList("ints"); - - DataObjectList& dol2 = dor->getList("items"); - - - dol1.append((long)34); - dol1.append((long)56); - - DataObjectPtr li1 = mdg->create(tcl); - DataObjectPtr li2 = mdg->create(tcl); - - dol2.append(li1); - dol2.append(li2); - - dor->unset("ints[1]"); // should work - dor->unset("items.0"); // should work - - try { - - dor->unset("ints[2]"); // should not work - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - //cout << "Normal index oor in 47802" << endl; - } - - try { - dor->unset("items.1"); // should not work - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - // cout << "Normal index oor in 47802" << endl; - } - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Problem in b47802" << e << endl; - return 0; - } -} - - -int sdotest::b47663() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - DataFactoryPtr mdg2 = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addType("myspace","ListItem"); - mdg->addType("myspace","Item"); - - mdg->addPropertyToType("myspace","Root","itemref", - "myspace","Item", false, false, false); - - mdg->addPropertyToType("myspace","Root","itemcont", - "myspace","Item", false, false, true); - - mdg->addPropertyToType("myspace","Root","items", - "myspace","ListItem", true, false, true); - - mdg2->addType("myspace","Root"); - mdg2->addType("myspace","ListItem"); - mdg2->addType("myspace","Item"); - - mdg2->addPropertyToType("myspace","Root","itemref", - "myspace","Item", false, false, false); - - mdg2->addPropertyToType("myspace","Root","itemcont", - "myspace","Item", false, false, true); - - mdg2->addPropertyToType("myspace","Root","items", - "myspace","ListItem", true, false, true); - - - - const Type& tcc = mdg->getType("myspace","Root"); - const Type& tcl = mdg->getType("myspace","ListItem"); - const Type& tci = mdg->getType("myspace","Item"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - DataObjectPtr it1 = mdg->create((Type&)tci); - DataObjectList& dol1 = dor->getList("items"); - DataObjectPtr li11 = mdg->create(tcl); - DataObjectPtr li12 = mdg->create(tcl); - - - const Type& tcc2 = mdg2->getType("myspace","Root"); - const Type& tcl2 = mdg2->getType("myspace","ListItem"); - const Type& tci2 = mdg2->getType("myspace","Item"); - DataObjectPtr dor2 = mdg2->create((Type&)tcc2); - DataObjectPtr it2 = mdg2->create((Type&)tci2); - DataObjectList& dol2 = dor2->getList("items"); - DataObjectPtr li21 = mdg2->create(tcl2); - DataObjectPtr li22 = mdg2->create(tcl2); - - - try - { - // append from wrong factory to list - dol1.append(li21); - //cout << "ERROR - 47764 should not append from wrong factory" << endl; - //cout << "Updated test case: Correctly used data object from compatible factory" << - // endl; - } - catch (SDOInvalidConversionException e) - { - if (!silent)cout << "ERROR: Incorrect invalid conversion exception" << e << endl; - return 0; - } - - try - { - // add object from wrong factory to reference. - dor2->setDataObject("itemref",it1); - return 0; - } - catch (SDOUnsupportedOperationException e) - { - // expected ,as a reference cannot be outside the graph - } - - try - { - // add object from wrong factory to reference. - dor2->setDataObject("itemcont",it1); - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Add contained object from second factory not OK" << endl; - return 0; - } - - - dol2.append(li22); // OK - - try - { - dol2.insert(0,li11); - //cout << "Updated test case: Correctly used data object from compatible factory" << - // endl; - //cout << "ERROR - 47764 should not insert from wrong factory" << endl; - } - catch (SDOInvalidConversionException e) - { - if (!silent)cout << "Incorrect invalid conversion exception" << e << endl; - return 0; - } - - try - { - dol2.setDataObject(0,li12); - //cout << "Updated test case: Correctly used data object from compatible factory" << - // endl; - // cout << "ERROR - 47764 should not set in list from wrong factory" << endl; - } - catch (SDOInvalidConversionException e) - { - if (!silent)cout << "Incorrect invalid conversion exception" << e << endl; - return 0; - } - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Problem in b47663" << e << endl; - return 0; - } -} - - -int sdotest::bunique() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("test","Root"); - mdg->addType("test","Duplicate"); - mdg->addType("nottest","Duplicate"); - mdg->addType("test","Unique"); - mdg->addType("test","Object"); - - mdg->addPropertyToType("test","Root","duplicate", - "test","Duplicate", false, false, true); - - mdg->addPropertyToType("test","Root","duplicate2", - "nottest","Duplicate", false, false, true); - - mdg->addPropertyToType("test","Root","unique", - "test","Unique", false, false, true); - - mdg->addPropertyToType("test","Root","duplicatelist", - "test","Duplicate", true, false, true); - - mdg->addPropertyToType("test","Root","duplicatelist2", - "nottest","Duplicate", true, false, true); - - mdg->addPropertyToType("test","Root","uniquelist", - "test","Unique", true, false, true); - - mdg->addPropertyToType("test","Duplicate","id", - "commonj.sdo","Integer", false, false, false); - - mdg->addPropertyToType("nottest","Duplicate","id", - "commonj.sdo","Integer", false, false, false); - - mdg->addPropertyToType("test","Unique","id", - "commonj.sdo","Integer", false, false, false); - - mdg->addPropertyToType("test","Duplicate","ob", - "test","Object", false, false, true); - - mdg->addPropertyToType("nottest","Duplicate","ob", - "test","Object", false, false, true); - - mdg->addPropertyToType("test","Unique","ob", - "test","Object", false, false, true); - - const Type& troot = mdg->getType("test","Root"); - const Type& tdup1 = mdg->getType("test","Duplicate"); - const Type& tdup2 = mdg->getType("nottest","Duplicate"); - const Type& tuniq = mdg->getType("test","Unique"); - const Type& tob = mdg->getType("test","Object"); - - DataObjectPtr rooty = mdg->create(troot); - - DataObjectPtr dup1 = mdg->create(tdup1); - dup1->setInteger("id",1); - DataObjectPtr dup2 = mdg->create(tdup1); - dup2->setInteger("id",2); - DataObjectPtr dup3 = mdg->create(tdup2); - dup3->setInteger("id",3); - DataObjectPtr dup4 = mdg->create(tdup2); - dup4->setInteger("id",4); - DataObjectPtr uni1 = mdg->create(tuniq); - uni1->setInteger("id",5); - DataObjectPtr uni2 = mdg->create(tuniq); - uni2->setInteger("id",6); - - DataObjectPtr ob1 = mdg->create(tob); - dup1->setDataObject("ob",ob1); - DataObjectPtr ob2 = mdg->create(tob); - dup2->setDataObject("ob",ob2); - DataObjectPtr ob3 = mdg->create(tob); - uni1->setDataObject("ob",ob3); - - DataObjectList& dl1 = rooty->getList("duplicatelist"); - DataObjectList& dl2 = rooty->getList("duplicatelist2"); - DataObjectList& dl3 = rooty->getList("uniquelist"); - - rooty->setDataObject("duplicate",dup1); - dl1.append(dup2); - - rooty->setDataObject("duplicate2",dup3); - dl2.append(dup4); - - rooty->setDataObject("unique",uni1); - - dl3.append(uni2); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - TypeList tl = mdg->getTypes(); - - xsh->generateFile(tl,"bunique-out.xsd","test"); - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - xmh->save(rooty,"","rooty","bunique-out.xml"); - - if (!comparefiles("bunique-out.xsd","bunique-out.txt")) return 0; - if (!comparefiles("bunique-out.xml","bunique-outxml.txt")) return 0; - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Problem in bunique" << e << endl; - return 0; - } -} - -int sdotest::buniqueread() -{ - try { - - unsigned int i,j,k; - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("bunique-out.xsd"); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "47293 XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - return 0; - } - } - - TypeList tl = mdg->getTypes(); - for ( k=0;kloadFile("bunique-out.xml", "rooty"); - - DataObjectPtr rooty = doc->getRootDataObject(); - - xsh->generateFile(tl,"buniqueread-out.xsd","test"); - - xmh->save(rooty,"","rooty","buniqueread-out.xml"); - - return comparefiles("buniqueread-out.xml","buniqueread-out.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Problem in buniqueread" << e << endl; - return 0; - } -} - - -int sdotest::testwsdl() -{ - try { - - unsigned int i,j; - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("wsdl.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "WSDL XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - - } - return 0; - } - xsh->defineFile("wsdl-soap.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "WSDL SOAP XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - - } - return 0; - } - xsh->defineFile("wsdl-http.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "WSDL HTTP XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - TypeList tl = mdg->getTypes(); - - for (i=0;icreate("http://schemas.xmlsoap.org/wsdl/","tDefinitions"); - - - DataObjectPtr mess = mdg->create("http://schemas.xmlsoap.org/wsdl/","tMessage"); - mess->setCString("name","testRequest"); - - DataObjectPtr part = mdg->create("http://schemas.xmlsoap.org/wsdl/","tPart"); - part->setCString("name","name"); - part->setCString("type","http://www.w3.org/2001/XMLSchema-instance#string"); - - DataObjectPtr part2 = mdg->create("http://schemas.xmlsoap.org/wsdl/","tPart"); - part2->setCString("name","name"); - part2->setCString("type","http://I want/this/added/to/the/urls#string"); - - - DataObjectList& dol = root->getList("message"); - - dol.append(mess); - - DataObjectList& dol2 = mess->getList("part"); - - dol2.append(part); - dol2.append(part2); - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - xmh->save(root,"","definitions","testwsdl.xml"); - - return comparefiles("testwsdl.xml","testwsdl.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "testwsdl failed" << endl << e << endl; - return 0; - } - -} - - - -int sdotest::travel() -{ - try { - - unsigned int i,j; - - FILE *f = fopen("travel.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open travel.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("TravelBookingSchema.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "WSDL XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - TypeList tl = mdg->getTypes(); - - fprintf(f, "*******************************TYPES**********************\n"); - - for (i=0;iloadFile("TravelBookingUsingSchema.xml"); - - DataObjectPtr rooty = doc->getRootDataObject(); - - fprintf(f, "*******************************DATA**********************\n"); - printDataObject(f, rooty); - fprintf(f,"***************************END DATA**********************\n"); - - fclose(f); - return comparefiles("travel.dat","travel.txt"); - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "travel failed" << endl << e << endl; - return 0; - } - -} - - -int sdotest::oddchars() -{ - try { - - unsigned int i,j; - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("OddChars.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "ODDCHARS XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - XMLDocumentPtr doc = xmh->loadFile("OddChars.xml"); - - if ((i = xmh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "OddChars reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - DataObjectPtr rooty = doc->getRootDataObject(); - - FILE *f = fopen ("oddchars.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open oddchars.dat" << endl; - return 0; - } - printDataObject(f, rooty); - - fclose(f); - return comparefiles("oddchars.dat","oddchars.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "oddchars failed" << endl << e << endl; - return 0; - } - -} - -int sdotest::unsetlist() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("test","Root"); - mdg->addType("test","ListItem"); - - mdg->addPropertyToType("test","Root","list", - "test","ListItem", true, false, true); - - const Type& troot = mdg->getType("test","Root"); - const Type& tlist = mdg->getType("test","ListItem"); - - DataObjectPtr rooty = mdg->create(troot); - - DataObjectList& dl = rooty->getList("list"); - - - DataObjectPtr li1 = mdg->create(tlist); - DataObjectPtr li2 = mdg->create(tlist); - DataObjectPtr li3 = mdg->create(tlist); - - - dl.append(li1); - dl.append(li2); - dl.append(li3); - - rooty->unset("list[3]"); - - dl.append(li3); - - rooty->unset("list.2"); - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Problem in unsetlist" << e << endl; - return 0; - } -} - - -int sdotest::notns() -{ - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - - mdg->addType("","Root"); - mdg->addType("","ListItem"); - - mdg->addPropertyToType("","Root","list", - "","ListItem", true, false, true); - - const Type& troot = mdg->getType("","Root"); - const Type& tlist = mdg->getType("","ListItem"); - - DataObjectPtr rooty = mdg->create(troot); - - DataObjectList& dl = rooty->getList("list"); - - - DataObjectPtr li1 = mdg->create(tlist); - DataObjectPtr li2 = mdg->create(tlist); - DataObjectPtr li3 = mdg->create(tlist); - - - dl.append(li1); - dl.append(li2); - dl.append(li3); - - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - xmh->save(rooty,"","root","notns.xml"); - - return comparefiles("notns.xml","notns.txt"); - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "notns" << endl << e << endl; - return 0; - } - -} - -int sdotest::badelement() -{ - try { - - unsigned int i,j; - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("BadElement.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: BADELEMENT XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - XMLDocumentPtr doc = xmh->loadFile("BadElement.xml"); - - if ((i = xmh->getErrorCount()) > 0) - { - FILE *f = fopen("badelement.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open badelement.dat" << endl; - return 0; - } - fprintf(f,"BADELEMENT correctly found errors:\n"); - for (j=0;jgetErrorMessage(j); - if (m != 0) fprintf(f,"%s\n", m); - } - fclose (f); - return comparefiles("badelement.dat","badelement.txt"); - } - else - { - if (!silent)cout << "Expected errors, got none" << endl; - return 0; - } - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "badelement" << endl << e << endl; - return 0; - } - -} - - -int sdotest::testastyle(FILE *f, const char* style) -{ - - unsigned int i,j; - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile(style); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: TESTSTYLES XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - TypeList tl = mdg->getTypes(); - - fprintf(f,"*****STYLE %s\n",style); - - for (i=0;icreateDocument(); // with no name, URI - uses first in schema - - DataObjectPtr root = doc->getRootDataObject(); - - fprintf(f,"Root is:%s#%s\n",root->getType().getURI(), - root->getType().getName()); - - - XMLDocumentPtr doc1 = xmh->createDocument("library"); // with no URI - uses first in schema - - DataObjectPtr root1 = doc1->getRootDataObject(); - - fprintf(f,"Root is:%s#%s\n",root1->getType().getURI(), - root1->getType().getName()); - - XMLDocumentPtr doc2 = xmh->createDocument("library","libraryNS"); // with URI - - DataObjectPtr root2 = doc2->getRootDataObject(); - - fprintf(f, "Root is:%s#%s\n",root2->getType().getURI(), - root2->getType().getName()); - return 1; - - -} - -int sdotest::teststyles() -{ - try - { - - FILE *f = fopen("teststyles.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open teststyles.dat" << endl; - return 0; - } - testastyle(f,"Style1.xsd"); - testastyle(f,"Style2.xsd"); - testastyle(f,"Style3.xsd"); - //testastyle("Style4.xsd"); = groups not supported yet. - fclose(f); - return comparefiles("teststyles.dat","teststyles.txt"); - } - catch (SDORuntimeException e) - { - if (!silent)cout << "teststyles" << endl << e << endl; - return 0; - } - -} - - -int sdotest::testinc2(const char* inc, const char* name1, const char* name2) -{ - - - unsigned int i,j; - - try { - - FILE *f = fopen(name1,"w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open " << name1 << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile(inc); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: TestInc2 XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - TypeList tl = mdg->getTypes(); - - //cout << "***** CALCULATOR ***************************************" << endl; - - for (i=0;idefineFile(x1); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: Order XSD1 reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - fclose(f); - return 0; - } - - xsh->defineFile(x2); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: Order XSD2 reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - fclose(f); - return 0; - } - - TypeList tl = mdg->getTypes(); - - //cout << "***** TESTORDER ****************************************" << endl; - - for (i=0;idefineFile("simple.xsd"); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: Order simple.xsd reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - - TypeList tl = mdg->getTypes(); - - //cout << "***** SIMPLE ****************************************" << endl; - - for (i=0;iloadFile("simple.xml"); - - if ((i = xmh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "Simple found errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - DataObjectPtr dob = doc->getRootDataObject(); - - printDataObject(f, dob); - - fclose(f); - return comparefiles("simple.dat","simple.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in TestAny" << e << endl; - return 0; - } -} - -int sdotest::cdatatest() -{ - try - { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - /** - * Get an XSD helper to load XSD information into the - * data factory - */ - XSDHelperPtr myXSDHelper = HelperProvider::getXSDHelper(mdg); - myXSDHelper->defineFile("cdata.xsd"); - - /** - * Check if there were any errors. The parse may still - * succeed, but errors indicate some elements were not - * understood - */ - unsigned int i = 0; - unsigned int j = 0; - if ((i = myXSDHelper->getErrorCount()) > 0) - { - cout << "XSD Loading reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - return 0; - } - } - - /** - * Use the same data factory to load XML corresponding to - * data objects adhering to the previously loaded schema - */ - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("cdata-in.xml", "http://www.example.org/test"); - - /** - * Check if there were any errors. The parse may still - * succeed, but errors indicate some elements did not match - * the schema, or were malformed. - * - */ - if ((i = myXMLHelper->getErrorCount()) > 0) - { - cout << "XML Loading reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - return 0; - } - } - - // write the XML element back out to a file - myXMLHelper->save(myXMLDocument, "cdata-testout.xml"); - - return comparefiles("cdata-out.xml","cdata-testout.xml"); - - } - catch (SDORuntimeException e) - { - cout << "Exception in cdata test" << endl; - cout << e.getMessageText(); - return 0; - } -} - -int sdotest::cloneopentest() -{ - try - { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - /** - * Get an XSD helper to load XSD information into the - * data factory - */ - XSDHelperPtr myXSDHelper = HelperProvider::getXSDHelper(mdg); - myXSDHelper->defineFile("clone.xsd"); - - /** - * Check if there were any errors. The parse may still - * succeed, but errors indicate some elements were not - * understood - */ - unsigned int i = 0; - unsigned int j = 0; - if ((i = myXSDHelper->getErrorCount()) > 0) - { - cout << "XSD Loading reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - return 0; - } - } - - /** - * Use the same data factory to load XML corresponding to - * data objects adhering to the previously loaded schema - */ - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("clone-in.xml", "http://www.example.org/test"); - - /** - * Check if there were any errors. The parse may still - * succeed, but errors indicate some elements did not match - * the schema, or were malformed. - * - */ - if ((i = myXMLHelper->getErrorCount()) > 0) - { - cout << "XML Loading reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - return 0; - } - } - - DataObjectPtr original = myXMLDocument->getRootDataObject(); - - // copy the data object we just read in - DataObjectPtr clone = CopyHelper::copy(original); - - // create a new document based on this cloned data object - XMLDocumentPtr myNewXMLDocument = myXMLHelper->createDocument(clone, - "http://www.example.org/test", - "Clone"); - - // write the cloned document out to a file - myXMLHelper->save(myNewXMLDocument, "clone-testout.xml"); - -#if defined(WIN32) || defined (_WINDOWS) - - return comparefiles("clone-out-win.xml","clone-testout.xml"); -#else - return comparefiles("clone-out.xml","clone-testout.xml"); -#endif - - } - catch (SDORuntimeException e) - { - cout << "Exception in clone test" << endl; - cout << e.getMessageText(); - return 0; - } -} - -int sdotest::elementFormDefaultQualified() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("StockQuoteService.wsdl"); - - DataObjectPtr doObj = mdg->create("http://swanandmokashi.com", - "GetQuotes"); - - doObj->setCString("QuoteTicker", "IBM"); - XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(mdg); - - - XMLDocumentPtr doc = - xmlHelper->createDocument(doObj, - "http://swanandmokashi.com", - "GetQuotes"); - - xmlHelper->save(doc, "qualified-testout.xml"); - - return comparefiles("qualified.xml", "qualified-testout.xml"); - } - catch (SDORuntimeException e) { - cout << "sdotest::elementFormDefaultQualified() failed" << endl << e << endl; - return 0; - } - return 0; -} - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.h b/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.h deleted file mode 100644 index fb6c80906a..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.h +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* $Rev$ $Date$ */ - -#include "commonj/sdo/SDO.h" -using namespace commonj::sdo; - - -// test - -class sdotest { - public: - - static bool silent; - static bool ramping; - - /* utilities */ - - static int printseq(FILE *f, SequencePtr sptr); - static void printDataStructure(FILE *f,DataFactory* dd); - static void printDataObject(FILE *f, DataObjectPtr dol); - static void printValue(FILE *f, DataObjectPtr dob, const Property& prop); - static void printList(FILE *f, DataObjectPtr dob, const Property& prop); - static void printOldValues(FILE *f, ChangeSummaryPtr cs, DataObjectPtr dob); - static void dumpchangesummary(FILE *f, ChangeSummaryPtr cs); - static int comparefiles(char* fn1, char*fn2); - static int dumpproperties(FILE *f, DataObjectPtr root); - static int printset(FILE *f, ChangeSummaryPtr cs); - static void populateFactory(DataFactoryPtr dfp); - - - static int xsdtosdo(); - - static void changeSummaryHeader(ChangeSummaryPtr cs); - static void changeSummaryFooter(); - static void changeSummaryChange(int level, ChangeSummaryPtr cs, DataObjectPtr dob); - static void changeSummaryDeletedObject(int indent, const char* name, ChangeSummaryPtr cs, DataObjectPtr dob); - static void changeSummaryElements(int indent, ChangeSummaryPtr cs, DataObjectPtr dob); - static void changeSummarySetting(Setting& s); - static bool changeSummaryAttributes(ChangeSummaryPtr cs, DataObjectPtr dol); - static char* convert(const char* uri); - - /* work in progress - generation of structures */ - - static void generate(DataFactoryPtr fac); - - /* tests */ - static int xhtml1(); - static int definetest(); - static int stocktest(); - - static int scopetest(); - static DataObjectPtr scopetest2(); - - - static int pete(); - static int testgenerate(const char* xsd, const char* output); - static int emptycs(); - static int compatiblefactory(); - static int transferto(DataObjectPtr d, DataFactoryPtr f, bool expecterror); - static int openseq(); - static int testanytwo(const char* xsd, - const char* xsd2, const char* xml); - static int testany(const char* xsd, - const char* acceptedxsderror, - const char* xml, - const char* acceptedxmlerror); - static int testOrder(const char* x1, const char* x2, - const char* name1, const char* name2); - static int simple(); - static int testinc2(const char* inc, const char* name1, - const char* name2); - static int testastyle(FILE *f, const char* style); - static int teststyles(); - static int badelement(); - static int oddchars(); - static int notns(); - static int unsetlist(); - static int travel(); - static int testwsdl(); - static int bunique(); - static int buniqueread(); - static int propdefaulttest(); - static int showdefault(FILE *f, const Type& tm); - static int graham6(); - static int graham5(); - static int graham4(); - static int leak(); - static int twolists(); - static int detachtest(); - static int includetest(); - static int testLoad(); - static int clonetest(); - static int testUtil(); - static int testErrors(); - static int doctest(); - static int notfound(); - static int serializeChangeSummary(ChangeSummaryPtr cs); - static int cssave(); - static int csload(); - static int cssave2(); - static int csload2(); - static int bug1(); - static int bug2(); - static int setnull(); - static int testsubsload(); - static int testabstract(); - static int testsubs(); - static int testSCA(); - static int testOpen(); - static int saveOpen(); - static int loadOpen(); - static int testui(); - static int merle1(); - static int graham1(); - static int graham2(); - static int graham3(); - static int loadManyOpen(); - static int loadOpenNS(); - - - static int eqhelpertest(); - static int cohelpertest(); - static int datetest(); - static int matttest1(); - static int adddeletetest(); - static int carotest3(); - static int carotest2(); - static int carotest(); - static int setmany(); - static int noncontest(); - static int versiontest(); - static int defaulttest(); - static int defaulttest_strobj(); - static int querytest(); - static int getproptest(); - static int nulltest(); - static int usertest(); - static int rcptest(); - static int boolbug(); - static int scope1(); - static int scope2(); - static int scope3(); - static int conversiontest(); - static int changesummarytest(); - static int scenario1(); - static int scenario2(); - static int scenario3(); - static int scenario4(); - static int scenario5(); - static int seqtest(); - static int printDataObject(DataObjectPtr dol); - static int printValue(DataObjectPtr dob, const Property& prop); - static int printList(DataObjectPtr dob, const Property& prop); - static int printOldValues(ChangeSummaryPtr cs, DataObjectPtr dob); - static int testGetters(DataObjectPtr dor); - static int testGetter(DataObjectPtr dor, char* str); - static int maintest(); - static int jira490(); - static int jira705(); - static int jira546(); - static int jira945(); - static int jira980(); - - - static int b48602(); - static int b48736(); - static int b48686(); - static int b48601(); - static int b48300(); - static int b47663(); - static int b47764(); - static int b47802(); - static int b47293(); - static int b47137(); - static int b47137b(); - static int b46633(); - static int b46734(); - static int b46693(); - static int b46634(); - static int b46613(); - static int b46617(); - static int b46617b(); - static int b45933(); - static int testXPath(); - static int cdatatest(); - static int cloneopentest(); - static int tuscany963(); - static int tuscany562(); - static int upandatom(); - static int typedefinitionstest(); - static int eBayTest(); - static int jira1174(); - static int jira1238(); - static int loadWithoutSchema(); - static int jira445(); - static int jira1112(); - static int elementFormDefaultQualified(); - static int elementFormDefaultQualifiedSequence(); - static int xsiTypeAbstract(); - static int nullExtendedPrimitive(); -}; diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest2.cpp b/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest2.cpp deleted file mode 100644 index da70dac0f6..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest2.cpp +++ /dev/null @@ -1,2064 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* $Rev$ $Date$ */ - -#include - -#pragma warning(disable:4786) - -#include -#include -using namespace std; - - - -#include "sdotest.h" - - - -using namespace commonj::sdo; - -DataObjectPtr sdotest::scopetest2() -{ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - - mdg->addType("myspace","Company"); - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","id", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Root","company", - "myspace","Company", false, false, true); - - const Type& tcc = mdg->getType("myspace","Root"); - - DataObjectPtr dop = mdg->create((Type&)tcc); - - DataObjectPtr co = dop->createDataObject("company"); - - return dop; -} - -int sdotest::scopetest() -{ - DataObjectPtr dob; - dob = scopetest2(); - - // fails on close? - return 1; -} - -int sdotest::xsdtosdo() -{ -const char* value; - -value = SDOUtils::XSDToSDO("string"); -if (!silent)cout << "XSDToSDO(string)=" << value << endl; -if (strcmp(value,"String")) return 0; - -value = SDOUtils::XSDToSDO("int"); -if (!silent)cout << "XSDToSDO(int)="<< value << endl; -if (strcmp(value,"Integer")) return 0; - -value = SDOUtils::XSDToSDO("notinlist"); -if (!silent)cout << "XSDToSDO(notinlist)="<< value << endl; -if (strcmp(value,"String")) return 0; - -value = SDOUtils::XSDToSDO(""); -if (!silent)cout << "XSDToSDO(\"\")="<< value << endl; -if (strcmp(value,"String")) return 0; - -value = SDOUtils::XSDToSDO(0); -if (!silent)cout << "XSDToSDO(0)="<< value << endl; -if (strcmp(value,"String")) return 0; - -value = SDOUtils::SDOToXSD("String"); -if (!silent)cout << "SDOToXSD(String)="<< value << endl; -if (strcmp(value,"string")) return 0; - -value = SDOUtils::SDOToXSD("Long"); -if (!silent)cout << "SDOToXSD(Long)="<< value << endl; -if (strcmp(value,"unsignedLong")) return 0; - -value = SDOUtils::SDOToXSD("notinlist"); -if (!silent)cout << "SDOToXSD(notinlist)="<< value << endl; -if (strcmp(value,"string")) return 0; - -value = SDOUtils::SDOToXSD(""); -if (!silent)cout << "SDOToXSD(\"\")="<< value << endl; -if (strcmp(value,"string")) return 0; - -value = SDOUtils::SDOToXSD(0); -if (!silent)cout << "SDOToXSD(0)="<< value << endl; -if (strcmp(value,"string")) return 0; - -return 1; - -} - -// The compatibleFactory() test creates a series of factories that are either -// identical or very similar so we need a function that populates a data -// factory with the common part. - -void sdotest::populateFactory(DataFactoryPtr dfp) -{ - - dfp->addType("Namespace", "Project"); - dfp->addType("Namespace", "WorkPackage"); - dfp->addType("Namespace", "LineItem"); - dfp->addType("Namespace", "StringHolder"); - - dfp->addType("Namespace", "Root"); - dfp->addPropertyToType("Namespace","Root","project", - "Namespace","Project", false, false, true); - dfp->addPropertyToType("Namespace","Project","wp", - "Namespace","WorkPackage", false, false, false); - - dfp->addPropertyToType("Namespace","StringHolder","value", - "commonj.sdo","String", false, false, false); - - dfp->addPropertyToType("Namespace","StringHolder","proj", - "Namespace","Project", false, false, false); - - dfp->addPropertyToType("Namespace","Project","id", - "commonj.sdo","String", false, false, false); - - dfp->addPropertyToType("Namespace","Project","string", - "Namespace","StringHolder", false, false, true); - - dfp->addPropertyToType("Namespace","WorkPackage","name", - "commonj.sdo","String", false, false, false); - - - dfp->addPropertyToType("Namespace","WorkPackage","string", - "Namespace","StringHolder", false, false, true); - - dfp->addPropertyToType("Namespace","LineItem","itemname", - "commonj.sdo","String", false, false, false); - - dfp->addPropertyToType("Namespace","LineItem","string", - "Namespace","StringHolder", false, false, true); - - dfp->addPropertyToType("Namespace","Project","packages", - "Namespace","WorkPackage", true, false, true); - - dfp->addPropertyToType("Namespace","WorkPackage","lineitems", - "Namespace","LineItem", true, false, true); - -} - -int sdotest::compatiblefactory() -{ - DataFactoryPtr f1 = DataFactory::getDataFactory(); - populateFactory(f1); - - // project - // id (string) - // string (StringHolder) - // workpackages (WorkPackage) - - // workpackage - // name (string) - // string (StringHolder) - // lineitems (LineItem) - - // lineitem - // itemname (string) - - - // factories 1 and 2 are compatible - - DataFactoryPtr f2 = DataFactory::getDataFactory(); - populateFactory(f2); - - // factory 3 has no project type - - DataFactoryPtr f3 = DataFactory::getDataFactory(); - - f3->addType("Namespace","WorkPackage"); - f3->addType("Namespace","LineItem"); - f3->addType("Namespace","StringHolder"); - - f3->addType("Namespace","Root"); - f3->addPropertyToType("Namespace","Root","project", - "Namespace","WorkPackage", false, false, true); - - - f3->addPropertyToType("Namespace","StringHolder","value", - "commonj.sdo","String", false, false, false); - - f3->addPropertyToType("Namespace","WorkPackage","name", - "commonj.sdo","String", false, false, false); - - - f3->addPropertyToType("Namespace","WorkPackage","string", - "Namespace","StringHolder", false, false, true); - - f3->addPropertyToType("Namespace","LineItem","itemname", - "commonj.sdo","String", false, false, false); - - f3->addPropertyToType("Namespace","LineItem","string", - "Namespace","StringHolder", false, false, true); - - - f3->addPropertyToType("Namespace","WorkPackage","lineitems", - "Namespace","LineItem", true, false, true); - - - // factory 4 looks compatible - but stringholder is missing - - DataFactoryPtr f4 = DataFactory::getDataFactory(); - - f4->addType("Namespace","Project"); - f4->addType("Namespace","WorkPackage"); - f4->addType("Namespace","LineItem"); - - f4->addType("Namespace","Root"); - f4->addPropertyToType("Namespace","Root","project", - "Namespace","Project", false, false, true); - - - f4->addPropertyToType("Namespace","Project","id", - "commonj.sdo","String", false, false, false); - - - f4->addPropertyToType("Namespace","WorkPackage","name", - "commonj.sdo","String", false, false, false); - - - f4->addPropertyToType("Namespace","LineItem","itemname", - "commonj.sdo","String", false, false, false); - - f4->addPropertyToType("Namespace","Project","packages", - "Namespace","WorkPackage", true, false, true); - - f4->addPropertyToType("Namespace","WorkPackage","lineitems", - "Namespace","LineItem", true, false, true); - - - // factory 5 looks compatible, but the lists are not lists - - DataFactoryPtr f5 = DataFactory::getDataFactory(); - - f5->addType("Namespace","Project"); - f5->addType("Namespace","WorkPackage"); - f5->addType("Namespace","LineItem"); - f5->addType("Namespace","StringHolder"); - - f5->addType("Namespace","Root"); - f5->addPropertyToType("Namespace","Root","project", - "Namespace","Project", false, false, true); - - - f5->addPropertyToType("Namespace","StringHolder","value", - "commonj.sdo","String", false, false, false); - - f5->addPropertyToType("Namespace","Project","id", - "commonj.sdo","String", false, false, false); - - f5->addPropertyToType("Namespace","Project","string", - "Namespace","StringHolder", false, false, true); - - f5->addPropertyToType("Namespace","WorkPackage","name", - "commonj.sdo","String", false, false, false); - - - f5->addPropertyToType("Namespace","WorkPackage","string", - "Namespace","StringHolder", false, false, true); - - f5->addPropertyToType("Namespace","LineItem","itemname", - "commonj.sdo","String", false, false, false); - - f5->addPropertyToType("Namespace","LineItem","string", - "Namespace","StringHolder", false, false, true); - - f5->addPropertyToType("Namespace","Project","packages", - "Namespace","WorkPackage", false, false, true); - - f5->addPropertyToType("Namespace","WorkPackage","lineitems", - "Namespace","LineItem", false, false, true); - - // factory 6 looks OK, but the lineitems have no itemname field - - DataFactoryPtr f6 = DataFactory::getDataFactory(); - - f6->addType("Namespace","Project"); - f6->addType("Namespace","WorkPackage"); - f6->addType("Namespace","LineItem"); - f6->addType("Namespace","StringHolder"); - - f6->addType("Namespace","Root"); - f6->addPropertyToType("Namespace","Root","project", - "Namespace","Project", false, false, true); - - - f6->addPropertyToType("Namespace","StringHolder","value", - "commonj.sdo","String", false, false, false); - - f6->addPropertyToType("Namespace","Project","id", - "commonj.sdo","String", false, false, false); - - f6->addPropertyToType("Namespace","Project","string", - "Namespace","StringHolder", false, false, true); - - f6->addPropertyToType("Namespace","WorkPackage","name", - "commonj.sdo","String", false, false, false); - - - f6->addPropertyToType("Namespace","WorkPackage","string", - "Namespace","StringHolder", false, false, true); - - f6->addPropertyToType("Namespace","LineItem","string", - "Namespace","StringHolder", false, false, true); - - f6->addPropertyToType("Namespace","Project","packages", - "Namespace","WorkPackage", true, false, true); - - f6->addPropertyToType("Namespace","WorkPackage","lineitems", - "Namespace","LineItem", true, false, true); - - - // factory 7 looks OK, but the identifiers are ints - - - DataFactoryPtr f7 = DataFactory::getDataFactory(); - - f7->addType("Namespace","Project"); - f7->addType("Namespace","WorkPackage"); - f7->addType("Namespace","LineItem"); - f7->addType("Namespace","StringHolder"); - - f7->addType("Namespace","Root"); - f7->addPropertyToType("Namespace","Root","project", - "Namespace","Project", false, false, true); - - f7->addPropertyToType("Namespace","StringHolder","value", - "commonj.sdo","String", false, false, true); - - f7->addPropertyToType("Namespace","Project","id", - "commonj.sdo","Integer", false, false, false); - - f7->addPropertyToType("Namespace","Project","string", - "Namespace","StringHolder", false, false, true); - - f7->addPropertyToType("Namespace","WorkPackage","name", - "commonj.sdo","String", false, false, false); - - - f7->addPropertyToType("Namespace","WorkPackage","string", - "Namespace","StringHolder", false, false, true); - - f7->addPropertyToType("Namespace","LineItem","itemname", - "commonj.sdo","Integer", false, false, false); - - f7->addPropertyToType("Namespace","LineItem","string", - "Namespace","StringHolder", false, false, true); - - f7->addPropertyToType("Namespace","Project","packages", - "Namespace","WorkPackage", true, false, true); - - f7->addPropertyToType("Namespace","WorkPackage","lineitems", - "Namespace","LineItem", true, false, true); - - - // create a tree from Root in factory 1 - - DataObjectPtr root = f1->create("Namespace","Root"); - DataObjectPtr project = root->createDataObject("project"); - project->setCString("id","The TTP Project"); - DataObjectPtr str = project->createDataObject("string"); - str->setCString("value","The Recursive Acronym Project"); - DataObjectPtr wp1 = project->createDataObject("packages"); - DataObjectPtr wp2 = project->createDataObject("packages"); - wp1->setCString("name","Work Package 1"); - wp2->setCString("name","Work Package 2"); - DataObjectPtr li1 = wp1->createDataObject("lineitems"); - DataObjectPtr li2 = wp1->createDataObject("lineitems"); - DataObjectPtr li3 = wp2->createDataObject("lineitems"); - DataObjectPtr li4 = wp2->createDataObject("lineitems"); - li1->setCString("itemname","LineItem 1"); - li2->setCString("itemname","LineItem 2"); - li3->setCString("itemname","LineItem 3"); - li4->setCString("itemname","LineItem 4"); - DataObjectPtr str1 = li1->createDataObject("string"); - DataObjectPtr str2 = li2->createDataObject("string"); - DataObjectPtr str3 = li3->createDataObject("string"); - DataObjectPtr str4 = li4->createDataObject("string"); - str1->setCString("value","String1"); - str2->setCString("value","String2"); - str3->setCString("value","String3"); - str4->setCString("value","String4"); - - -// cout << "DATA OBJECTS FROM FACTORY 1" << endl; -// printDataObject(root); - - if (!transferto(root,f2, false)) return 0; - if (!transferto(root,f3, true)) return 0; - // Following 4 tests do not now cause an error - if (!transferto(root,f4, false)) return 0; - if (!transferto(root,f5, false)) return 0; - if (!transferto(root,f6, false)) return 0; - if (!transferto(root,f7, false)) return 0; - - // finally, lets move one which has a parent and cant be moved. - - try { - DataObjectPtr project = root->getDataObject("project"); - - DataObjectPtr root2 = f2->create("Namespace","Root"); - - root2->setDataObject("project", project); - return 0; - } - catch (SDORuntimeException e) - { - //cout << "Compatibility test correctly returned an error :" ; - //cout << e.getMessageText() << endl; - return 1; - } - -} - -int sdotest::transferto(DataObjectPtr root, DataFactoryPtr f2, bool expecterror) -{ - try { - - // transfer the tree to factory 2... - DataObjectPtr rproject = root->getDataObject("project"); - - DataObjectPtr project = CopyHelper::copy(rproject); - - DataObjectPtr root2 = f2->create("Namespace","Root"); - - root2->setDataObject("project", project); - - //cout << "DATA OBJECTS TRANSFERRED" << endl; - - //printDataObject(root2); - - if (expecterror) - { - return 0; - } - return 1; - } - catch (SDORuntimeException e) - { - if (expecterror){ - //cout << "Compatibility test correctly returned an error :" ; - //cout << e.getMessageText() << endl; - return 1; - } - else - { - if (!silent)cout << "Compatibility test failed whilst transferring " << e << endl; - return 0; - } - } -} - - -int sdotest::b48602() -{ - - - int i,j; - - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("b48602.xsd"); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: b48602 XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - return 0; - } - catch (SDOTypeNotFoundException e) - { - return 1; - } - catch (SDORuntimeException e) - { - return 1; - } - -} - -int sdotest::testany(const char* xsd, - const char* acceptedxsderror, - const char* xml, - const char* acceptedxmlerror) -{ - - - unsigned int i,j; - int rc; - - try { - - char *c; - - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - if (xsd) - { - char * name1 = new char[strlen(xsd)+5]; - char * name3 = new char[strlen(xsd)+5]; - strcpy(name1,xsd); - while ((c = strchr(name1,'.')) != 0)*c = '_'; - strcpy(name3,name1); - strcat(name1,".dat"); - strcat(name3,".txt"); - - - FILE *f1 = fopen(name1,"w+"); - if (f1 == 0) - { - if (!silent)cout << "Unable to open " << name1 << endl; - delete[] name1; - delete[] name3; - return 0; - } - - xsh->defineFile(xsd); - - if ((i = xsh->getErrorCount()) > 0) - { - if (acceptedxsderror != 0) - { - for (j=0;jgetErrorMessage(j))) - { - fclose(f1); - delete[] name1; - delete[] name3; - return 1; - } - } - } - if (!silent) - { - cout << "PROBLEM: Testany XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - fclose(f1); - delete[] name1; - delete[] name3; - return 0; - } - - - TypeList tl = mdg->getTypes(); - - fprintf(f1, "***** TYPES BEFORE RESOLVE **********************************\n"); - - for (i=0;iloadFile(xml); - - if ((i = xmh->getErrorCount()) > 0) - { - if (acceptedxmlerror != 0) - { - for (j=0;jgetErrorMessage(j))) - { - fclose(f2); - delete[] name2; - delete[] name4; - return 1; - } - } - } - if (!silent) - { - cout << "TestAny XML found errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - fclose(f2); - delete[] name2; - delete[] name4; - return 0; - } - - else { - TypeList tl = mdg->getTypes(); - - fprintf(f2, "***** TYPES AFTER RESOLVE*********************************\n"); - - for (i=0;igetRootDataObject(); - printDataObject(f2, dob); - - fclose(f2); - - rc = comparefiles(name2,name4); - - delete[] name2; - delete[] name4; - - return rc; - } - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in TestAny" << e << endl; - return 0; - } -} - - - -int sdotest::testanytwo(const char* xsd, const char* xsd2, - const char* xml) -{ - unsigned int i, j; - - try - { - char * name1 = new char[strlen(xsd)+5]; - char * name2 = new char[strlen(xml)+5]; - char * name3 = new char[strlen(xsd)+5]; - char * name4 = new char[strlen(xml)+5]; - - strcpy(name1,xsd); - strcpy(name2,xml); - - char *c; - - while ((c = strchr(name1,'.')) != 0)*c = '_'; - while ((c = strchr(name2,'.')) != 0)*c = '_'; - - strcpy(name3,name1); - strcpy(name4,name2); - - strcat(name1,".dat"); - strcat(name2,".dat"); - strcat(name3,".txt"); - strcat(name4,".txt"); - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - if (xsd) - { - xsh->defineFile(xsd); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: Testany XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - delete[] name1; - delete[] name2; - delete[] name3; - delete[] name4; - - return 0; - } - - } - - if (xsd2) - { - xsh->defineFile(xsd2); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: Testany XSD2 reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - - delete[] name1; - delete[] name2; - delete[] name3; - delete[] name4; - - return 0; - } - } - - if (xsd) - { - - - FILE *f1 = fopen(name1,"w+"); - if (f1 == 0) - { - if (!silent)cout << "Unable to open " << name1 << endl; - - delete[] name1; - delete[] name2; - delete[] name3; - delete[] name4; - - return 0; - } - - TypeList tl = mdg->getTypes(); - - fprintf(f1,"***** TESTANY ******************************************\n"); - - for (i=0;iloadFile(xml); - - if ((i = xmh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "TestAny XML found errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - delete[] name1; - delete[] name2; - delete[] name3; - delete[] name4; - - return 0; - } - else - { - DataObjectPtr dob = doc->getRootDataObject(); - printDataObject(f2, dob); - } - - fclose(f2); - int result = comparefiles(name2,name4); - - delete[] name1; - delete[] name2; - delete[] name3; - delete[] name4; - - return result; - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in TestAnyTwo" << e << endl; - - return 0; - } -} - -int sdotest::openseq() - -{ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - FILE *f = fopen("openseq.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open openseq.dat" << endl; - return 0; - } - - - mdg->addType("companyNS","CompanyType"); - // employee will be an open sequenced type... - mdg->addType("companyNS","EmployeeType", /*seq*/true, - /*open*/true, - /*abs */ false, - /*data*/ false); - - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - - mdg->addPropertyToType(tcomp,"name",tstring); - - mdg->addPropertyToType(tcomp,"employees",temp,true); - - mdg->addPropertyToType(temp, "name",tstring); - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","ACME"); - - DataObjectPtr emp = mdg->create(temp); - - emp->setCString("name","Albert"); - - emp->setCString("openstring","Value Of Open String"); - - /* now do the same with the employee seq...*/ - - SequencePtr seq = emp->getSequence(); - - seq->addCString("opensequencedstring","Value of sequenced string"); - - const char* c = emp->getCString("openstring"); - - fprintf(f, "Open Type string value: %s\n",c); - - c = emp->getCString("opensequencedstring"); - - fprintf(f, "Open Sequenced string value: %s\n",c); - - c = seq->getCStringValue(0); - - fprintf(f, "Open Sequenced string value from seq: %s\n",c); - - //cout << "END TEST: OpenSeq ======================================" << endl; - fclose(f); - return comparefiles("openseq.dat","openseq.txt"); -} - -int sdotest::b48601() -{ - return testany("48601.xsd", - "Schema contains a union which is not yet implemented",0,0); -} - -int sdotest::b48686() -{ - return testany("48686.xsd",0,"48686.xml",0); -} - -int sdotest::b48736() -{ - return testany("48736.xsd",0,"48736.xml",0); -} - - -int sdotest::testgenerate(const char* xsd, const char* output) -{ - - int i,j; - - try { - - char * name1 = new char[strlen(output) + 5]; - char * name2 = new char[strlen(output) + 5]; - char * c; - strcpy(name1,output); - while ((c = strchr(name1,'.')) != 0)*c='_'; - strcpy(name2,name1); - strcat(name1,".dat"); - strcat(name2,".txt"); - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - if (xsd) - { - xsh->defineFile(xsd); - - if ((i = xsh->getErrorCount()) > 0) - { - - if (!silent) - { - cout << "PROBLEM: generation XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - else - { - mdg->generateInterface(name1,"Test"); - return comparefiles(name1,name2); - } - } - return 0; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in TestGenerate" << e << endl; - return 0; - } -} - - -int sdotest::emptycs() -{ -try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("company.xsd"); - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - - // create a graph, then save it - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","ACME"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","Advanced Technologies"); - dept->setCString("location","NY"); - dept->setCString("number","123"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - - emp1->setCString("name","John Jones"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Mary Smith"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Jane Doe"); - emp3->setCString("SN","E0003"); - - DataObjectList& dol2 = dept->getList("employees"); - dol2.append(emp1); - dol2.append(emp2); - dol2.append(emp3); - - comp->setDataObject("employeeOfTheMonth",emp2); - - // right now, there is no change summary, and logging is - // off - we expect an empty change summary element - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company"); - - xmh->save(doc,"emptycs1.xml"); - - if (!comparefiles("emptycs1.xml","emptycs1.txt"))return 0; - - ChangeSummaryPtr cs = comp->getChangeSummary(); - - cs->beginLogging(); - - xmh->save(doc,"emptycs2.xml"); - - if (!comparefiles("emptycs2.xml","emptycs2.txt"))return 0; - - // now we expect and empty change summary with logging true - - DataObjectPtr emp4 = mdg->create(temp); - emp4->setCString("name","Al Smith"); - emp4->setCString("SN","E0004"); - emp4->setBoolean("manager",true); - - // first change - create employee 4 - dol2.append(emp4); - - cs->endLogging(); - - //serializeChangeSummary(cs); - - xmh->save(doc,"emptycs3.xml"); - - if (!comparefiles("emptycs3.xml","emptycs3.txt"))return 0; - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "empty change summary save failed" << e << endl; - return 0; - } -} - - -int sdotest::definetest() -{ - try { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - TypeDefinitions* ts = new TypeDefinitions(); - if (ts) delete ts; - ts = new TypeDefinitions(); - - - TypeDefinition* td = new TypeDefinition(); - - td->setName("MySmallObject"); - td->setUri("MyNameSpace"); - td->setIsDataType(false); - - TypeDefinition* td2 = new TypeDefinition(); - td2->setName("MyOtherObject"); - td2->setUri("MyNameSpace"); - td2->setIsDataType(false); - - - PropertyDefinition* pd = new PropertyDefinition(); - pd->setName("MyIntegerProperty"); - pd->setType("commonj.sdo","Integer"); - - PropertyDefinition* pd2 = new PropertyDefinition(); - pd2->setName("MyObjectProperty"); - pd2->setType("MyNameSpace","MyOtherObject"); - pd2->setIsMany(true); - - td->addPropertyDefinition(*pd); - - td->addPropertyDefinition(*pd2); - - ts->addTypeDefinition(*td); - ts->addTypeDefinition(*td2); - - // should have an object of type MySmallObject, containing - // a single integer called MyIntegerProperty, and a list of - // objects called MyObjectProperty - of type MyOtherObject - - xsh->defineTypes(*ts); - - delete td; - delete td2; - delete ts; - delete pd; - delete pd2; - - DataObjectPtr dob = mdg->create("MyNameSpace","MySmallObject"); - dob->setInteger("MyIntegerProperty",43); - - dob->createDataObject("MyObjectProperty"); - dob->createDataObject("MyObjectProperty"); - DataObjectList& dl = dob->getList("MyObjectProperty"); - - if (dl.size() != 2) - { - if (!silent) cout << "Define test list size is wrong" << endl; - return 0; - } - int value = dob->getInteger("MyIntegerProperty"); - if (value != 43) - { - if (!silent) cout << "Define test integer value is wrong" << endl; - return 0; - } - - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "define test failed" << endl << e << endl; - return 0; - } - -} - - -int sdotest::stocktest() -{ - return sdotest::testany("stock.wsdl",0,"stock.xml",0); -} - - -/****************************************************** -int sdotest::stocktest() -{ - int i,j; - - try { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("stock.wsdl"); - - if ((i = xsh->getErrorCount()) > 0) - { - cout << "PROBLEM: Testany XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - - TypeList tl = mdg->getTypes(); - - printf("***** TYPES BEFORE RESOLVE **********************************\n"); - - for (i=0;iloadFile("stock.xml"); - - if ((i = xmh->getErrorCount()) > 0) - { - cout << "TestAny XML found errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - - - DataObjectPtr dob = doc->getRootDataObject(); - printDataObject(stdout, dob); - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in TestAny" << e << endl; - return 0; - } -} -**************************************************/ - - -int sdotest::pete() -{ - - - unsigned int i,j; - - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("pete.xsd"); - - if ((i = xsh->getErrorCount()) > 0) - { - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - return 0; - } - - - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - XMLDocumentPtr doc = xmh->loadFile("pete.xml"); - - if ((i = xmh->getErrorCount()) > 0) - { - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - return 0; - } - - TypeList tl = mdg->getTypes(); - - //printf("***** TYPES **********************************************\n"); - - for (i=0;igetRootDataObject(); - float f = dob->getFloat("Stock[1]/Last"); - //printf("Float is %2.3f \r\n",f); - return 1; - - } - catch (SDORuntimeException e) - { - cout << "Exception in Pete" << e << endl; - return 0; - } -} - -int sdotest::xhtml1() -{ - - - int i,j; - - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("Atom1.0.xsd"); - // SDOUtils::printTypes(cout, xsh->getDataFactory()); - - if ((i = xsh->getErrorCount()) > 0) - { - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - return 0; - } - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - XMLDocumentPtr doc = xmh->loadFile("xhtml_in.xml"); - - if ((i = xmh->getErrorCount()) > 0) - { - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - return 0; - } - - - //DataObjectPtr dob = doc->getRootDataObject(); - - //ofstream myout("myfile"); - - //if (dob)SDOUtils::printDataObject(myout , dob); - - xmh->save(doc,"xhtml_out.xml"); - - return comparefiles("xhtml_out.xml" ,"xhtml_out.txt"); - - - } - catch (SDORuntimeException e) - { - cout << "Exception in xhtml1" << e << endl; - return 0; - } -} - -int sdotest::testXPath() -{ - - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("company.xsd"); - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("b46617b.xml", "companyNS"); - DataObjectPtr newdob = myXMLDocument->getRootDataObject(); - - DataObjectPtr dop = newdob->getDataObject("departments[name='Shoe']/employees[name='Sarah Jones']"); - string x = "departments[name='Shoe']/employees[name='Sarah Jones']"; - dop = newdob->getDataObject(x); - - return 1; - - } - catch (SDORuntimeException e) - { - cout << "Exception in testXPath" << e << endl; - return 0; - } -} - -int sdotest::jira945() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Employee"); - mdg->addPropertyToType("myspace","Employee","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","employees", - "myspace","Employee", true, false, true); - - const Type& tc = mdg->getType("myspace","Company"); - - DataObjectPtr com = mdg->create((Type&)tc); - com->setCString("name","acme"); - - const Type& te = mdg->getType("myspace","Employee"); - DataObjectPtr emp = mdg->create(te); - emp->setCString("name", "Mr Expendible"); - - const int propIndex = tc.getPropertyIndex("employees"); - - // This fails with Jira945 - DataObjectList& emps = com->getList(propIndex); - - emps.append(emp); - - return 1; - - } - catch (SDORuntimeException e) - { - cout << "Exception in test jira945" << e << endl; - return 0; - } -} -int sdotest::tuscany963() -{ - - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("tuscany963.xsd"); - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("tuscany963.xml"); - myXMLHelper->save(myXMLDocument, "tuscany963.out.xml"); - - - return comparefiles("tuscany963.out.xml" ,"tuscany963.out.xml.txt"); - - - } - catch (SDORuntimeException e) - { - cout << "Exception in tuscany963" << e << endl; - return 0; - } -} - -int sdotest::tuscany562() -{ - DataFactoryPtr mdg = DataFactory::getDataFactory(); - mdg->addType("myspace", "Base"); - mdg->addType("myspace", "Extended"); - const Type &base = mdg->getType("myspace", "Base"), - &extended = mdg->getType("myspace", "Extended"); - mdg->setBaseType(extended, base); - try - { - mdg->setBaseType(extended, extended); - cout << "Exception should have been thrown in tuscany562 (1)" << endl; - return 0; - } - catch (SDOIllegalArgumentException e) - {} - try - { - mdg->setBaseType(base, extended); - cout << "Exception should have been thrown in tuscany562 (2)" << endl; - return 0; - } - catch (SDOIllegalArgumentException e) - {} - return 1; -} - -int sdotest::upandatom() -{ - - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - DataFactoryPtr df = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("Atom/Atom1.0.xsd"); - - XSDHelperPtr xh = HelperProvider::getXSDHelper(df); - xh->defineFile("Atom/Atom1.0.xsd"); - - DataObjectPtr block = mdg->create("http://www.w3.org/1999/xhtml", "Block"); - DataObjectPtr div = df->create("http://www.w3.org/1999/xhtml", "div"); - - block->setDataObject("div", div); - return 1; - - } - catch (SDORuntimeException e) - { - cout << "Exception in upandatom" << e << endl; - return 0; - } -} - -int sdotest::jira980() -{ - - // Load both schema files into a single data factory and create content - // within an open type root element. - try - { - // Data factory to load both schema files. - DataFactoryPtr df_both = DataFactory::getDataFactory(); - XSDHelperPtr xsh_both = HelperProvider::getXSDHelper(df_both); - - // Load a root element definition, then the three animal types. - xsh_both->defineFile("jira980_jungle.xsd"); - xsh_both->defineFile("jira980_animaltypes.xsd"); - - // Create three animals based on the preceding types. - DataObjectPtr baloo = df_both->create("", "bearType"); - baloo->setCString("name", "Mummy bear"); - baloo->setInteger("weight", 700); - - DataObjectPtr bagheera = df_both->create("", "pantherType"); - bagheera->setCString("name", "Bagheera"); - bagheera->setCString("colour", "inky black"); - - DataObjectPtr kaa = df_both->create("", "snakeType"); - kaa->setCString("name", "Kaa"); - kaa->setInteger("length", 25); - - // Create an output document - XMLHelperPtr xmh_both = HelperProvider::getXMLHelper(df_both); - XMLDocumentPtr document_both = xmh_both->createDocument(); - - DataObjectPtr jungle = document_both->getRootDataObject(); - - // Add the three animals as children of the document root. In this test - // that root will be a "jungle" element. - jungle->setDataObject("bear", baloo); - jungle->setDataObject("panther", bagheera); - jungle->setDataObject("snake", kaa); - - xmh_both->save(document_both, "jira980_jungle_out.xml"); - if (!comparefiles("jira980_jungle_out.txt" ,"jira980_jungle_out.xml")) - { - return 0; - } - } - catch (SDORuntimeException e) - { - cout << "Exception in jira980" << e << endl; - return 0; - } - - - // Load the schema files into two different data factories and then create - // content within an open type root element. - try - { - // Load the schema files into two different data factories. - DataFactoryPtr df_1 = DataFactory::getDataFactory(); - DataFactoryPtr df_2 = DataFactory::getDataFactory(); - - XSDHelperPtr xsh_1 = HelperProvider::getXSDHelper(df_1); - XSDHelperPtr xsh_2 = HelperProvider::getXSDHelper(df_2); - - xsh_1->defineFile("jira980_jungle.xsd"); - xsh_2->defineFile("jira980_animaltypes.xsd"); - - // Create three animals based on the preceding types. - DataObjectPtr baloo = df_2->create("", "bearType"); - baloo->setCString("name", "Mummy bear"); - baloo->setInteger("weight", 700); - - DataObjectPtr bagheera = df_2->create("", "pantherType"); - bagheera->setCString("name", "Bagheera"); - bagheera->setCString("colour", "inky black"); - - DataObjectPtr kaa = df_2->create("", "snakeType"); - kaa->setCString("name", "Kaa"); - kaa->setInteger("length", 25); - - // Create an output document - XMLHelperPtr xmh_1 = HelperProvider::getXMLHelper(df_1); - XMLDocumentPtr document_1 = xmh_1->createDocument(); - - DataObjectPtr jungle = document_1->getRootDataObject(); - - // Add the three animals as children of the document root. In this test - // that root will be a "jungle" element. - jungle->setDataObject("bear", baloo); - jungle->setDataObject("panther", bagheera); - jungle->setDataObject("snake", kaa); - - xmh_1->save(document_1, "jira980_splitJungle_out.xml"); - if (!comparefiles("jira980_splitJungle_out.txt" ,"jira980_splitJungle_out.xml")) - { - return 0; - } - } - catch (SDORuntimeException e) - { - cout << "Exception in jira980" << e << endl; - return 0; - } - - // Load both schema files into a single data factory and create content - // within an open type root element with mixed ie sequenced) content. - try - { - // Data factory to load both schema files. - DataFactoryPtr df_both = DataFactory::getDataFactory(); - XSDHelperPtr xsh_both = HelperProvider::getXSDHelper(df_both); - - // Load a root element definition, then the three animal types. - xsh_both->defineFile("jira980_mixedJungle.xsd"); - xsh_both->defineFile("jira980_animaltypes.xsd"); - - // Create three animals based on the preceding types. - DataObjectPtr baloo = df_both->create("", "bearType"); - baloo->setCString("name", "Mummy bear"); - baloo->setInteger("weight", 700); - - DataObjectPtr bagheera = df_both->create("", "pantherType"); - bagheera->setCString("name", "Bagheera"); - bagheera->setCString("colour", "inky black"); - - DataObjectPtr kaa = df_both->create("", "snakeType"); - kaa->setCString("name", "Kaa"); - kaa->setInteger("length", 25); - - // Create an output document - XMLHelperPtr xmh_both = HelperProvider::getXMLHelper(df_both); - XMLDocumentPtr document_both = xmh_both->createDocument(); - - DataObjectPtr mixedJungle = document_both->getRootDataObject(); - - // Add the three animals as children of the document root. In this test - // that root will be a "mixedJungle" element. - mixedJungle->setDataObject("bear", baloo); - mixedJungle->setDataObject("panther", bagheera); - mixedJungle->setDataObject("snake", kaa); - - xmh_both->save(document_both, "jira980_mixedJungle_out.xml"); - return comparefiles("jira980_mixedJungle_out.txt" ,"jira980_mixedJungle_out.xml"); - - } - - catch (SDORuntimeException e) - { - cout << "Exception in jira980" << e << endl; - return 0; - } - -} - -int sdotest::typedefinitionstest() -{ - - // We re-use the parsed types from the company schema - - - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("company.xsd"); - - XSDHelperPtr clonedHelper = HelperProvider::getXSDHelper(); - clonedHelper->defineTypes(xsh->getDefinedTypes()); - - xsh->generateFile(mdg->getTypes(),"typedefs.xsd", "companyNS", 0); - xsh->generateFile(clonedHelper->getDataFactory()->getTypes(),"typedefs_cloned.xsd", "companyNS", 0); - - return comparefiles("typedefs_cloned.xsd" ,"typedefs.xsd"); - - - } - catch (SDORuntimeException e) - { - cout << "Exception in typedefinitionstest" << e << endl; - return 0; - } -} - - -int sdotest::eBayTest() -{ - - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - cout << "parsing" <defineFile("eBaySvc.wsdl"); - cout << "parsed" <defineTypes(xsh->getDefinedTypes()); - cout << "cloned" <defineFile("company.xsd"); - - - DataObjectPtr comp = mdg->create("companyNS", "CompanyType"); - DataObjectPtr dept = comp->createDataObject("departments"); - DataObjectPtr ron = dept->createDataObject("employees"); - ron->setCString("name", "Ron"); - comp->setDataObject("employeeOfTheMonth", ron); - comp = NULL; - return 1; - } - catch (SDORuntimeException e) - { - cout << "Exception in jira1174" << e << endl; - return 0; - } -} - -int sdotest::jira1238() -{ - - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("overlappingtypes.xsd"); - - mdg->getType("http://www.example.org/AnnonTypes", "Overlapping"); - mdg->getType("http://www.example.org/AnnonTypes", "Overlapping1"); - return 1; - } - catch (SDORuntimeException e) - { - cout << "Exception in jira1238" << e << endl; - return 0; - } -} - -int sdotest::loadWithoutSchema() -{ - - try { - XMLHelperPtr xmh = HelperProvider::getXMLHelper(); - - XMLDocumentPtr doc = xmh->loadFile("pete.xml"); - xmh->save(doc, "noschemaout.xml"); - return comparefiles("noschemaout.xml" ,"noschema.xml"); - - } - catch (SDORuntimeException e) - { - cout << "Exception in loadWithoutSchema" << e << endl; - return 0; - } -} - -int sdotest::jira445() -{ - - try { - XSDHelperPtr xsh = HelperProvider::getXSDHelper(); - XMLHelperPtr xmh = HelperProvider::getXMLHelper(xsh->getDataFactory()); - xsh->defineFile("fidelity.xsd"); - XMLDocumentPtr doc = xmh->loadFile("fidelity.xml"); - xmh->save(doc, "jira445out.xml"); - return comparefiles("jira445out.xml" ,"jira445expected.xml"); - - } - catch (SDORuntimeException e) - { - cout << "Exception in jira445" << e << endl; - return 0; - } -} - -int sdotest::jira1112() -{ - - try { - XSDHelperPtr xsh = HelperProvider::getXSDHelper(); - XMLHelperPtr xmh = HelperProvider::getXMLHelper(xsh->getDataFactory()); - xsh->defineFile("types.xsd"); - unsigned int i,j; - if ((i = xsh->getErrorCount()) > 0) - { - cout << "types.xsd reported some errors: " <getErrorMessage(j) <getDataFactory()->create("http://www.test.com/info","personType"); - DataObjectPtr name = person->createDataObject("name"); - name->setCString("first", "Will"); - name->setCString("last", "Shakespeare"); - - DataObjectPtr add = xsh->getDataFactory()->create("http://Component" , "add"); - add->setDataObject("person", person); - - XMLDocumentPtr doc = xmh->createDocument(add, "", "BOGUS"); - xmh->save(doc, "jira1112out.xml", 2); - return comparefiles("jira1112out.xml" ,"jira1112expected.xml"); - - } - catch (SDORuntimeException e) - { - cout << "Exception in jira1112" << e << endl; - return 0; - } -} -int sdotest::elementFormDefaultQualifiedSequence() -{ - - try { - XSDHelperPtr xsh = HelperProvider::getXSDHelper(); - XMLHelperPtr xmh = HelperProvider::getXMLHelper(xsh->getDataFactory()); - xsh->defineFile("elementFormDefaultQualifiedSeq.xsd"); - unsigned int i,j; - if ((i = xsh->getErrorCount()) > 0) - { - cout << "elementFormDefaultQualifiedSeq.xsd reported some errors: " <getErrorMessage(j) <getDataFactory()->create("test","xT"); - DataObjectPtr a = x->createDataObject("a"); - a->setCString("a1.1", "test data"); - - XMLDocumentPtr doc = xmh->createDocument(a, "", "a"); - xmh->save(doc, "elementFormDefaultQualifiedSeq_out.xml", 2); - return comparefiles("elementFormDefaultQualifiedSeq_out.xml" ,"elementFormDefaultQualifiedSeq_expected.xml"); - } - catch (SDORuntimeException e) - { - cout << "Exception in elementFormDefaultQualifiedSequence: " << e << endl; - return 0; - } -} - -int sdotest::xsiTypeAbstract() -{ - - try { - XSDHelperPtr xsh = HelperProvider::getXSDHelper(); - XMLHelperPtr xmh = HelperProvider::getXMLHelper(xsh->getDataFactory()); - xsh->defineFile("xsiTypeAbstract.xsd"); - unsigned int i,j; - if ((i = xsh->getErrorCount()) > 0) - { - cout << "xsiTypeAbstract.xsd reported some errors: " <getErrorMessage(j) <getDataFactory()->create("","X"); - DataObjectPtr concrete = xsh->getDataFactory()->create("","concreteType"); - x->setDataObject("abstract", concrete); - - XMLDocumentPtr doc = xmh->createDocument(x, "", "X"); - xmh->save(doc, "xsiTypeAbstract_out.xml", 2); - return comparefiles("xsiTypeAbstract_out.xml" ,"xsiTypeAbstract_expected.xml"); - } - catch (SDORuntimeException e) - { - cout << "Exception in xsiTypeAbstract: " << e << endl; - return 0; - } -} - -int sdotest::nullExtendedPrimitive() -{ - - try { - XSDHelperPtr xsh = HelperProvider::getXSDHelper(); - XMLHelperPtr xmh = HelperProvider::getXMLHelper(xsh->getDataFactory()); - xsh->defineFile("nullExtendedPrimitive.xsd"); - unsigned int i,j; - if ((i = xsh->getErrorCount()) > 0) - { - cout << "nullExtendedPrimitive.xsd reported some errors: " <getErrorMessage(j) <getDataFactory()); - - XMLDocumentPtr doc = xmh->loadFile("nullExtendedPrimitive.xml"); - - //cout << doc->getRootDataObject() < - - -someone diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/simple.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/simple.xsd deleted file mode 100644 index f31d6e21d2..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/simple.xsd +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/stock.wsdl b/branches/sdo-cpp-pre2.1/runtime/core/test/stock.wsdl deleted file mode 100644 index d465f1beb2..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/stock.wsdl +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Enter symbols, seperated by space, Quotes delayed in 20 minutes. - - - - - Enter one symbol, quote delayed in 20 minutes. - - - - - Get Dow, Nasdaq, S&P500 index. - - - - - Enter symbols, seperated by space, Real-Time ECN quote. - - - - - - - Enter symbols, seperated by space, Quotes delayed in 20 minutes. - - - - - Enter one symbol, quote delayed in 20 minutes. - - - - - Get Dow, Nasdaq, S&P500 index. - - - - - Enter symbols, seperated by space, Real-Time ECN quote. - - - - - - - Enter symbols, seperated by space, Quotes delayed in 20 minutes. - - - - - Enter one symbol, quote delayed in 20 minutes. - - - - - Get Dow, Nasdaq, S&P500 index. - - - - - Enter symbols, seperated by space, Real-Time ECN quote. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/stock.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/stock.xml deleted file mode 100644 index 435fc549ad..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/stock.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - -IBM -<big><b>82.72</b></big> - -<img width="10" height="14" border="0" src="http://us.i1.yimg.com/us.yimg.com/i/us/fi/03rd/down_r.gif" alt="Down">&nbsp;<b style="color:#cc0000;">0.17 (0.21%)</b> -82.89 -82.49 -N/A -N/A -95.94 -82.40 - 82.80 -72.50 - 89.94 -1,568,200 -5,301,380 -128.25B -16.15 -5.12 -1.20 (1.40%) - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/stock_wsdl.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/stock_wsdl.txt deleted file mode 100644 index 47a11b4d3b..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/stock_wsdl.txt +++ /dev/null @@ -1,47 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://ws.invesbot.com/#GetECNQuotes -Property:symbols of type String -Type:http://ws.invesbot.com/#GetECNQuotesResponse -Property:GetECNQuotesResult of type GetECNQuotesResult -Type:http://ws.invesbot.com/#GetECNQuotesResult -Type:http://ws.invesbot.com/#GetMarketIndex -Type:http://ws.invesbot.com/#GetMarketIndexResponse -Property:GetMarketIndexResult of type GetMarketIndexResult -Type:http://ws.invesbot.com/#GetMarketIndexResult -Type:http://ws.invesbot.com/#GetQuote -Property:symbol of type String -Type:http://ws.invesbot.com/#GetQuoteResponse -Property:GetQuoteResult of type GetQuoteResult -Type:http://ws.invesbot.com/#GetQuoteResult -Type:http://ws.invesbot.com/#GetQuotes -Property:symbols of type String -Type:http://ws.invesbot.com/#GetQuotesResponse -Property:GetQuotesResult of type GetQuotesResult -Type:http://ws.invesbot.com/#GetQuotesResult -Type:http://ws.invesbot.com/#RootType -Property:GetQuotes of type GetQuotes -Property:GetQuotesResponse of type GetQuotesResponse -Property:GetQuote of type GetQuote -Property:GetQuoteResponse of type GetQuoteResponse -Property:GetMarketIndex of type GetMarketIndex -Property:GetMarketIndexResponse of type GetMarketIndexResponse -Property:GetECNQuotes of type GetECNQuotes -Property:GetECNQuotesResponse of type GetECNQuotesResponse -*******************************END TYPES****************** diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/stock_xml.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/stock_xml.txt deleted file mode 100644 index 6aa493dfa3..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/stock_xml.txt +++ /dev/null @@ -1,127 +0,0 @@ -***** TYPES AFTER RESOLVE********************************* -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://ws.invesbot.com/#GetECNQuotes -Property:symbols of type String -Type:http://ws.invesbot.com/#GetECNQuotesResponse -Property:GetECNQuotesResult of type GetECNQuotesResult -Type:http://ws.invesbot.com/#GetECNQuotesResult -Type:http://ws.invesbot.com/#GetMarketIndex -Type:http://ws.invesbot.com/#GetMarketIndexResponse -Property:GetMarketIndexResult of type GetMarketIndexResult -Type:http://ws.invesbot.com/#GetMarketIndexResult -Type:http://ws.invesbot.com/#GetQuote -Property:symbol of type String -Type:http://ws.invesbot.com/#GetQuoteResponse -Property:GetQuoteResult of type GetQuoteResult -Type:http://ws.invesbot.com/#GetQuoteResult -Type:http://ws.invesbot.com/#GetQuotes -Property:symbols of type String -Type:http://ws.invesbot.com/#GetQuotesResponse -Property:GetQuotesResult of type GetQuotesResult -Type:http://ws.invesbot.com/#GetQuotesResult -Type:http://ws.invesbot.com/#RootType -Property:GetQuotes of type GetQuotes -Property:GetQuotesResponse of type GetQuotesResponse -Property:GetQuote of type GetQuote -Property:GetQuoteResponse of type GetQuoteResponse -Property:GetMarketIndex of type GetMarketIndex -Property:GetMarketIndexResponse of type GetMarketIndexResponse -Property:GetECNQuotes of type GetECNQuotes -Property:GetECNQuotesResponse of type GetECNQuotesResponse -*******************************END TYPES****************** -===== DataObject contents ===== -GetQuotesResult:dataObject -===== Sequenced DataObject contents ===== -Setting of DO property StockQuotes[0]= -===== Sequenced DataObject contents ===== -Setting of DO property StockQuote[0]= -===== Sequenced DataObject contents ===== -Setting of DO property Symbol[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:IBM -===== End Sequenced DataObject contents = -Setting of DO property Price[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:82.72 -===== End Sequenced DataObject contents = -Setting of DO property Time[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:11:41AM ET -===== End Sequenced DataObject contents = -Setting of DO property Change[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:Down 0.17 (0.21%) -===== End Sequenced DataObject contents = -Setting of DO property PrevClose[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:82.89 -===== End Sequenced DataObject contents = -Setting of DO property Open[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:82.49 -===== End Sequenced DataObject contents = -Setting of DO property Bid[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:N/A -===== End Sequenced DataObject contents = -Setting of DO property Ask[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:N/A -===== End Sequenced DataObject contents = -Setting of DO property YearTarget[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:95.94 -===== End Sequenced DataObject contents = -Setting of DO property DayRange[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:82.40 - 82.80 -===== End Sequenced DataObject contents = -Setting of DO property YearRange[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:72.50 - 89.94 -===== End Sequenced DataObject contents = -Setting of DO property Volume[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:1,568,200 -===== End Sequenced DataObject contents = -Setting of DO property AvgVol[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:5,301,380 -===== End Sequenced DataObject contents = -Setting of DO property MarketCap[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:128.25B -===== End Sequenced DataObject contents = -Setting of DO property PE[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:16.15 -===== End Sequenced DataObject contents = -Setting of DO property EPS[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:5.12 -===== End Sequenced DataObject contents = -Setting of DO property DivYield[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:1.20 (1.40%) -===== End Sequenced DataObject contents = -===== End Sequenced DataObject contents = -===== End Sequenced DataObject contents = -===== End Sequenced DataObject contents = - -===== End DataObject ===== diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/t2/include3.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/t2/include3.xsd deleted file mode 100644 index c661f6871e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/t2/include3.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother.xsd deleted file mode 100644 index 3332ed6b53..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother1.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother1.xsd deleted file mode 100644 index 3023ffaca5..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother1.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother2.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother2.xsd deleted file mode 100644 index 5c05afdf36..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother2.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/test/include3.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/test/include3.xsd deleted file mode 100644 index 8b7ca5822b..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/test/include3.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother.xsd deleted file mode 100644 index 21f3ff25cb..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother1.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother1.xsd deleted file mode 100644 index 3023ffaca5..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother1.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother2.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother2.xsd deleted file mode 100644 index 5c05afdf36..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother2.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/test2/includeother3.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/test2/includeother3.xsd deleted file mode 100644 index 8b7ca5822b..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/test2/includeother3.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/testabstract.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/testabstract.txt deleted file mode 100644 index 80c1d03afe..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/testabstract.txt +++ /dev/null @@ -1,5 +0,0 @@ -Normal unsupportedoperation for creation of abstract type -Publication is of type BookType -Publication is of type MagazineType -Book is of type BookType -Magazine is of type MagazineType diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/testerrors.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/testerrors.txt deleted file mode 100644 index fcecdf5bde..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/testerrors.txt +++ /dev/null @@ -1,5 +0,0 @@ -XSD reported some errors: -Opening and ending tag mismatch: complexType line 44 and schema - -Premature end of data in tag schema line 22 - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/testinc2.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/testinc2.txt deleted file mode 100644 index 837559562e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/testinc2.txt +++ /dev/null @@ -1,21 +0,0 @@ -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://example.org/Calculator#RootType -Type:http://example.org/CalculatorTypes#AddArguments -Property:a -Property:b -Type:http://example.org/CalculatorTypes#RootType diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/testopen.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/testopen.txt deleted file mode 100644 index f1eef1ab5e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/testopen.txt +++ /dev/null @@ -1,24 +0,0 @@ -Normal exception for setting null on undefined prop -Open Type string value: Value Of Open String -Open Type boolean value: 1 -EMP1 type property: name ( many? 0) of type String -EMP1 type property: SN ( many? 0) of type String -EMP1 type property: manager ( many? 0) of type Boolean -EMP1 inst property: name (many? 0) of type String -EMP1 inst property: SN (many? 0) of type String -EMP1 inst property: manager (many? 0) of type Boolean -EMP1 inst property: openstring (many? 0) of type String -EMP1 inst property: openboolean (many? 0) of type Boolean -EMP1 inst property: opentypelist (many? 1) of type Short -EMP1 inst property: name (many? 0) of type String -EMP1 inst property: SN (many? 0) of type String -EMP1 inst property: manager (many? 0) of type Boolean -EMP1 inst property: openboolean (many? 0) of type Boolean -EMP1 inst property: opentypelist (many? 1) of type Short -EMP1 inst property: name (many? 0) of type String -EMP1 inst property: SN (many? 0) of type String -EMP1 inst property: manager (many? 0) of type Boolean -EMP1 inst property: opentypelist (many? 1) of type Short -EMP1 inst property: name (many? 0) of type String -EMP1 inst property: SN (many? 0) of type String -EMP1 inst property: manager (many? 0) of type Boolean diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/testopen3.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/testopen3.xml deleted file mode 100644 index b16a75802e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/testopen3.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/testorder.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/testorder.txt deleted file mode 100644 index 4f46cbfecf..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/testorder.txt +++ /dev/null @@ -1,19 +0,0 @@ -Type:#Address -Property:name -Property:street -Property:city -Type:#RootType -Property:employee -Type:#UKAddress -Property:value -Property:postcode -Type:#USAddress -Property:value -Property:zip -Type:#fullpersoninfo -Property:address -Property:city -Property:country -Type:#personinfo -Property:firstname -Property:lastname diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/teststyles.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/teststyles.txt deleted file mode 100644 index 52de3ffc6a..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/teststyles.txt +++ /dev/null @@ -1,93 +0,0 @@ -*****STYLE Style1.xsd -Type: commonj.sdo#BigDecimal -Type: commonj.sdo#BigInteger -Type: commonj.sdo#Boolean -Type: commonj.sdo#Byte -Type: commonj.sdo#Bytes -Type: commonj.sdo#ChangeSummary -Type: commonj.sdo#Character -Type: commonj.sdo#DataObject -Type: commonj.sdo#Date -Type: commonj.sdo#Double -Type: commonj.sdo#Float -Type: commonj.sdo#Integer -Type: commonj.sdo#Long -Type: commonj.sdo#OpenDataObject -Type: commonj.sdo#Short -Type: commonj.sdo#String -Type: commonj.sdo#URI -Type: libraryNS#RootType -Type: libraryNS#author -Type: libraryNS#available -Type: libraryNS#book -Type: libraryNS#character -Type: libraryNS#isbn -Type: libraryNS#library -Property:book -Type: libraryNS#title -************* -Root is:libraryNS#character -Root is:libraryNS#library -Root is:libraryNS#library -*****STYLE Style2.xsd -Type: commonj.sdo#BigDecimal -Type: commonj.sdo#BigInteger -Type: commonj.sdo#Boolean -Type: commonj.sdo#Byte -Type: commonj.sdo#Bytes -Type: commonj.sdo#ChangeSummary -Type: commonj.sdo#Character -Type: commonj.sdo#DataObject -Type: commonj.sdo#Date -Type: commonj.sdo#Double -Type: commonj.sdo#Float -Type: commonj.sdo#Integer -Type: commonj.sdo#Long -Type: commonj.sdo#OpenDataObject -Type: commonj.sdo#Short -Type: commonj.sdo#String -Type: commonj.sdo#URI -Type: libraryNS#RootType -Type: libraryNS#author -Type: libraryNS#available -Type: libraryNS#book -Type: libraryNS#character -Type: libraryNS#isbn -Type: libraryNS#library -Property:book -Type: libraryNS#title -************* -Root is:libraryNS#character -Root is:libraryNS#library -Root is:libraryNS#library -*****STYLE Style3.xsd -Type: commonj.sdo#BigDecimal -Type: commonj.sdo#BigInteger -Type: commonj.sdo#Boolean -Type: commonj.sdo#Byte -Type: commonj.sdo#Bytes -Type: commonj.sdo#ChangeSummary -Type: commonj.sdo#Character -Type: commonj.sdo#DataObject -Type: commonj.sdo#Date -Type: commonj.sdo#Double -Type: commonj.sdo#Float -Type: commonj.sdo#Integer -Type: commonj.sdo#Long -Type: commonj.sdo#OpenDataObject -Type: commonj.sdo#Short -Type: commonj.sdo#String -Type: commonj.sdo#URI -Type: libraryNS#RootType -Type: libraryNS#author -Type: libraryNS#available -Type: libraryNS#bookType -Type: libraryNS#character -Type: libraryNS#isbn -Type: libraryNS#library -Property:book -Type: libraryNS#title -************* -Root is:libraryNS#character -Root is:libraryNS#library -Root is:libraryNS#library diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/testsubsload.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/testsubsload.txt deleted file mode 100644 index 43c16114c3..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/testsubsload.txt +++ /dev/null @@ -1,7 +0,0 @@ -TEST: TestSubsLoad ========================================== -Publication is of type PublicationType -Publication is of type BookType -Publication is of type MagazineType -Book is of type BookType -Magazine is of type MagazineType -END TEST: TestSubsLoad ====================================== diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/testutils.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/testutils.txt deleted file mode 100644 index 909f91bda8..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/testutils.txt +++ /dev/null @@ -1,100 +0,0 @@ ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO -DataObject type: companyNS#CompanyType - Property: name - Property Type: commonj.sdo#String - Property Value: ACME - Property: employeeOfTheMonth - Property Type: companyNS#EmployeeType - Property Value: not set - Property: departments - Property Type: companyNS#DepartmentType - Value 0 ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO - DataObject type: companyNS#DepartmentType - Property: name - Property Type: commonj.sdo#String - Property Value: Advanced Technologies - Property: location - Property Type: commonj.sdo#String - Property Value: NY - Property: number - Property Type: commonj.sdo#String - Property Value: 123 - Property: employees - Property Type: companyNS#EmployeeType - Value 0 ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO - DataObject type: companyNS#EmployeeType - Property: name - Property Type: commonj.sdo#String - Property Value: Albert - Property: SN - Property Type: commonj.sdo#String - Property Value: E0001 - Property: manager - Property Type: commonj.sdo#Boolean - Property Value: not set - Property: openstring - Property Type: commonj.sdo#String - Property Value: Value Of Open String - Property: openboolean - Property Type: commonj.sdo#Boolean - Property Value: true - Property: openintlist - Property Type: commonj.sdo#Short - Value 0 ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO - DataObject type: commonj.sdo#Short -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do - - Property: opendataobjectlist - Property Type: companyNS#OpenType - Value 0 ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO - DataObject type: companyNS#OpenType - Property: name - Property Type: commonj.sdo#String - Property Value: MyOpenName -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do - - Property: opendataobject - Property Type: companyNS#OpenType ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO - DataObject type: companyNS#OpenType - Property: name - Property Type: commonj.sdo#String - Property Value: MyOpenName -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do - - Value 1 ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO - DataObject type: companyNS#EmployeeType - Property: name - Property Type: commonj.sdo#String - Property Value: Boris - Property: SN - Property Type: commonj.sdo#String - Property Value: E0002 - Property: manager - Property Type: commonj.sdo#Boolean - Property Value: true -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do - - Value 2 ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO - DataObject type: companyNS#EmployeeType - Property: name - Property Type: commonj.sdo#String - Property Value: Carl - Property: SN - Property Type: commonj.sdo#String - Property Value: E0003 - Property: manager - Property Type: commonj.sdo#Boolean - Property Value: not set -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do - -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do - -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.txt deleted file mode 100644 index 025b797d96..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.txt +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.xml deleted file mode 100644 index 47f983d51e..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/travel.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/travel.txt deleted file mode 100644 index 5311a919f8..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/travel.txt +++ /dev/null @@ -1,146 +0,0 @@ -*******************************TYPES********************** -TYPE:#Client -TYPE:#Excursion -TYPE:#Flight -TYPE:#Holiday -TYPE:#Hotel -TYPE:#Party -TYPE:#Person -TYPE:#Room -TYPE:#RootType -TYPE:commonj.sdo#BigDecimal -TYPE:commonj.sdo#BigInteger -TYPE:commonj.sdo#Boolean -TYPE:commonj.sdo#Byte -TYPE:commonj.sdo#Bytes -TYPE:commonj.sdo#ChangeSummary -TYPE:commonj.sdo#Character -TYPE:commonj.sdo#DataObject -TYPE:commonj.sdo#Date -TYPE:commonj.sdo#Double -TYPE:commonj.sdo#Float -TYPE:commonj.sdo#Integer -TYPE:commonj.sdo#Long -TYPE:commonj.sdo#OpenDataObject -TYPE:commonj.sdo#Short -TYPE:commonj.sdo#String -TYPE:commonj.sdo#URI -*******************************END TYPES****************** -*******************************DATA********************** -===== DataObject contents ===== -Flight: list dataObject[0]= -===== DataObject contents ===== -Departure:string:LHR - -Arrival:string:SNG - -flightNo:string:BA243 - -===== End DataObject ===== - -dataObject[1]= -===== DataObject contents ===== -Departure:string:SNG - -Arrival:string:LHR - -flightNo:string:SG561 - -===== End DataObject ===== - -Hotel: list dataObject[0]= -===== DataObject contents ===== -Name:string:Excelsior - -Phone:string:222-3333 - -Room:dataObject -===== DataObject contents ===== -value:string:303 - -booked:boolean:1 - -===== End DataObject ===== - -cardsAccepted:boolean:1 - -===== End DataObject ===== - -dataObject[1]= -===== DataObject contents ===== -Name:string:Seedy Lodge - -Phone:string:888-9999 - -Room:dataObject -===== DataObject contents ===== -value:string:14 - -booked:boolean:1 - -===== End DataObject ===== - -cardsAccepted:boolean:0 - -===== End DataObject ===== - -dataObject[2]= -===== DataObject contents ===== -Name:string:Hilton - -Phone:string:444-5555 - -Room:dataObject -===== DataObject contents ===== -value:string:456 - -booked:boolean:0 - -===== End DataObject ===== - -cardsAccepted:boolean:1 - -===== End DataObject ===== - -Excursion:dataObject -===== DataObject contents ===== -Title:string:Bird Baths of Singapore - -Cost:string:50 - -===== End DataObject ===== - -Client:dataObject -===== DataObject contents ===== -Name:string:Steve - -Address:string:134 Shirley Road - -CreditCard:string:1234-8908-6543-900 - -===== End DataObject ===== - -Party:dataObject -===== DataObject contents ===== -Person: list dataObject[0]= -===== DataObject contents ===== -Name:string:John - -===== End DataObject ===== - -dataObject[1]= -===== DataObject contents ===== -Name:string:Jane - -===== End DataObject ===== - -dataObject[2]= -===== DataObject contents ===== -Name:string:Bill - -===== End DataObject ===== - -===== End DataObject ===== - -===== End DataObject ===== -***************************END DATA********************** diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.out.xml.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.out.xml.txt deleted file mode 100644 index 55bad5b09a..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.out.xml.txt +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xml deleted file mode 100644 index 10b9ecd966..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xsd deleted file mode 100644 index 0cb28ca207..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xsd +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/types.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/types.xsd deleted file mode 100644 index efcfab7b06..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/types.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/userdata.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/userdata.txt deleted file mode 100644 index e24caba194..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/userdata.txt +++ /dev/null @@ -1,10 +0,0 @@ -Expected 0xF1F1F1F1 F1F1F1F1 -Expected 0xF1F1F1F1 F1F1F1F1 -Expected 0x20 00000020 -Expected 0x40020 00040020 -Expected 0 00000000 -Expected 0 00000000 -Expected 120 00000120 -Expected 0 00000000 -Expected 640 00000640 -Expected 0x740 00000740 diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/utils.cpp b/branches/sdo-cpp-pre2.1/runtime/core/test/utils.cpp deleted file mode 100644 index d5facc832b..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/utils.cpp +++ /dev/null @@ -1,553 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* $Rev$ $Date$ */ - -#include - -#pragma warning(disable:4786) - -#include -using namespace std; - -#include "sdotest.h" - -bool sdotest::silent = true; -bool sdotest::ramping = false; - -void sdotest::printOldValues(FILE *f, ChangeSummaryPtr cs, DataObjectPtr dol) -{ - fprintf(f,"===== Old Property Values Begin\n"); - SettingList& sl = cs->getOldValues(dol); - if (sl.size() == 0) - { - fprintf(f,"No Settings found\n"); - } - else - { - for (int j=0;j< sl.size(); j++) - { - fprintf(f,"Property %s",sl[j].getProperty().getName()); - // this could be a many-valued property, and could be one which is - // a data object or a data type... - if (sl[j].getProperty().isMany()) - { - fprintf(f,"[%d]",sl[j].getIndex()); - } - if (!sl[j].isSet()) - { - fprintf(f,"(UNSET)"); - } - if (sl[j].isNull()) - { - fprintf(f,"(ISNULL)"); - } - - fprintf(f," of type "); - switch (sl[j].getProperty().getTypeEnum()) - { - case Type::BooleanType: - fprintf(f,"Boolean:%d\n",sl[j].getBooleanValue()); - break; - case Type::ByteType: - fprintf(f,"Byte:%d\n",sl[j].getByteValue()); - break; - case Type::CharacterType: - fprintf(f,"Character:%d\n",sl[j].getCharacterValue()); - break; - case Type::IntegerType: - fprintf(f,"Integer:%d\n",sl[j].getIntegerValue()); - break; - case Type::ShortType: - fprintf(f,"Short:%d\n",sl[j].getShortValue()); - break; - case Type::DoubleType: - fprintf(f,"Double:%.3f\n",(float)sl[j].getDoubleValue()); - break; - case Type::FloatType: - fprintf(f,"Float:%.3f\n",sl[j].getFloatValue()); - break; - case Type::LongType: - fprintf(f,"Long:%ld\n",sl[j].getIntegerValue()); - break; - case Type::DateType: - fprintf(f,"Date:%d\n",sl[j].getDateValue().getTime()); - break; - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::StringType: - case Type::UriType: - fprintf(f,"String:%s\n",sl[j].getCStringValue()); - break; - case Type::BytesType: - fprintf(f,"Bytes:%s\n",sl[j].getCStringValue()); - break; - case Type::OtherTypes: - case Type::DataObjectType: - case Type::ChangeSummaryType: - { - fprintf(f,"DataObject "); - DataObjectPtr dob = sl[j].getDataObjectValue(); - if (!dob) - { - fprintf(f," - object null or unset\n"); - } - else - { - DataObjectPtr mydo = sl[j].getDataObjectValue(); - if (cs->isDeleted(mydo)) - { - fprintf(f," - object deleted \n"); - printOldValues(f, cs,mydo); - } - else - { - fprintf(f," object still exists \n"); - } - } - } - break; - default: - { - fprintf(f,"Unknown object type\n"); - } - break; - } - fprintf(f,"\n"); - } - } - fprintf(f,"===== Old Property Values End \n"); - return; -} - - -void sdotest::printDataStructure(FILE *f , DataFactory* dd) -{ - TypeList tt = dd->getTypes(); - fprintf(f,"Printing Types\n"); - for (unsigned int i = 0; i < tt.size(); ++i) - { - fprintf(f,"Type %s\n",tt[i].getName()); - PropertyList pl = tt[i].getProperties(); - for (unsigned int j = 0; j < pl.size() ; j++) - { - fprintf(f,"Has Property %s of type %s\n", - pl[j].getName(),pl[j].getType().getName()); - } - } -} - - -void sdotest::printValue(FILE *f, DataObjectPtr dp, const Property& p) -{ - switch (p.getTypeEnum()) - { - case Type::BooleanType: - fprintf(f,"boolean:%d\n",dp->getBoolean(p)); - break; - case Type::ByteType: - fprintf(f,"Byte:%d\n",dp->getByte(p)); - break; - case Type::CharacterType: - fprintf(f,"character:%d\n",dp->getCharacter(p)); - break; - case Type::IntegerType: - fprintf(f,"integer:%d\n",dp->getInteger(p)); - break; - case Type::ShortType: - fprintf(f,"short:%d\n",dp->getShort(p)); - break; - case Type::DoubleType: - fprintf(f,"double:%.3f\n",(float)dp->getDouble(p)); - break; - case Type::FloatType: - fprintf(f,"float:%.3f\n", dp->getFloat(p)); - break; - case Type::LongType: - fprintf(f,"long:%ld\n",dp->getInteger(p)); - break; - case Type::DateType: - fprintf(f,"date:%d\n",dp->getDate(p).getTime()); - break; - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::StringType: - case Type::UriType: - fprintf(f,"string:%s\n", dp->getCString(p)); - break; - case Type::BytesType: - fprintf(f,"bytes:%s\n",dp->getCString(p)); - break; - case Type::OpenDataObjectType: - case Type::DataObjectType: - { - fprintf(f,"dataObject\n" ); - DataObjectPtr dob = dp->getDataObject(p); - if (!dob) - { - fprintf(f," - null or unset\n"); - } - else - { - printDataObject(f, dob); - } - } - break; - case Type::OtherTypes: - case Type::ChangeSummaryType: - default: - { - fprintf(f,"Unknown object type"); - } - break; - } - fprintf(f,"\n"); -} - -void sdotest::printList(FILE *f, DataObjectPtr dp, const Property& p) -{ - DataObjectList& dobl = dp->getList(p); - fprintf(f," list "); - - if (dobl.size() ==0) { - fprintf(f,"(empty)\n"); - return; - } - - for (unsigned int i=0;igetType().isSequencedType()) - { - fprintf(f,"===== Sequenced DataObject contents =====\n"); - SequencePtr sq = dol->getSequence(); - if (sq != 0) - { - for (unsigned int k=0;ksize();k++) - { - if (sq->isText(k)) - { - fprintf(f,"TEXT ELEMENT:%s\n",sq->getCStringValue(k)); - } - else - { - const Property& p = sq->getProperty(k); - if (p.isMany()) - { - unsigned int index = sq->getListIndex(k); - DataObjectList& dl = dol->getList(p); - if (p.getType().isDataType()) - { - fprintf(f,"Setting of property %s[%d]=%s\n", - p.getName(),index,dl.getCString(index)); - } - else - { - fprintf(f,"Setting of DO property %s[%d]=\n", - p.getName(),index); - printDataObject(f,dl.getDataObject(index)); - } - } - else - { - if (p.getType().isDataType()) - { - fprintf(f,"Setting of property %s=%s\n", - p.getName(),dol->getCString(p)); - } - else - { - fprintf(f,"Setting of DO property %s=\n", - p.getName()); - printDataObject(f,dol->getDataObject(p)); - } - } - } - } - } - fprintf(f,"===== End Sequenced DataObject contents =\n"); - } - else - { - fprintf(f,"===== DataObject contents =====\n"); - PropertyList pl = dol->getInstanceProperties(); - - for (unsigned int j=0;j< pl.size(); j++) - { - fprintf(f,"%s:",pl[j].getName()); - // this could be a many-valued property, and could be one which is - // a data object or a data type... - if (pl[j].isMany()) - { - printList(f, dol,pl[j]); - } - else { - printValue(f, dol,pl[j]); - } - } - fprintf(f,"===== End DataObject =====\n"); - } -} - - - -void sdotest::dumpchangesummary(FILE *f, ChangeSummaryPtr cs) -{ - - ChangedDataObjectList& cdol = cs->getChangedDataObjects(); - - // the changed data object list contains only the objects whose properties have - // been changed. - // a changed and subsequently deleted object will not appear, but necessarily its - // container will appear, so we can rebuild it. - - for (unsigned int i=0;i< cdol.size();i++) - { - if (cs->isCreated(cdol[i])) - { - fprintf(f,"Created object in changed list\n"); - // So its in the created list, it must exist in the tree... - fprintf(f,"The object is %s#%s\n", - cdol[i]->getType().getURI(), - cdol[i]->getType().getName()); - } - if (cs->isModified(cdol[i])) - { - fprintf(f,"===== Modified Object Starts\n"); - // get to a DAS data object... - DataObject* temp = cdol[i]; - fprintf(f,"Xpath:%s\n",((DataObject*)temp)->objectToXPath()); - - if (cs->isDeleted(cdol[i])) - { - fprintf(f,"PROBLEM: DELETED OBJECT IN CHANGED LIST: \n"); - // As the item is in the deleted list - its still present.. - fprintf(f,"The type is %s#%s\n", - cdol[i]->getType().getURI(), - cdol[i]->getType().getName()); - } - else { - fprintf(f,"The modified objects type is %s#%s\n", - cdol[i]->getType().getURI(), - cdol[i]->getType().getName()); - - printOldValues(f, cs, cdol[i]); - } - fprintf(f,"=====Modified Object Ends \n"); - } - if (cs->isDeleted(cdol[i])) - { - fprintf(f,"=====Deleted Object Starts \n"); - printOldValues(f, cs, cdol[i]); - fprintf(f,"=====Deleted Object Ends \n"); - } - } -} - - -int sdotest::comparefiles(char* fn1, char*fn2) -{ - FILE *f1, *f2; - f1 = fopen(fn1,"r+"); - if (f1 == 0) - { - if (!silent) cout << "Cannot open file:" << fn1 << endl; - return 0; - } - f2 = fopen(fn2,"r+"); - if (f2 == 0) - { - if (!silent) cout << "Cannot open file:" << fn2 << endl; - if (ramping) - { - cout << "Creating it" << endl; - f2 = fopen(fn2,"w+"); - if (f2 == 0) - { - cout << "Cannot ramp up - failed on " << fn2 << endl; - return 0; - } - int c; - do - { - c = fgetc(f1); - if (!feof(f1)) fputc(c,f2); - else break; - } while (1); - fclose(f1); - fclose(f2); - return 1; - } - else - { - fclose(f1); - return 0; - } - } - - while (!feof(f1)) - { - if (fgetc(f1) != fgetc(f2)) - { - fclose(f1); - fclose(f2); - return 0; - } - } - fclose (f1); - - if (!feof(f2)) - { - fclose(f2); - return 0; - } - - fclose(f2); - return 1; -} - - -int sdotest::printseq(FILE *f, SequencePtr sptr) -{ - fprintf(f, "======================================\n"); - for (unsigned int i=0;i< sptr->size();i++) - { - try { - if (!sptr->isText(i)) - { - const Property& prp = sptr->getProperty(i); - if (!strcmp(prp.getType().getName(),"Department")) - { - DataObjectPtr pdep = sptr->getDataObjectValue(i); - if (pdep != 0) - { - const char * cs = pdep->getCString("name"); - if (cs != 0) - { - fprintf(f, "%s\n",cs); - } - else - { - fprintf(f," is empty \n"); - } - } - } - else - { - const char* stx = sptr->getCStringValue(i); - if (stx != 0) - { - fprintf(f,"%s\n",stx); - } - else - { - fprintf(f," is empty \n"); - } - } - } - else - { - const char* st = sptr->getCStringValue(i); - if (st != 0) - { - fprintf(f,"%s\n", st); - } - else - { - fprintf(f," is empty \n"); - } - } - } - catch (SDOPropertyNotSetException) - { - if (!silent) cout << "WRONG - got a property not set exception!!!" << endl; - return 0; - } - } - fprintf(f, "======================================\n"); - return 1; -} diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_in.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_in.xml deleted file mode 100644 index e897ece9c1..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_in.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - dive into mark - - A <em>lot</em> of effort - went into making this effortless - - 2005-07-31T12:29:29Z - tag:example.org,2003:3 - - - Copyright (c) 2003, Mark Pilgrim - - Example Toolkit - - - Atom draft-07 snapshot - - - tag:example.org,2003:3.2397 - 2005-07-31T12:29:29Z - 2003-12-13T08:29:29-04:00 - - Mark Pilgrim - http://example.org/ - f8dy@example.com - - - Sam Ruby - - - Joe Gregorio - - -
-

[Update: The Atom draft is finished.]

-

Hello

-
-
-
-
\ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_out.txt b/branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_out.txt deleted file mode 100644 index 05f82bc258..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_out.txt +++ /dev/null @@ -1,41 +0,0 @@ - - - dive into mark - - A lot of effort - went into making this effortless - - 2005-07-31T12:29:29Z - tag:example.org,2003:3 - - - Copyright (c) 2003, Mark Pilgrim - - Example Toolkit - - - Atom draft-07 snapshot - - - tag:example.org,2003:3.2397 - 2005-07-31T12:29:29Z - 2003-12-13T08:29:29-04:00 - - Mark Pilgrim - http://example.org/ - f8dy@example.com - - - Sam Ruby - - - Joe Gregorio - - - - [Update: The Atom draft is finished.] - Hello - - - - diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract.xsd b/branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract.xsd deleted file mode 100644 index 51e11baf49..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract.xsd +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract_expected.xml b/branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract_expected.xml deleted file mode 100644 index 5bb847dcc3..0000000000 --- a/branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract_expected.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - -- cgit v1.2.3