00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #include <xsd/cxx/pre.hxx>
00040
00041 #include "ConfigurationXMLSchema.h"
00042
00043 namespace asr_object_database
00044 {
00045
00046
00047
00048 const configuration::database_sequence& configuration::
00049 database () const
00050 {
00051 return this->database_;
00052 }
00053
00054 configuration::database_sequence& configuration::
00055 database ()
00056 {
00057 return this->database_;
00058 }
00059
00060 void configuration::
00061 database (const database_sequence& s)
00062 {
00063 this->database_ = s;
00064 }
00065
00066
00067
00068
00069
00070 const database::uniqueName_type& database::
00071 uniqueName () const
00072 {
00073 return this->uniqueName_.get ();
00074 }
00075
00076 database::uniqueName_type& database::
00077 uniqueName ()
00078 {
00079 return this->uniqueName_.get ();
00080 }
00081
00082 void database::
00083 uniqueName (const uniqueName_type& x)
00084 {
00085 this->uniqueName_.set (x);
00086 }
00087
00088 void database::
00089 uniqueName (::std::unique_ptr< uniqueName_type > x)
00090 {
00091 this->uniqueName_.set (std::move (x));
00092 }
00093
00094 const database::basenameMatchPattern_type& database::
00095 basenameMatchPattern () const
00096 {
00097 return this->basenameMatchPattern_.get ();
00098 }
00099
00100 database::basenameMatchPattern_type& database::
00101 basenameMatchPattern ()
00102 {
00103 return this->basenameMatchPattern_.get ();
00104 }
00105
00106 void database::
00107 basenameMatchPattern (const basenameMatchPattern_type& x)
00108 {
00109 this->basenameMatchPattern_.set (x);
00110 }
00111
00112 void database::
00113 basenameMatchPattern (::std::unique_ptr< basenameMatchPattern_type > x)
00114 {
00115 this->basenameMatchPattern_.set (std::move (x));
00116 }
00117
00118 const database::objectDbRootFolder_type& database::
00119 objectDbRootFolder () const
00120 {
00121 return this->objectDbRootFolder_.get ();
00122 }
00123
00124 database::objectDbRootFolder_type& database::
00125 objectDbRootFolder ()
00126 {
00127 return this->objectDbRootFolder_.get ();
00128 }
00129
00130 void database::
00131 objectDbRootFolder (const objectDbRootFolder_type& x)
00132 {
00133 this->objectDbRootFolder_.set (x);
00134 }
00135
00136 void database::
00137 objectDbRootFolder (::std::unique_ptr< objectDbRootFolder_type > x)
00138 {
00139 this->objectDbRootFolder_.set (std::move (x));
00140 }
00141 }
00142
00143 #include <xsd/cxx/xml/dom/parsing-source.hxx>
00144
00145 namespace asr_object_database
00146 {
00147
00148
00149
00150 configuration::
00151 configuration ()
00152 : ::xml_schema::type (),
00153 database_ (this)
00154 {
00155 }
00156
00157 configuration::
00158 configuration (const configuration& x,
00159 ::xml_schema::flags f,
00160 ::xml_schema::container* c)
00161 : ::xml_schema::type (x, f, c),
00162 database_ (x.database_, f, this)
00163 {
00164 }
00165
00166 configuration::
00167 configuration (const ::xercesc::DOMElement& e,
00168 ::xml_schema::flags f,
00169 ::xml_schema::container* c)
00170 : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
00171 database_ (this)
00172 {
00173 if ((f & ::xml_schema::flags::base) == 0)
00174 {
00175 ::xsd::cxx::xml::dom::parser< char > p (e, true, false, false);
00176 this->parse (p, f);
00177 }
00178 }
00179
00180 void configuration::
00181 parse (::xsd::cxx::xml::dom::parser< char >& p,
00182 ::xml_schema::flags f)
00183 {
00184 for (; p.more_content (); p.next_content (false))
00185 {
00186 const ::xercesc::DOMElement& i (p.cur_element ());
00187 const ::xsd::cxx::xml::qualified_name< char > n (
00188 ::xsd::cxx::xml::dom::name< char > (i));
00189
00190
00191
00192 if (n.name () == "database" && n.namespace_ () == "http://xml.ralfschleicher.de/asr_object_database/")
00193 {
00194 ::std::unique_ptr< database_type > r (
00195 database_traits::create (i, f, this));
00196
00197 this->database_.push_back (::std::move (r));
00198 continue;
00199 }
00200
00201 break;
00202 }
00203 }
00204
00205 configuration* configuration::
00206 _clone (::xml_schema::flags f,
00207 ::xml_schema::container* c) const
00208 {
00209 return new class configuration (*this, f, c);
00210 }
00211
00212 configuration& configuration::
00213 operator= (const configuration& x)
00214 {
00215 if (this != &x)
00216 {
00217 static_cast< ::xml_schema::type& > (*this) = x;
00218 this->database_ = x.database_;
00219 }
00220
00221 return *this;
00222 }
00223
00224 configuration::
00225 ~configuration ()
00226 {
00227 }
00228
00229
00230
00231
00232 database::
00233 database (const uniqueName_type& uniqueName,
00234 const basenameMatchPattern_type& basenameMatchPattern,
00235 const objectDbRootFolder_type& objectDbRootFolder)
00236 : ::xml_schema::type (),
00237 uniqueName_ (uniqueName, this),
00238 basenameMatchPattern_ (basenameMatchPattern, this),
00239 objectDbRootFolder_ (objectDbRootFolder, this)
00240 {
00241 }
00242
00243 database::
00244 database (const database& x,
00245 ::xml_schema::flags f,
00246 ::xml_schema::container* c)
00247 : ::xml_schema::type (x, f, c),
00248 uniqueName_ (x.uniqueName_, f, this),
00249 basenameMatchPattern_ (x.basenameMatchPattern_, f, this),
00250 objectDbRootFolder_ (x.objectDbRootFolder_, f, this)
00251 {
00252 }
00253
00254 database::
00255 database (const ::xercesc::DOMElement& e,
00256 ::xml_schema::flags f,
00257 ::xml_schema::container* c)
00258 : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
00259 uniqueName_ (this),
00260 basenameMatchPattern_ (this),
00261 objectDbRootFolder_ (this)
00262 {
00263 if ((f & ::xml_schema::flags::base) == 0)
00264 {
00265 ::xsd::cxx::xml::dom::parser< char > p (e, true, false, false);
00266 this->parse (p, f);
00267 }
00268 }
00269
00270 void database::
00271 parse (::xsd::cxx::xml::dom::parser< char >& p,
00272 ::xml_schema::flags f)
00273 {
00274 for (; p.more_content (); p.next_content (false))
00275 {
00276 const ::xercesc::DOMElement& i (p.cur_element ());
00277 const ::xsd::cxx::xml::qualified_name< char > n (
00278 ::xsd::cxx::xml::dom::name< char > (i));
00279
00280
00281
00282 if (n.name () == "uniqueName" && n.namespace_ () == "http://xml.ralfschleicher.de/asr_object_database/")
00283 {
00284 ::std::unique_ptr< uniqueName_type > r (
00285 uniqueName_traits::create (i, f, this));
00286
00287 if (!uniqueName_.present ())
00288 {
00289 this->uniqueName_.set (::std::move (r));
00290 continue;
00291 }
00292 }
00293
00294
00295
00296 if (n.name () == "basenameMatchPattern" && n.namespace_ () == "http://xml.ralfschleicher.de/asr_object_database/")
00297 {
00298 ::std::unique_ptr< basenameMatchPattern_type > r (
00299 basenameMatchPattern_traits::create (i, f, this));
00300
00301 if (!basenameMatchPattern_.present ())
00302 {
00303 this->basenameMatchPattern_.set (::std::move (r));
00304 continue;
00305 }
00306 }
00307
00308
00309
00310 if (n.name () == "objectDbRootFolder" && n.namespace_ () == "http://xml.ralfschleicher.de/asr_object_database/")
00311 {
00312 ::std::unique_ptr< objectDbRootFolder_type > r (
00313 objectDbRootFolder_traits::create (i, f, this));
00314
00315 if (!objectDbRootFolder_.present ())
00316 {
00317 this->objectDbRootFolder_.set (::std::move (r));
00318 continue;
00319 }
00320 }
00321
00322 break;
00323 }
00324
00325 if (!uniqueName_.present ())
00326 {
00327 throw ::xsd::cxx::tree::expected_element< char > (
00328 "uniqueName",
00329 "http://xml.ralfschleicher.de/asr_object_database/");
00330 }
00331
00332 if (!basenameMatchPattern_.present ())
00333 {
00334 throw ::xsd::cxx::tree::expected_element< char > (
00335 "basenameMatchPattern",
00336 "http://xml.ralfschleicher.de/asr_object_database/");
00337 }
00338
00339 if (!objectDbRootFolder_.present ())
00340 {
00341 throw ::xsd::cxx::tree::expected_element< char > (
00342 "objectDbRootFolder",
00343 "http://xml.ralfschleicher.de/asr_object_database/");
00344 }
00345 }
00346
00347 database* database::
00348 _clone (::xml_schema::flags f,
00349 ::xml_schema::container* c) const
00350 {
00351 return new class database (*this, f, c);
00352 }
00353
00354 database& database::
00355 operator= (const database& x)
00356 {
00357 if (this != &x)
00358 {
00359 static_cast< ::xml_schema::type& > (*this) = x;
00360 this->uniqueName_ = x.uniqueName_;
00361 this->basenameMatchPattern_ = x.basenameMatchPattern_;
00362 this->objectDbRootFolder_ = x.objectDbRootFolder_;
00363 }
00364
00365 return *this;
00366 }
00367
00368 database::
00369 ~database ()
00370 {
00371 }
00372 }
00373
00374 #include <istream>
00375 #include <xsd/cxx/xml/sax/std-input-source.hxx>
00376 #include <xsd/cxx/tree/error-handler.hxx>
00377
00378 namespace asr_object_database
00379 {
00380 ::std::unique_ptr< ::asr_object_database::configuration >
00381 configuration_ (const ::std::string& u,
00382 ::xml_schema::flags f,
00383 const ::xml_schema::properties& p)
00384 {
00385 ::xsd::cxx::xml::auto_initializer i (
00386 (f & ::xml_schema::flags::dont_initialize) == 0,
00387 (f & ::xml_schema::flags::keep_dom) == 0);
00388
00389 ::xsd::cxx::tree::error_handler< char > h;
00390
00391 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
00392 ::xsd::cxx::xml::dom::parse< char > (
00393 u, h, p, f));
00394
00395 h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
00396
00397 return ::std::unique_ptr< ::asr_object_database::configuration > (
00398 ::asr_object_database::configuration_ (
00399 std::move (d), f | ::xml_schema::flags::own_dom, p));
00400 }
00401
00402 ::std::unique_ptr< ::asr_object_database::configuration >
00403 configuration_ (const ::std::string& u,
00404 ::xml_schema::error_handler& h,
00405 ::xml_schema::flags f,
00406 const ::xml_schema::properties& p)
00407 {
00408 ::xsd::cxx::xml::auto_initializer i (
00409 (f & ::xml_schema::flags::dont_initialize) == 0,
00410 (f & ::xml_schema::flags::keep_dom) == 0);
00411
00412 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
00413 ::xsd::cxx::xml::dom::parse< char > (
00414 u, h, p, f));
00415
00416 if (!d.get ())
00417 throw ::xsd::cxx::tree::parsing< char > ();
00418
00419 return ::std::unique_ptr< ::asr_object_database::configuration > (
00420 ::asr_object_database::configuration_ (
00421 std::move (d), f | ::xml_schema::flags::own_dom, p));
00422 }
00423
00424 ::std::unique_ptr< ::asr_object_database::configuration >
00425 configuration_ (const ::std::string& u,
00426 ::xercesc::DOMErrorHandler& h,
00427 ::xml_schema::flags f,
00428 const ::xml_schema::properties& p)
00429 {
00430 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
00431 ::xsd::cxx::xml::dom::parse< char > (
00432 u, h, p, f));
00433
00434 if (!d.get ())
00435 throw ::xsd::cxx::tree::parsing< char > ();
00436
00437 return ::std::unique_ptr< ::asr_object_database::configuration > (
00438 ::asr_object_database::configuration_ (
00439 std::move (d), f | ::xml_schema::flags::own_dom, p));
00440 }
00441
00442 ::std::unique_ptr< ::asr_object_database::configuration >
00443 configuration_ (::std::istream& is,
00444 ::xml_schema::flags f,
00445 const ::xml_schema::properties& p)
00446 {
00447 ::xsd::cxx::xml::auto_initializer i (
00448 (f & ::xml_schema::flags::dont_initialize) == 0,
00449 (f & ::xml_schema::flags::keep_dom) == 0);
00450
00451 ::xsd::cxx::xml::sax::std_input_source isrc (is);
00452 return ::asr_object_database::configuration_ (isrc, f, p);
00453 }
00454
00455 ::std::unique_ptr< ::asr_object_database::configuration >
00456 configuration_ (::std::istream& is,
00457 ::xml_schema::error_handler& h,
00458 ::xml_schema::flags f,
00459 const ::xml_schema::properties& p)
00460 {
00461 ::xsd::cxx::xml::auto_initializer i (
00462 (f & ::xml_schema::flags::dont_initialize) == 0,
00463 (f & ::xml_schema::flags::keep_dom) == 0);
00464
00465 ::xsd::cxx::xml::sax::std_input_source isrc (is);
00466 return ::asr_object_database::configuration_ (isrc, h, f, p);
00467 }
00468
00469 ::std::unique_ptr< ::asr_object_database::configuration >
00470 configuration_ (::std::istream& is,
00471 ::xercesc::DOMErrorHandler& h,
00472 ::xml_schema::flags f,
00473 const ::xml_schema::properties& p)
00474 {
00475 ::xsd::cxx::xml::sax::std_input_source isrc (is);
00476 return ::asr_object_database::configuration_ (isrc, h, f, p);
00477 }
00478
00479 ::std::unique_ptr< ::asr_object_database::configuration >
00480 configuration_ (::std::istream& is,
00481 const ::std::string& sid,
00482 ::xml_schema::flags f,
00483 const ::xml_schema::properties& p)
00484 {
00485 ::xsd::cxx::xml::auto_initializer i (
00486 (f & ::xml_schema::flags::dont_initialize) == 0,
00487 (f & ::xml_schema::flags::keep_dom) == 0);
00488
00489 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
00490 return ::asr_object_database::configuration_ (isrc, f, p);
00491 }
00492
00493 ::std::unique_ptr< ::asr_object_database::configuration >
00494 configuration_ (::std::istream& is,
00495 const ::std::string& sid,
00496 ::xml_schema::error_handler& h,
00497 ::xml_schema::flags f,
00498 const ::xml_schema::properties& p)
00499 {
00500 ::xsd::cxx::xml::auto_initializer i (
00501 (f & ::xml_schema::flags::dont_initialize) == 0,
00502 (f & ::xml_schema::flags::keep_dom) == 0);
00503
00504 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
00505 return ::asr_object_database::configuration_ (isrc, h, f, p);
00506 }
00507
00508 ::std::unique_ptr< ::asr_object_database::configuration >
00509 configuration_ (::std::istream& is,
00510 const ::std::string& sid,
00511 ::xercesc::DOMErrorHandler& h,
00512 ::xml_schema::flags f,
00513 const ::xml_schema::properties& p)
00514 {
00515 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
00516 return ::asr_object_database::configuration_ (isrc, h, f, p);
00517 }
00518
00519 ::std::unique_ptr< ::asr_object_database::configuration >
00520 configuration_ (::xercesc::InputSource& i,
00521 ::xml_schema::flags f,
00522 const ::xml_schema::properties& p)
00523 {
00524 ::xsd::cxx::tree::error_handler< char > h;
00525
00526 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
00527 ::xsd::cxx::xml::dom::parse< char > (
00528 i, h, p, f));
00529
00530 h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
00531
00532 return ::std::unique_ptr< ::asr_object_database::configuration > (
00533 ::asr_object_database::configuration_ (
00534 std::move (d), f | ::xml_schema::flags::own_dom, p));
00535 }
00536
00537 ::std::unique_ptr< ::asr_object_database::configuration >
00538 configuration_ (::xercesc::InputSource& i,
00539 ::xml_schema::error_handler& h,
00540 ::xml_schema::flags f,
00541 const ::xml_schema::properties& p)
00542 {
00543 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
00544 ::xsd::cxx::xml::dom::parse< char > (
00545 i, h, p, f));
00546
00547 if (!d.get ())
00548 throw ::xsd::cxx::tree::parsing< char > ();
00549
00550 return ::std::unique_ptr< ::asr_object_database::configuration > (
00551 ::asr_object_database::configuration_ (
00552 std::move (d), f | ::xml_schema::flags::own_dom, p));
00553 }
00554
00555 ::std::unique_ptr< ::asr_object_database::configuration >
00556 configuration_ (::xercesc::InputSource& i,
00557 ::xercesc::DOMErrorHandler& h,
00558 ::xml_schema::flags f,
00559 const ::xml_schema::properties& p)
00560 {
00561 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
00562 ::xsd::cxx::xml::dom::parse< char > (
00563 i, h, p, f));
00564
00565 if (!d.get ())
00566 throw ::xsd::cxx::tree::parsing< char > ();
00567
00568 return ::std::unique_ptr< ::asr_object_database::configuration > (
00569 ::asr_object_database::configuration_ (
00570 std::move (d), f | ::xml_schema::flags::own_dom, p));
00571 }
00572
00573 ::std::unique_ptr< ::asr_object_database::configuration >
00574 configuration_ (const ::xercesc::DOMDocument& doc,
00575 ::xml_schema::flags f,
00576 const ::xml_schema::properties& p)
00577 {
00578 if (f & ::xml_schema::flags::keep_dom)
00579 {
00580 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
00581 static_cast< ::xercesc::DOMDocument* > (doc.cloneNode (true)));
00582
00583 return ::std::unique_ptr< ::asr_object_database::configuration > (
00584 ::asr_object_database::configuration_ (
00585 std::move (d), f | ::xml_schema::flags::own_dom, p));
00586 }
00587
00588 const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
00589 const ::xsd::cxx::xml::qualified_name< char > n (
00590 ::xsd::cxx::xml::dom::name< char > (e));
00591
00592 if (n.name () == "configuration" &&
00593 n.namespace_ () == "http://xml.ralfschleicher.de/asr_object_database/")
00594 {
00595 ::std::unique_ptr< ::asr_object_database::configuration > r (
00596 ::xsd::cxx::tree::traits< ::asr_object_database::configuration, char >::create (
00597 e, f, 0));
00598 return r;
00599 }
00600
00601 throw ::xsd::cxx::tree::unexpected_element < char > (
00602 n.name (),
00603 n.namespace_ (),
00604 "configuration",
00605 "http://xml.ralfschleicher.de/asr_object_database/");
00606 }
00607
00608 ::std::unique_ptr< ::asr_object_database::configuration >
00609 configuration_ (::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d,
00610 ::xml_schema::flags f,
00611 const ::xml_schema::properties&)
00612 {
00613 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > c (
00614 ((f & ::xml_schema::flags::keep_dom) &&
00615 !(f & ::xml_schema::flags::own_dom))
00616 ? static_cast< ::xercesc::DOMDocument* > (d->cloneNode (true))
00617 : 0);
00618
00619 ::xercesc::DOMDocument& doc (c.get () ? *c : *d);
00620 const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
00621
00622 const ::xsd::cxx::xml::qualified_name< char > n (
00623 ::xsd::cxx::xml::dom::name< char > (e));
00624
00625 if (f & ::xml_schema::flags::keep_dom)
00626 doc.setUserData (::xml_schema::dom::tree_node_key,
00627 (c.get () ? &c : &d),
00628 0);
00629
00630 if (n.name () == "configuration" &&
00631 n.namespace_ () == "http://xml.ralfschleicher.de/asr_object_database/")
00632 {
00633 ::std::unique_ptr< ::asr_object_database::configuration > r (
00634 ::xsd::cxx::tree::traits< ::asr_object_database::configuration, char >::create (
00635 e, f, 0));
00636 return r;
00637 }
00638
00639 throw ::xsd::cxx::tree::unexpected_element < char > (
00640 n.name (),
00641 n.namespace_ (),
00642 "configuration",
00643 "http://xml.ralfschleicher.de/asr_object_database/");
00644 }
00645 }
00646
00647 #include <xsd/cxx/post.hxx>
00648
00649
00650
00651
00652
00653