CaDSR/UMLProject.pm untested

filter: Statementstmt 0.0% 0 / 1189 Branchbran 0.0% 0 / 244 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 219 Podpod 0.0% 0 / 169 totaltotal 0.0% 0 / 1821 CC 123 SCAR 33.6
CC
123
Cov
0%
fromWSXMLNode
156.0
fromWSXMLNode
132.0
fromWSXMLNode
90.0
CRAP 28.7
1 # ------------------------------------------------------------------------------------------
2 package CaCORE::CaDSR::UMLProject::UMLGeneralizationMetadata;
3
4 use 5.005;
5 #use strict;
6 use warnings;
7
8 require Exporter;
9
10 use XML::DOM;
11
12 ## begin import objects ##
13 use CaCORE::ApplicationService;
14 ## end import objects ##
15
16 $VERSION = '3.2';
17
18 @ISA = qw(CaCORE::DomainObjectI);
19
20 our %EXPORT_TAGS = ( 'all' => [ qw(
21
22 ) ] );
23
24 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
25
26 our @EXPORT = qw(
27 );
28
29 # create an instance of the UMLGeneralizationMetadata object
30 # returns: a UMLGeneralizationMetadata object
31 sub new {
32 my $class = shift;
33 my $self = {};
34 bless($self, $class);
35 #print "new UMLGeneralizationMetadata\n";
36 return $self;
37 }
38
39 # Construct the specific section of the WSDL request corresponding
40 # to this UMLGeneralizationMetadata intance
41 # returns: XML in string format
42 sub toWebserviceXML {
43 my $self = shift;
44 my $result = shift;
45 my $assigned_id = shift;
46 my $current_id = shift;
47 my $l = shift;
48 my %worklist = %$l;
49
50 # prefix portion of the xml
51 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":UMLGeneralizationMetadata\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.umlproject.cadsr.nci.nih.gov\">";
52 my $tmpstr = "";
53 $current_id ++;
54
55 ## begin attribute to XML ##
56 # id;
57 if( defined( $self->getId ) ) {
58 $tmpstr = "<id xsi:type=\"xsd:string\">" . $self->getId . "</id>";
59 } else {
60 $tmpstr = "<id xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
61 }
62 $result .= $tmpstr;
63  
64 ## end attribute to XML ##
65
66 ## begin association to XML ##
67 ## end association to XML ##
68
69 # add trailing close tags
70 $result .= "</multiRef>";
71
72 return ($result, $current_id, %worklist);
73 }
74
75 # parse a given webservice response xml, construct a list of UMLGeneralizationMetadata objects
76 # param: xml doc
77 # returns: list of UMLGeneralizationMetadata objects
78 sub fromWebserviceXML {
79 my $self = shift;
80 my $parser = new XML::DOM::Parser;
81 my $docnode = $parser->parse(shift);
82 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
83
84 return $self->fromWSXMLListNode($root);
85 }
86
87 # parse a given xml node, construct a list of UMLGeneralizationMetadata objects
88 # param: xml node
89 # returns: a list of UMLGeneralizationMetadata objects
90 sub fromWSXMLListNode {
91 my $self = shift;
92 my $listNode = shift;
93 my @obj_list = ();
94
95 # get all children for this node
96 for my $childrenNode ($listNode->getChildNodes) {
97 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
98 my $newobj = $self->fromWSXMLNode($childrenNode);
99 push @obj_list, $newobj;
100 }
101 }
102
103 return @obj_list;
104 }
105
106 # parse a given xml node, construct one UMLGeneralizationMetadata object
107 # param: xml node
108 # returns: one UMLGeneralizationMetadata object
109 sub fromWSXMLNode {
110 my $UMLGeneralizationMetadataNode = $_[1];
111
112 ## begin ELEMENT_NODE children ##
113 my $id;
114 ## end ELEMENT_NODE children ##
115
116 # get all children for this node
117 for my $childrenNode ($UMLGeneralizationMetadataNode->getChildNodes) {
118 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
119 if( ! defined($childrenNode->getFirstChild) ){ next; };
120 my $textNode = $childrenNode->getFirstChild;
121 ## begin iterate ELEMENT_NODE ##
122 if (0) {
123 # do nothing, just a place holder for "if" component
124 }
125 elsif ($childrenNode->getNodeName eq "id") {
126 $id=$textNode->getNodeValue;
127 }
128 ## end iterate ELEMENT_NODE ##
129 }
130 }
131 my $newobj = new CaCORE::CaDSR::UMLProject::UMLGeneralizationMetadata;
132 ## begin set attr ##
133 $newobj->setId($id);
134 ## end set attr ##
135
136 return $newobj;
137 }
138
139 ## begin getters and setters ##
140
141 sub getId {
142 my $self = shift;
143 return $self->{id};
144 }
145  
146 sub setId {
147 my $self = shift;
148 $self->{id} = shift;
149 }
150  
151 ## end getters and setters ##
152
153 ## begin bean association methods ##
154
155 sub getObjectClassRelationship {
156 my $self = shift;
157 my $appSvc = CaCORE::ApplicationService->instance();
158 my @results = $appSvc->queryObject("CaCORE::CaDSR::ObjectClassRelationship", $self);
159 return $results[0];
160 }
161  
162 sub getSuperUMLClassMetadata {
163 my $self = shift;
164 my $appSvc = CaCORE::ApplicationService->instance();
165 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::UMLClassMetadata", $self);
166 return $results[0];
167 }
168  
169 ## end bean association methods ##
170
171 1;
172 #end
173 # ------------------------------------------------------------------------------------------
174 package CaCORE::CaDSR::UMLProject::Project;
175
176 use 5.005;
177 #use strict;
178 use warnings;
179
180 require Exporter;
181
182 use XML::DOM;
183
184 ## begin import objects ##
185 use CaCORE::ApplicationService;
186 ## end import objects ##
187
188
189 @ISA = qw(CaCORE::DomainObjectI);
190
191 our %EXPORT_TAGS = ( 'all' => [ qw(
192
193 ) ] );
194
195 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
196
197 our @EXPORT = qw(
198 );
199
200 # create an instance of the Project object
201 # returns: a Project object
202 sub new {
203 my $class = shift;
204 my $self = {};
205 bless($self, $class);
206 #print "new Project\n";
207 return $self;
208 }
209
210 # Construct the specific section of the WSDL request corresponding
211 # to this Project intance
212 # returns: XML in string format
213 sub toWebserviceXML {
214 my $self = shift;
215 my $result = shift;
216 my $assigned_id = shift;
217 my $current_id = shift;
218 my $l = shift;
219 my %worklist = %$l;
220
221 # prefix portion of the xml
222 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":Project\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.umlproject.cadsr.nci.nih.gov\">";
223 my $tmpstr = "";
224 $current_id ++;
225
226 ## begin attribute to XML ##
227 # description;
228 if( defined( $self->getDescription ) ) {
229 $tmpstr = "<description xsi:type=\"xsd:string\">" . $self->getDescription . "</description>";
230 } else {
231 $tmpstr = "<description xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
232 }
233 $result .= $tmpstr;
234  
235 # id;
236 if( defined( $self->getId ) ) {
237 $tmpstr = "<id xsi:type=\"xsd:string\">" . $self->getId . "</id>";
238 } else {
239 $tmpstr = "<id xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
240 }
241 $result .= $tmpstr;
242  
243 # longName;
244 if( defined( $self->getLongName ) ) {
245 $tmpstr = "<longName xsi:type=\"xsd:string\">" . $self->getLongName . "</longName>";
246 } else {
247 $tmpstr = "<longName xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
248 }
249 $result .= $tmpstr;
250  
251 # shortName;
252 if( defined( $self->getShortName ) ) {
253 $tmpstr = "<shortName xsi:type=\"xsd:string\">" . $self->getShortName . "</shortName>";
254 } else {
255 $tmpstr = "<shortName xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
256 }
257 $result .= $tmpstr;
258  
259 # version;
260 if( defined( $self->getVersion ) ) {
261 $tmpstr = "<version xsi:type=\"xsd:string\">" . $self->getVersion . "</version>";
262 } else {
263 $tmpstr = "<version xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
264 }
265 $result .= $tmpstr;
266  
267 ## end attribute to XML ##
268
269 ## begin association to XML ##
270 ## end association to XML ##
271
272 # add trailing close tags
273 $result .= "</multiRef>";
274
275 return ($result, $current_id, %worklist);
276 }
277
278 # parse a given webservice response xml, construct a list of Project objects
279 # param: xml doc
280 # returns: list of Project objects
281 sub fromWebserviceXML {
282 my $self = shift;
283 my $parser = new XML::DOM::Parser;
284 my $docnode = $parser->parse(shift);
285 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
286
287 return $self->fromWSXMLListNode($root);
288 }
289
290 # parse a given xml node, construct a list of Project objects
291 # param: xml node
292 # returns: a list of Project objects
293 sub fromWSXMLListNode {
294 my $self = shift;
295 my $listNode = shift;
296 my @obj_list = ();
297
298 # get all children for this node
299 for my $childrenNode ($listNode->getChildNodes) {
300 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
301 my $newobj = $self->fromWSXMLNode($childrenNode);
302 push @obj_list, $newobj;
303 }
304 }
305
306 return @obj_list;
307 }
308
309 # parse a given xml node, construct one Project object
310 # param: xml node
311 # returns: one Project object
312 sub fromWSXMLNode {
313 my $ProjectNode = $_[1];
314
315 ## begin ELEMENT_NODE children ##
316 my $description;
317 my $id;
318 my $longName;
319 my $shortName;
320 my $version;
321 ## end ELEMENT_NODE children ##
322
323 # get all children for this node
324 for my $childrenNode ($ProjectNode->getChildNodes) {
325 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
326 if( ! defined($childrenNode->getFirstChild) ){ next; };
327 my $textNode = $childrenNode->getFirstChild;
328 ## begin iterate ELEMENT_NODE ##
329 if (0) {
330 # do nothing, just a place holder for "if" component
331 }
332 elsif ($childrenNode->getNodeName eq "description") {
333 $description=$textNode->getNodeValue;
334 }
335 elsif ($childrenNode->getNodeName eq "id") {
336 $id=$textNode->getNodeValue;
337 }
338 elsif ($childrenNode->getNodeName eq "longName") {
339 $longName=$textNode->getNodeValue;
340 }
341 elsif ($childrenNode->getNodeName eq "shortName") {
342 $shortName=$textNode->getNodeValue;
343 }
344 elsif ($childrenNode->getNodeName eq "version") {
345 $version=$textNode->getNodeValue;
346 }
347 ## end iterate ELEMENT_NODE ##
348 }
349 }
350 my $newobj = new CaCORE::CaDSR::UMLProject::Project;
351 ## begin set attr ##
352 $newobj->setDescription($description);
353 $newobj->setId($id);
354 $newobj->setLongName($longName);
355 $newobj->setShortName($shortName);
356 $newobj->setVersion($version);
357 ## end set attr ##
358
359 return $newobj;
360 }
361
362 ## begin getters and setters ##
363
364 sub getDescription {
365 my $self = shift;
366 return $self->{description};
367 }
368  
369 sub setDescription {
370 my $self = shift;
371 $self->{description} = shift;
372 }
373  
374 sub getId {
375 my $self = shift;
376 return $self->{id};
377 }
378  
379 sub setId {
380 my $self = shift;
381 $self->{id} = shift;
382 }
383  
384 sub getLongName {
385 my $self = shift;
386 return $self->{longName};
387 }
388  
389 sub setLongName {
390 my $self = shift;
391 $self->{longName} = shift;
392 }
393  
394 sub getShortName {
395 my $self = shift;
396 return $self->{shortName};
397 }
398  
399 sub setShortName {
400 my $self = shift;
401 $self->{shortName} = shift;
402 }
403  
404 sub getVersion {
405 my $self = shift;
406 return $self->{version};
407 }
408  
409 sub setVersion {
410 my $self = shift;
411 $self->{version} = shift;
412 }
413  
414 ## end getters and setters ##
415
416 ## begin bean association methods ##
417
418 sub getUMLAssociationMetadataCollection {
419 my $self = shift;
420 my $appSvc = CaCORE::ApplicationService->instance();
421 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::UMLAssociationMetadata", $self);
422 return @results;
423 }
424  
425 sub getUMLAttributeMetadataCollection {
426 my $self = shift;
427 my $appSvc = CaCORE::ApplicationService->instance();
428 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::UMLAttributeMetadata", $self);
429 return @results;
430 }
431  
432 sub getUMLClassMetadataCollection {
433 my $self = shift;
434 my $appSvc = CaCORE::ApplicationService->instance();
435 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::UMLClassMetadata", $self);
436 return @results;
437 }
438  
439 sub getUMLPackageMetadataCollection {
440 my $self = shift;
441 my $appSvc = CaCORE::ApplicationService->instance();
442 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::UMLPackageMetadata", $self);
443 return @results;
444 }
445  
446 sub getClassificationScheme {
447 my $self = shift;
448 my $appSvc = CaCORE::ApplicationService->instance();
449 my @results = $appSvc->queryObject("CaCORE::CaDSR::ClassificationScheme", $self);
450 return $results[0];
451 }
452  
453 sub getSubProjectCollection {
454 my $self = shift;
455 my $appSvc = CaCORE::ApplicationService->instance();
456 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::SubProject", $self);
457 return @results;
458 }
459  
460 ## end bean association methods ##
461
462 1;
463 #end
464 # ------------------------------------------------------------------------------------------
465 package CaCORE::CaDSR::UMLProject::SubProject;
466
467 use 5.005;
468 #use strict;
469 use warnings;
470
471 require Exporter;
472
473 use XML::DOM;
474
475 ## begin import objects ##
476 use CaCORE::ApplicationService;
477 ## end import objects ##
478
479
480 @ISA = qw(CaCORE::DomainObjectI);
481
482 our %EXPORT_TAGS = ( 'all' => [ qw(
483
484 ) ] );
485
486 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
487
488 our @EXPORT = qw(
489 );
490
491 # create an instance of the SubProject object
492 # returns: a SubProject object
493 sub new {
494 my $class = shift;
495 my $self = {};
496 bless($self, $class);
497 #print "new SubProject\n";
498 return $self;
499 }
500
501 # Construct the specific section of the WSDL request corresponding
502 # to this SubProject intance
503 # returns: XML in string format
504 sub toWebserviceXML {
505 my $self = shift;
506 my $result = shift;
507 my $assigned_id = shift;
508 my $current_id = shift;
509 my $l = shift;
510 my %worklist = %$l;
511
512 # prefix portion of the xml
513 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":SubProject\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.umlproject.cadsr.nci.nih.gov\">";
514 my $tmpstr = "";
515 $current_id ++;
516
517 ## begin attribute to XML ##
518 # description;
519 if( defined( $self->getDescription ) ) {
520 $tmpstr = "<description xsi:type=\"xsd:string\">" . $self->getDescription . "</description>";
521 } else {
522 $tmpstr = "<description xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
523 }
524 $result .= $tmpstr;
525  
526 # id;
527 if( defined( $self->getId ) ) {
528 $tmpstr = "<id xsi:type=\"xsd:string\">" . $self->getId . "</id>";
529 } else {
530 $tmpstr = "<id xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
531 }
532 $result .= $tmpstr;
533  
534 # name;
535 if( defined( $self->getName ) ) {
536 $tmpstr = "<name xsi:type=\"xsd:string\">" . $self->getName . "</name>";
537 } else {
538 $tmpstr = "<name xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
539 }
540 $result .= $tmpstr;
541  
542 ## end attribute to XML ##
543
544 ## begin association to XML ##
545 ## end association to XML ##
546
547 # add trailing close tags
548 $result .= "</multiRef>";
549
550 return ($result, $current_id, %worklist);
551 }
552
553 # parse a given webservice response xml, construct a list of SubProject objects
554 # param: xml doc
555 # returns: list of SubProject objects
556 sub fromWebserviceXML {
557 my $self = shift;
558 my $parser = new XML::DOM::Parser;
559 my $docnode = $parser->parse(shift);
560 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
561
562 return $self->fromWSXMLListNode($root);
563 }
564
565 # parse a given xml node, construct a list of SubProject objects
566 # param: xml node
567 # returns: a list of SubProject objects
568 sub fromWSXMLListNode {
569 my $self = shift;
570 my $listNode = shift;
571 my @obj_list = ();
572
573 # get all children for this node
574 for my $childrenNode ($listNode->getChildNodes) {
575 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
576 my $newobj = $self->fromWSXMLNode($childrenNode);
577 push @obj_list, $newobj;
578 }
579 }
580
581 return @obj_list;
582 }
583
584 # parse a given xml node, construct one SubProject object
585 # param: xml node
586 # returns: one SubProject object
587 sub fromWSXMLNode {
588 my $SubProjectNode = $_[1];
589
590 ## begin ELEMENT_NODE children ##
591 my $description;
592 my $id;
593 my $name;
594 ## end ELEMENT_NODE children ##
595
596 # get all children for this node
597 for my $childrenNode ($SubProjectNode->getChildNodes) {
598 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
599 if( ! defined($childrenNode->getFirstChild) ){ next; };
600 my $textNode = $childrenNode->getFirstChild;
601 ## begin iterate ELEMENT_NODE ##
602 if (0) {
603 # do nothing, just a place holder for "if" component
604 }
605 elsif ($childrenNode->getNodeName eq "description") {
606 $description=$textNode->getNodeValue;
607 }
608 elsif ($childrenNode->getNodeName eq "id") {
609 $id=$textNode->getNodeValue;
610 }
611 elsif ($childrenNode->getNodeName eq "name") {
612 $name=$textNode->getNodeValue;
613 }
614 ## end iterate ELEMENT_NODE ##
615 }
616 }
617 my $newobj = new CaCORE::CaDSR::UMLProject::SubProject;
618 ## begin set attr ##
619 $newobj->setDescription($description);
620 $newobj->setId($id);
621 $newobj->setName($name);
622 ## end set attr ##
623
624 return $newobj;
625 }
626
627 ## begin getters and setters ##
628
629 sub getDescription {
630 my $self = shift;
631 return $self->{description};
632 }
633  
634 sub setDescription {
635 my $self = shift;
636 $self->{description} = shift;
637 }
638  
639 sub getId {
640 my $self = shift;
641 return $self->{id};
642 }
643  
644 sub setId {
645 my $self = shift;
646 $self->{id} = shift;
647 }
648  
649 sub getName {
650 my $self = shift;
651 return $self->{name};
652 }
653  
654 sub setName {
655 my $self = shift;
656 $self->{name} = shift;
657 }
658  
659 ## end getters and setters ##
660
661 ## begin bean association methods ##
662
663 sub getUMLPackageMetadataCollection {
664 my $self = shift;
665 my $appSvc = CaCORE::ApplicationService->instance();
666 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::UMLPackageMetadata", $self);
667 return @results;
668 }
669  
670 sub getClassSchemeClassSchemeItem {
671 my $self = shift;
672 my $appSvc = CaCORE::ApplicationService->instance();
673 my @results = $appSvc->queryObject("CaCORE::CaDSR::ClassSchemeClassSchemeItem", $self);
674 return $results[0];
675 }
676  
677 sub getProject {
678 my $self = shift;
679 my $appSvc = CaCORE::ApplicationService->instance();
680 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::Project", $self);
681 return $results[0];
682 }
683  
684 ## end bean association methods ##
685
686 1;
687 #end
688 # ------------------------------------------------------------------------------------------
689 package CaCORE::CaDSR::UMLProject::UMLPackageMetadata;
690
691 use 5.005;
692 #use strict;
693 use warnings;
694
695 require Exporter;
696
697 use XML::DOM;
698
699 ## begin import objects ##
700 use CaCORE::ApplicationService;
701 ## end import objects ##
702
703
704 @ISA = qw(CaCORE::DomainObjectI);
705
706 our %EXPORT_TAGS = ( 'all' => [ qw(
707
708 ) ] );
709
710 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
711
712 our @EXPORT = qw(
713 );
714
715 # create an instance of the UMLPackageMetadata object
716 # returns: a UMLPackageMetadata object
717 sub new {
718 my $class = shift;
719 my $self = {};
720 bless($self, $class);
721 #print "new UMLPackageMetadata\n";
722 return $self;
723 }
724
725 # Construct the specific section of the WSDL request corresponding
726 # to this UMLPackageMetadata intance
727 # returns: XML in string format
728 sub toWebserviceXML {
729 my $self = shift;
730 my $result = shift;
731 my $assigned_id = shift;
732 my $current_id = shift;
733 my $l = shift;
734 my %worklist = %$l;
735
736 # prefix portion of the xml
737 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":UMLPackageMetadata\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.umlproject.cadsr.nci.nih.gov\">";
738 my $tmpstr = "";
739 $current_id ++;
740
741 ## begin attribute to XML ##
742 # description;
743 if( defined( $self->getDescription ) ) {
744 $tmpstr = "<description xsi:type=\"xsd:string\">" . $self->getDescription . "</description>";
745 } else {
746 $tmpstr = "<description xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
747 }
748 $result .= $tmpstr;
749  
750 # id;
751 if( defined( $self->getId ) ) {
752 $tmpstr = "<id xsi:type=\"xsd:string\">" . $self->getId . "</id>";
753 } else {
754 $tmpstr = "<id xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
755 }
756 $result .= $tmpstr;
757  
758 # name;
759 if( defined( $self->getName ) ) {
760 $tmpstr = "<name xsi:type=\"xsd:string\">" . $self->getName . "</name>";
761 } else {
762 $tmpstr = "<name xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
763 }
764 $result .= $tmpstr;
765  
766 ## end attribute to XML ##
767
768 ## begin association to XML ##
769 ## end association to XML ##
770
771 # add trailing close tags
772 $result .= "</multiRef>";
773
774 return ($result, $current_id, %worklist);
775 }
776
777 # parse a given webservice response xml, construct a list of UMLPackageMetadata objects
778 # param: xml doc
779 # returns: list of UMLPackageMetadata objects
780 sub fromWebserviceXML {
781 my $self = shift;
782 my $parser = new XML::DOM::Parser;
783 my $docnode = $parser->parse(shift);
784 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
785
786 return $self->fromWSXMLListNode($root);
787 }
788
789 # parse a given xml node, construct a list of UMLPackageMetadata objects
790 # param: xml node
791 # returns: a list of UMLPackageMetadata objects
792 sub fromWSXMLListNode {
793 my $self = shift;
794 my $listNode = shift;
795 my @obj_list = ();
796
797 # get all children for this node
798 for my $childrenNode ($listNode->getChildNodes) {
799 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
800 my $newobj = $self->fromWSXMLNode($childrenNode);
801 push @obj_list, $newobj;
802 }
803 }
804
805 return @obj_list;
806 }
807
808 # parse a given xml node, construct one UMLPackageMetadata object
809 # param: xml node
810 # returns: one UMLPackageMetadata object
811 sub fromWSXMLNode {
812 my $UMLPackageMetadataNode = $_[1];
813
814 ## begin ELEMENT_NODE children ##
815 my $description;
816 my $id;
817 my $name;
818 ## end ELEMENT_NODE children ##
819
820 # get all children for this node
821 for my $childrenNode ($UMLPackageMetadataNode->getChildNodes) {
822 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
823 if( ! defined($childrenNode->getFirstChild) ){ next; };
824 my $textNode = $childrenNode->getFirstChild;
825 ## begin iterate ELEMENT_NODE ##
826 if (0) {
827 # do nothing, just a place holder for "if" component
828 }
829 elsif ($childrenNode->getNodeName eq "description") {
830 $description=$textNode->getNodeValue;
831 }
832 elsif ($childrenNode->getNodeName eq "id") {
833 $id=$textNode->getNodeValue;
834 }
835 elsif ($childrenNode->getNodeName eq "name") {
836 $name=$textNode->getNodeValue;
837 }
838 ## end iterate ELEMENT_NODE ##
839 }
840 }
841 my $newobj = new CaCORE::CaDSR::UMLProject::UMLPackageMetadata;
842 ## begin set attr ##
843 $newobj->setDescription($description);
844 $newobj->setId($id);
845 $newobj->setName($name);
846 ## end set attr ##
847
848 return $newobj;
849 }
850
851 ## begin getters and setters ##
852
853 sub getDescription {
854 my $self = shift;
855 return $self->{description};
856 }
857  
858 sub setDescription {
859 my $self = shift;
860 $self->{description} = shift;
861 }
862  
863 sub getId {
864 my $self = shift;
865 return $self->{id};
866 }
867  
868 sub setId {
869 my $self = shift;
870 $self->{id} = shift;
871 }
872  
873 sub getName {
874 my $self = shift;
875 return $self->{name};
876 }
877  
878 sub setName {
879 my $self = shift;
880 $self->{name} = shift;
881 }
882  
883 ## end getters and setters ##
884
885 ## begin bean association methods ##
886
887 sub getUMLClassMetadataCollection {
888 my $self = shift;
889 my $appSvc = CaCORE::ApplicationService->instance();
890 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::UMLClassMetadata", $self);
891 return @results;
892 }
893  
894 sub getClassSchemeClassSchemeItem {
895 my $self = shift;
896 my $appSvc = CaCORE::ApplicationService->instance();
897 my @results = $appSvc->queryObject("CaCORE::CaDSR::ClassSchemeClassSchemeItem", $self);
898 return $results[0];
899 }
900  
901 sub getProject {
902 my $self = shift;
903 my $appSvc = CaCORE::ApplicationService->instance();
904 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::Project", $self);
905 return $results[0];
906 }
907  
908 sub getSubProject {
909 my $self = shift;
910 my $appSvc = CaCORE::ApplicationService->instance();
911 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::SubProject", $self);
912 return $results[0];
913 }
914  
915 ## end bean association methods ##
916
917 1;
918 #end
919 # ------------------------------------------------------------------------------------------
920 package CaCORE::CaDSR::UMLProject::UMLClassMetadata;
921
922 use 5.005;
923 #use strict;
924 use warnings;
925
926 require Exporter;
927
928 use XML::DOM;
929
930 ## begin import objects ##
931 use CaCORE::ApplicationService;
932 ## end import objects ##
933
934
935 @ISA = qw(CaCORE::DomainObjectI);
936
937 our %EXPORT_TAGS = ( 'all' => [ qw(
938
939 ) ] );
940
941 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
942
943 our @EXPORT = qw(
944 );
945
946 # create an instance of the UMLClassMetadata object
947 # returns: a UMLClassMetadata object
948 sub new {
949 my $class = shift;
950 my $self = {};
951 bless($self, $class);
952 #print "new UMLClassMetadata\n";
953 return $self;
954 }
955
956 # Construct the specific section of the WSDL request corresponding
957 # to this UMLClassMetadata intance
958 # returns: XML in string format
959 sub toWebserviceXML {
960 my $self = shift;
961 my $result = shift;
962 my $assigned_id = shift;
963 my $current_id = shift;
964 my $l = shift;
965 my %worklist = %$l;
966
967 # prefix portion of the xml
968 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":UMLClassMetadata\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.umlproject.cadsr.nci.nih.gov\">";
969 my $tmpstr = "";
970 $current_id ++;
971
972 ## begin attribute to XML ##
973 # description;
974 if( defined( $self->getDescription ) ) {
975 $tmpstr = "<description xsi:type=\"xsd:string\">" . $self->getDescription . "</description>";
976 } else {
977 $tmpstr = "<description xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
978 }
979 $result .= $tmpstr;
980  
981 # fullyQualifiedName;
982 if( defined( $self->getFullyQualifiedName ) ) {
983 $tmpstr = "<fullyQualifiedName xsi:type=\"xsd:string\">" . $self->getFullyQualifiedName . "</fullyQualifiedName>";
984 } else {
985 $tmpstr = "<fullyQualifiedName xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
986 }
987 $result .= $tmpstr;
988  
989 # id;
990 if( defined( $self->getId ) ) {
991 $tmpstr = "<id xsi:type=\"xsd:string\">" . $self->getId . "</id>";
992 } else {
993 $tmpstr = "<id xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
994 }
995 $result .= $tmpstr;
996  
997 # name;
998 if( defined( $self->getName ) ) {
999 $tmpstr = "<name xsi:type=\"xsd:string\">" . $self->getName . "</name>";
1000 } else {
1001 $tmpstr = "<name xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1002 }
1003 $result .= $tmpstr;
1004  
1005 ## end attribute to XML ##
1006
1007 ## begin association to XML ##
1008 ## end association to XML ##
1009
1010 # add trailing close tags
1011 $result .= "</multiRef>";
1012
1013 return ($result, $current_id, %worklist);
1014 }
1015
1016 # parse a given webservice response xml, construct a list of UMLClassMetadata objects
1017 # param: xml doc
1018 # returns: list of UMLClassMetadata objects
1019 sub fromWebserviceXML {
1020 my $self = shift;
1021 my $parser = new XML::DOM::Parser;
1022 my $docnode = $parser->parse(shift);
1023 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
1024
1025 return $self->fromWSXMLListNode($root);
1026 }
1027
1028 # parse a given xml node, construct a list of UMLClassMetadata objects
1029 # param: xml node
1030 # returns: a list of UMLClassMetadata objects
1031 sub fromWSXMLListNode {
1032 my $self = shift;
1033 my $listNode = shift;
1034 my @obj_list = ();
1035
1036 # get all children for this node
1037 for my $childrenNode ($listNode->getChildNodes) {
1038 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1039 my $newobj = $self->fromWSXMLNode($childrenNode);
1040 push @obj_list, $newobj;
1041 }
1042 }
1043
1044 return @obj_list;
1045 }
1046
1047 # parse a given xml node, construct one UMLClassMetadata object
1048 # param: xml node
1049 # returns: one UMLClassMetadata object
1050 sub fromWSXMLNode {
1051 my $UMLClassMetadataNode = $_[1];
1052
1053 ## begin ELEMENT_NODE children ##
1054 my $description;
1055 my $fullyQualifiedName;
1056 my $id;
1057 my $name;
1058 ## end ELEMENT_NODE children ##
1059
1060 # get all children for this node
1061 for my $childrenNode ($UMLClassMetadataNode->getChildNodes) {
1062 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1063 if( ! defined($childrenNode->getFirstChild) ){ next; };
1064 my $textNode = $childrenNode->getFirstChild;
1065 ## begin iterate ELEMENT_NODE ##
1066 if (0) {
1067 # do nothing, just a place holder for "if" component
1068 }
1069 elsif ($childrenNode->getNodeName eq "description") {
1070 $description=$textNode->getNodeValue;
1071 }
1072 elsif ($childrenNode->getNodeName eq "fullyQualifiedName") {
1073 $fullyQualifiedName=$textNode->getNodeValue;
1074 }
1075 elsif ($childrenNode->getNodeName eq "id") {
1076 $id=$textNode->getNodeValue;
1077 }
1078 elsif ($childrenNode->getNodeName eq "name") {
1079 $name=$textNode->getNodeValue;
1080 }
1081 ## end iterate ELEMENT_NODE ##
1082 }
1083 }
1084 my $newobj = new CaCORE::CaDSR::UMLProject::UMLClassMetadata;
1085 ## begin set attr ##
1086 $newobj->setDescription($description);
1087 $newobj->setFullyQualifiedName($fullyQualifiedName);
1088 $newobj->setId($id);
1089 $newobj->setName($name);
1090 ## end set attr ##
1091
1092 return $newobj;
1093 }
1094
1095 ## begin getters and setters ##
1096
1097 sub getDescription {
1098 my $self = shift;
1099 return $self->{description};
1100 }
1101  
1102 sub setDescription {
1103 my $self = shift;
1104 $self->{description} = shift;
1105 }
1106  
1107 sub getFullyQualifiedName {
1108 my $self = shift;
1109 return $self->{fullyQualifiedName};
1110 }
1111  
1112 sub setFullyQualifiedName {
1113 my $self = shift;
1114 $self->{fullyQualifiedName} = shift;
1115 }
1116  
1117 sub getId {
1118 my $self = shift;
1119 return $self->{id};
1120 }
1121  
1122 sub setId {
1123 my $self = shift;
1124 $self->{id} = shift;
1125 }
1126  
1127 sub getName {
1128 my $self = shift;
1129 return $self->{name};
1130 }
1131  
1132 sub setName {
1133 my $self = shift;
1134 $self->{name} = shift;
1135 }
1136  
1137 ## end getters and setters ##
1138
1139 ## begin bean association methods ##
1140
1141 sub getUMLAssociationMetadataCollection {
1142 my $self = shift;
1143 my $appSvc = CaCORE::ApplicationService->instance();
1144 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::UMLAssociationMetadata", $self);
1145 return @results;
1146 }
1147  
1148 sub getUMLAttributeMetadataCollection {
1149 my $self = shift;
1150 my $appSvc = CaCORE::ApplicationService->instance();
1151 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::UMLAttributeMetadata", $self);
1152 return @results;
1153 }
1154  
1155 sub getUMLGeneralizationMetadata {
1156 my $self = shift;
1157 my $appSvc = CaCORE::ApplicationService->instance();
1158 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::UMLGeneralizationMetadata", $self);
1159 return $results[0];
1160 }
1161  
1162 sub getUMLPackageMetadata {
1163 my $self = shift;
1164 my $appSvc = CaCORE::ApplicationService->instance();
1165 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::UMLPackageMetadata", $self);
1166 return $results[0];
1167 }
1168  
1169 sub getObjectClass {
1170 my $self = shift;
1171 my $appSvc = CaCORE::ApplicationService->instance();
1172 my @results = $appSvc->queryObject("CaCORE::CaDSR::ObjectClass", $self);
1173 return $results[0];
1174 }
1175  
1176 sub getProject {
1177 my $self = shift;
1178 my $appSvc = CaCORE::ApplicationService->instance();
1179 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::Project", $self);
1180 return $results[0];
1181 }
1182  
1183 sub getSemanticMetadataCollection {
1184 my $self = shift;
1185 my $appSvc = CaCORE::ApplicationService->instance();
1186 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::SemanticMetadata", $self);
1187 return @results;
1188 }
1189  
1190 ## end bean association methods ##
1191
1192 1;
1193 #end
1194 # ------------------------------------------------------------------------------------------
1195 package CaCORE::CaDSR::UMLProject::AttributeTypeMetadata;
1196
1197 use 5.005;
1198 #use strict;
1199 use warnings;
1200
1201 require Exporter;
1202
1203 use XML::DOM;
1204
1205 ## begin import objects ##
1206 use CaCORE::ApplicationService;
1207 ## end import objects ##
1208
1209
1210 @ISA = qw(CaCORE::DomainObjectI);
1211
1212 our %EXPORT_TAGS = ( 'all' => [ qw(
1213
1214 ) ] );
1215
1216 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
1217
1218 our @EXPORT = qw(
1219 );
1220
1221 # create an instance of the AttributeTypeMetadata object
1222 # returns: a AttributeTypeMetadata object
1223 sub new {
1224 my $class = shift;
1225 my $self = {};
1226 bless($self, $class);
1227 #print "new AttributeTypeMetadata\n";
1228 return $self;
1229 }
1230
1231 # Construct the specific section of the WSDL request corresponding
1232 # to this AttributeTypeMetadata intance
1233 # returns: XML in string format
1234 sub toWebserviceXML {
1235 my $self = shift;
1236 my $result = shift;
1237 my $assigned_id = shift;
1238 my $current_id = shift;
1239 my $l = shift;
1240 my %worklist = %$l;
1241
1242 # prefix portion of the xml
1243 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":AttributeTypeMetadata\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.umlproject.cadsr.nci.nih.gov\">";
1244 my $tmpstr = "";
1245 $current_id ++;
1246
1247 ## begin attribute to XML ##
1248 # id;
1249 if( defined( $self->getId ) ) {
1250 $tmpstr = "<id xsi:type=\"xsd:string\">" . $self->getId . "</id>";
1251 } else {
1252 $tmpstr = "<id xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1253 }
1254 $result .= $tmpstr;
1255  
1256 # valueDomainDataType;
1257 if( defined( $self->getValueDomainDataType ) ) {
1258 $tmpstr = "<valueDomainDataType xsi:type=\"xsd:string\">" . $self->getValueDomainDataType . "</valueDomainDataType>";
1259 } else {
1260 $tmpstr = "<valueDomainDataType xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1261 }
1262 $result .= $tmpstr;
1263  
1264 # valueDomainLongName;
1265 if( defined( $self->getValueDomainLongName ) ) {
1266 $tmpstr = "<valueDomainLongName xsi:type=\"xsd:string\">" . $self->getValueDomainLongName . "</valueDomainLongName>";
1267 } else {
1268 $tmpstr = "<valueDomainLongName xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1269 }
1270 $result .= $tmpstr;
1271  
1272 ## end attribute to XML ##
1273
1274 ## begin association to XML ##
1275 ## end association to XML ##
1276
1277 # add trailing close tags
1278 $result .= "</multiRef>";
1279
1280 return ($result, $current_id, %worklist);
1281 }
1282
1283 # parse a given webservice response xml, construct a list of AttributeTypeMetadata objects
1284 # param: xml doc
1285 # returns: list of AttributeTypeMetadata objects
1286 sub fromWebserviceXML {
1287 my $self = shift;
1288 my $parser = new XML::DOM::Parser;
1289 my $docnode = $parser->parse(shift);
1290 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
1291
1292 return $self->fromWSXMLListNode($root);
1293 }
1294
1295 # parse a given xml node, construct a list of AttributeTypeMetadata objects
1296 # param: xml node
1297 # returns: a list of AttributeTypeMetadata objects
1298 sub fromWSXMLListNode {
1299 my $self = shift;
1300 my $listNode = shift;
1301 my @obj_list = ();
1302
1303 # get all children for this node
1304 for my $childrenNode ($listNode->getChildNodes) {
1305 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1306 my $newobj = $self->fromWSXMLNode($childrenNode);
1307 push @obj_list, $newobj;
1308 }
1309 }
1310
1311 return @obj_list;
1312 }
1313
1314 # parse a given xml node, construct one AttributeTypeMetadata object
1315 # param: xml node
1316 # returns: one AttributeTypeMetadata object
1317 sub fromWSXMLNode {
1318 my $AttributeTypeMetadataNode = $_[1];
1319
1320 ## begin ELEMENT_NODE children ##
1321 my $id;
1322 my $valueDomainDataType;
1323 my $valueDomainLongName;
1324 ## end ELEMENT_NODE children ##
1325
1326 # get all children for this node
1327 for my $childrenNode ($AttributeTypeMetadataNode->getChildNodes) {
1328 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1329 if( ! defined($childrenNode->getFirstChild) ){ next; };
1330 my $textNode = $childrenNode->getFirstChild;
1331 ## begin iterate ELEMENT_NODE ##
1332 if (0) {
1333 # do nothing, just a place holder for "if" component
1334 }
1335 elsif ($childrenNode->getNodeName eq "id") {
1336 $id=$textNode->getNodeValue;
1337 }
1338 elsif ($childrenNode->getNodeName eq "valueDomainDataType") {
1339 $valueDomainDataType=$textNode->getNodeValue;
1340 }
1341 elsif ($childrenNode->getNodeName eq "valueDomainLongName") {
1342 $valueDomainLongName=$textNode->getNodeValue;
1343 }
1344 ## end iterate ELEMENT_NODE ##
1345 }
1346 }
1347 my $newobj = new CaCORE::CaDSR::UMLProject::AttributeTypeMetadata;
1348 ## begin set attr ##
1349 $newobj->setId($id);
1350 $newobj->setValueDomainDataType($valueDomainDataType);
1351 $newobj->setValueDomainLongName($valueDomainLongName);
1352 ## end set attr ##
1353
1354 return $newobj;
1355 }
1356
1357 ## begin getters and setters ##
1358
1359 sub getId {
1360 my $self = shift;
1361 return $self->{id};
1362 }
1363  
1364 sub setId {
1365 my $self = shift;
1366 $self->{id} = shift;
1367 }
1368  
1369 sub getValueDomainDataType {
1370 my $self = shift;
1371 return $self->{valueDomainDataType};
1372 }
1373  
1374 sub setValueDomainDataType {
1375 my $self = shift;
1376 $self->{valueDomainDataType} = shift;
1377 }
1378  
1379 sub getValueDomainLongName {
1380 my $self = shift;
1381 return $self->{valueDomainLongName};
1382 }
1383  
1384 sub setValueDomainLongName {
1385 my $self = shift;
1386 $self->{valueDomainLongName} = shift;
1387 }
1388  
1389 ## end getters and setters ##
1390
1391 ## begin bean association methods ##
1392
1393 sub getSemanticMetadataCollection {
1394 my $self = shift;
1395 my $appSvc = CaCORE::ApplicationService->instance();
1396 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::SemanticMetadata", $self);
1397 return @results;
1398 }
1399  
1400 sub getTypeEnumerationCollection {
1401 my $self = shift;
1402 my $appSvc = CaCORE::ApplicationService->instance();
1403 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::TypeEnumerationMetadata", $self);
1404 return @results;
1405 }
1406  
1407 sub getValueDomain {
1408 my $self = shift;
1409 my $appSvc = CaCORE::ApplicationService->instance();
1410 my @results = $appSvc->queryObject("CaCORE::CaDSR::ValueDomain", $self);
1411 return $results[0];
1412 }
1413  
1414 ## end bean association methods ##
1415
1416 1;
1417 #end
1418 # ------------------------------------------------------------------------------------------
1419 package CaCORE::CaDSR::UMLProject::UMLAttributeMetadata;
1420
1421 use 5.005;
1422 #use strict;
1423 use warnings;
1424
1425 require Exporter;
1426
1427 use XML::DOM;
1428
1429 ## begin import objects ##
1430 use CaCORE::ApplicationService;
1431 ## end import objects ##
1432
1433
1434 @ISA = qw(CaCORE::DomainObjectI);
1435
1436 our %EXPORT_TAGS = ( 'all' => [ qw(
1437
1438 ) ] );
1439
1440 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
1441
1442 our @EXPORT = qw(
1443 );
1444
1445 # create an instance of the UMLAttributeMetadata object
1446 # returns: a UMLAttributeMetadata object
1447 sub new {
1448 my $class = shift;
1449 my $self = {};
1450 bless($self, $class);
1451 #print "new UMLAttributeMetadata\n";
1452 return $self;
1453 }
1454
1455 # Construct the specific section of the WSDL request corresponding
1456 # to this UMLAttributeMetadata intance
1457 # returns: XML in string format
1458 sub toWebserviceXML {
1459 my $self = shift;
1460 my $result = shift;
1461 my $assigned_id = shift;
1462 my $current_id = shift;
1463 my $l = shift;
1464 my %worklist = %$l;
1465
1466 # prefix portion of the xml
1467 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":UMLAttributeMetadata\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.umlproject.cadsr.nci.nih.gov\">";
1468 my $tmpstr = "";
1469 $current_id ++;
1470
1471 ## begin attribute to XML ##
1472 # description;
1473 if( defined( $self->getDescription ) ) {
1474 $tmpstr = "<description xsi:type=\"xsd:string\">" . $self->getDescription . "</description>";
1475 } else {
1476 $tmpstr = "<description xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1477 }
1478 $result .= $tmpstr;
1479  
1480 # fullyQualifiedName;
1481 if( defined( $self->getFullyQualifiedName ) ) {
1482 $tmpstr = "<fullyQualifiedName xsi:type=\"xsd:string\">" . $self->getFullyQualifiedName . "</fullyQualifiedName>";
1483 } else {
1484 $tmpstr = "<fullyQualifiedName xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1485 }
1486 $result .= $tmpstr;
1487  
1488 # id;
1489 if( defined( $self->getId ) ) {
1490 $tmpstr = "<id xsi:type=\"xsd:string\">" . $self->getId . "</id>";
1491 } else {
1492 $tmpstr = "<id xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1493 }
1494 $result .= $tmpstr;
1495  
1496 # name;
1497 if( defined( $self->getName ) ) {
1498 $tmpstr = "<name xsi:type=\"xsd:string\">" . $self->getName . "</name>";
1499 } else {
1500 $tmpstr = "<name xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1501 }
1502 $result .= $tmpstr;
1503  
1504 ## end attribute to XML ##
1505
1506 ## begin association to XML ##
1507 ## end association to XML ##
1508
1509 # add trailing close tags
1510 $result .= "</multiRef>";
1511
1512 return ($result, $current_id, %worklist);
1513 }
1514
1515 # parse a given webservice response xml, construct a list of UMLAttributeMetadata objects
1516 # param: xml doc
1517 # returns: list of UMLAttributeMetadata objects
1518 sub fromWebserviceXML {
1519 my $self = shift;
1520 my $parser = new XML::DOM::Parser;
1521 my $docnode = $parser->parse(shift);
1522 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
1523
1524 return $self->fromWSXMLListNode($root);
1525 }
1526
1527 # parse a given xml node, construct a list of UMLAttributeMetadata objects
1528 # param: xml node
1529 # returns: a list of UMLAttributeMetadata objects
1530 sub fromWSXMLListNode {
1531 my $self = shift;
1532 my $listNode = shift;
1533 my @obj_list = ();
1534
1535 # get all children for this node
1536 for my $childrenNode ($listNode->getChildNodes) {
1537 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1538 my $newobj = $self->fromWSXMLNode($childrenNode);
1539 push @obj_list, $newobj;
1540 }
1541 }
1542
1543 return @obj_list;
1544 }
1545
1546 # parse a given xml node, construct one UMLAttributeMetadata object
1547 # param: xml node
1548 # returns: one UMLAttributeMetadata object
1549 sub fromWSXMLNode {
1550 my $UMLAttributeMetadataNode = $_[1];
1551
1552 ## begin ELEMENT_NODE children ##
1553 my $description;
1554 my $fullyQualifiedName;
1555 my $id;
1556 my $name;
1557 ## end ELEMENT_NODE children ##
1558
1559 # get all children for this node
1560 for my $childrenNode ($UMLAttributeMetadataNode->getChildNodes) {
1561 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1562 if( ! defined($childrenNode->getFirstChild) ){ next; };
1563 my $textNode = $childrenNode->getFirstChild;
1564 ## begin iterate ELEMENT_NODE ##
1565 if (0) {
1566 # do nothing, just a place holder for "if" component
1567 }
1568 elsif ($childrenNode->getNodeName eq "description") {
1569 $description=$textNode->getNodeValue;
1570 }
1571 elsif ($childrenNode->getNodeName eq "fullyQualifiedName") {
1572 $fullyQualifiedName=$textNode->getNodeValue;
1573 }
1574 elsif ($childrenNode->getNodeName eq "id") {
1575 $id=$textNode->getNodeValue;
1576 }
1577 elsif ($childrenNode->getNodeName eq "name") {
1578 $name=$textNode->getNodeValue;
1579 }
1580 ## end iterate ELEMENT_NODE ##
1581 }
1582 }
1583 my $newobj = new CaCORE::CaDSR::UMLProject::UMLAttributeMetadata;
1584 ## begin set attr ##
1585 $newobj->setDescription($description);
1586 $newobj->setFullyQualifiedName($fullyQualifiedName);
1587 $newobj->setId($id);
1588 $newobj->setName($name);
1589 ## end set attr ##
1590
1591 return $newobj;
1592 }
1593
1594 ## begin getters and setters ##
1595
1596 sub getDescription {
1597 my $self = shift;
1598 return $self->{description};
1599 }
1600  
1601 sub setDescription {
1602 my $self = shift;
1603 $self->{description} = shift;
1604 }
1605  
1606 sub getFullyQualifiedName {
1607 my $self = shift;
1608 return $self->{fullyQualifiedName};
1609 }
1610  
1611 sub setFullyQualifiedName {
1612 my $self = shift;
1613 $self->{fullyQualifiedName} = shift;
1614 }
1615  
1616 sub getId {
1617 my $self = shift;
1618 return $self->{id};
1619 }
1620  
1621 sub setId {
1622 my $self = shift;
1623 $self->{id} = shift;
1624 }
1625  
1626 sub getName {
1627 my $self = shift;
1628 return $self->{name};
1629 }
1630  
1631 sub setName {
1632 my $self = shift;
1633 $self->{name} = shift;
1634 }
1635  
1636 ## end getters and setters ##
1637
1638 ## begin bean association methods ##
1639
1640 sub getUMLClassMetadata {
1641 my $self = shift;
1642 my $appSvc = CaCORE::ApplicationService->instance();
1643 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::UMLClassMetadata", $self);
1644 return $results[0];
1645 }
1646  
1647 sub getAttributeTypeMetadata {
1648 my $self = shift;
1649 my $appSvc = CaCORE::ApplicationService->instance();
1650 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::AttributeTypeMetadata", $self);
1651 return $results[0];
1652 }
1653  
1654 sub getDataElement {
1655 my $self = shift;
1656 my $appSvc = CaCORE::ApplicationService->instance();
1657 my @results = $appSvc->queryObject("CaCORE::CaDSR::DataElement", $self);
1658 return $results[0];
1659 }
1660  
1661 sub getProject {
1662 my $self = shift;
1663 my $appSvc = CaCORE::ApplicationService->instance();
1664 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::Project", $self);
1665 return $results[0];
1666 }
1667  
1668 sub getSemanticMetadataCollection {
1669 my $self = shift;
1670 my $appSvc = CaCORE::ApplicationService->instance();
1671 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::SemanticMetadata", $self);
1672 return @results;
1673 }
1674  
1675 ## end bean association methods ##
1676
1677 1;
1678 #end
1679 # ------------------------------------------------------------------------------------------
1680 package CaCORE::CaDSR::UMLProject::UMLAssociationMetadata;
1681
1682 use 5.005;
1683 #use strict;
1684 use warnings;
1685
1686 require Exporter;
1687
1688 use XML::DOM;
1689
1690 ## begin import objects ##
1691 use CaCORE::ApplicationService;
1692 ## end import objects ##
1693
1694
1695 @ISA = qw(CaCORE::DomainObjectI);
1696
1697 our %EXPORT_TAGS = ( 'all' => [ qw(
1698
1699 ) ] );
1700
1701 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
1702
1703 our @EXPORT = qw(
1704 );
1705
1706 # create an instance of the UMLAssociationMetadata object
1707 # returns: a UMLAssociationMetadata object
1708 sub new {
1709 my $class = shift;
1710 my $self = {};
1711 bless($self, $class);
1712 #print "new UMLAssociationMetadata\n";
1713 return $self;
1714 }
1715
1716 # Construct the specific section of the WSDL request corresponding
1717 # to this UMLAssociationMetadata intance
1718 # returns: XML in string format
1719 sub toWebserviceXML {
1720 my $self = shift;
1721 my $result = shift;
1722 my $assigned_id = shift;
1723 my $current_id = shift;
1724 my $l = shift;
1725 my %worklist = %$l;
1726
1727 # prefix portion of the xml
1728 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":UMLAssociationMetadata\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.umlproject.cadsr.nci.nih.gov\">";
1729 my $tmpstr = "";
1730 $current_id ++;
1731
1732 ## begin attribute to XML ##
1733 # id;
1734 if( defined( $self->getId ) ) {
1735 $tmpstr = "<id xsi:type=\"xsd:string\">" . $self->getId . "</id>";
1736 } else {
1737 $tmpstr = "<id xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1738 }
1739 $result .= $tmpstr;
1740  
1741 # isBidirectional;
1742 if( defined( $self->getIsBidirectional ) ) {
1743 $tmpstr = "<isBidirectional xsi:type=\"xsd:boolean\">" . $self->getIsBidirectional . "</isBidirectional>";
1744 } else {
1745 $tmpstr = "<isBidirectional xsi:type=\"xsd:boolean\" xsi:nil=\"true\" />";
1746 }
1747 $result .= $tmpstr;
1748  
1749 # sourceHighCardinality;
1750 if( defined( $self->getSourceHighCardinality ) ) {
1751 $tmpstr = "<sourceHighCardinality xsi:type=\"xsd:int\">" . $self->getSourceHighCardinality . "</sourceHighCardinality>";
1752 } else {
1753 $tmpstr = "<sourceHighCardinality xsi:type=\"xsd:int\" xsi:nil=\"true\" />";
1754 }
1755 $result .= $tmpstr;
1756  
1757 # sourceLowCardinality;
1758 if( defined( $self->getSourceLowCardinality ) ) {
1759 $tmpstr = "<sourceLowCardinality xsi:type=\"xsd:int\">" . $self->getSourceLowCardinality . "</sourceLowCardinality>";
1760 } else {
1761 $tmpstr = "<sourceLowCardinality xsi:type=\"xsd:int\" xsi:nil=\"true\" />";
1762 }
1763 $result .= $tmpstr;
1764  
1765 # sourceRoleName;
1766 if( defined( $self->getSourceRoleName ) ) {
1767 $tmpstr = "<sourceRoleName xsi:type=\"xsd:string\">" . $self->getSourceRoleName . "</sourceRoleName>";
1768 } else {
1769 $tmpstr = "<sourceRoleName xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1770 }
1771 $result .= $tmpstr;
1772  
1773 # targetHighCardinality;
1774 if( defined( $self->getTargetHighCardinality ) ) {
1775 $tmpstr = "<targetHighCardinality xsi:type=\"xsd:int\">" . $self->getTargetHighCardinality . "</targetHighCardinality>";
1776 } else {
1777 $tmpstr = "<targetHighCardinality xsi:type=\"xsd:int\" xsi:nil=\"true\" />";
1778 }
1779 $result .= $tmpstr;
1780  
1781 # targetLowCardinality;
1782 if( defined( $self->getTargetLowCardinality ) ) {
1783 $tmpstr = "<targetLowCardinality xsi:type=\"xsd:int\">" . $self->getTargetLowCardinality . "</targetLowCardinality>";
1784 } else {
1785 $tmpstr = "<targetLowCardinality xsi:type=\"xsd:int\" xsi:nil=\"true\" />";
1786 }
1787 $result .= $tmpstr;
1788  
1789 # targetRoleName;
1790 if( defined( $self->getTargetRoleName ) ) {
1791 $tmpstr = "<targetRoleName xsi:type=\"xsd:string\">" . $self->getTargetRoleName . "</targetRoleName>";
1792 } else {
1793 $tmpstr = "<targetRoleName xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1794 }
1795 $result .= $tmpstr;
1796  
1797 ## end attribute to XML ##
1798
1799 ## begin association to XML ##
1800 ## end association to XML ##
1801
1802 # add trailing close tags
1803 $result .= "</multiRef>";
1804
1805 return ($result, $current_id, %worklist);
1806 }
1807
1808 # parse a given webservice response xml, construct a list of UMLAssociationMetadata objects
1809 # param: xml doc
1810 # returns: list of UMLAssociationMetadata objects
1811 sub fromWebserviceXML {
1812 my $self = shift;
1813 my $parser = new XML::DOM::Parser;
1814 my $docnode = $parser->parse(shift);
1815 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
1816
1817 return $self->fromWSXMLListNode($root);
1818 }
1819
1820 # parse a given xml node, construct a list of UMLAssociationMetadata objects
1821 # param: xml node
1822 # returns: a list of UMLAssociationMetadata objects
1823 sub fromWSXMLListNode {
1824 my $self = shift;
1825 my $listNode = shift;
1826 my @obj_list = ();
1827
1828 # get all children for this node
1829 for my $childrenNode ($listNode->getChildNodes) {
1830 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1831 my $newobj = $self->fromWSXMLNode($childrenNode);
1832 push @obj_list, $newobj;
1833 }
1834 }
1835
1836 return @obj_list;
1837 }
1838
1839 # parse a given xml node, construct one UMLAssociationMetadata object
1840 # param: xml node
1841 # returns: one UMLAssociationMetadata object
1842 sub fromWSXMLNode {
1843 my $UMLAssociationMetadataNode = $_[1];
1844
1845 ## begin ELEMENT_NODE children ##
1846 my $id;
1847 my $isBidirectional;
1848 my $sourceHighCardinality;
1849 my $sourceLowCardinality;
1850 my $sourceRoleName;
1851 my $targetHighCardinality;
1852 my $targetLowCardinality;
1853 my $targetRoleName;
1854 ## end ELEMENT_NODE children ##
1855
1856 # get all children for this node
1857 for my $childrenNode ($UMLAssociationMetadataNode->getChildNodes) {
1858 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1859 if( ! defined($childrenNode->getFirstChild) ){ next; };
1860 my $textNode = $childrenNode->getFirstChild;
1861 ## begin iterate ELEMENT_NODE ##
1862 if (0) {
1863 # do nothing, just a place holder for "if" component
1864 }
1865 elsif ($childrenNode->getNodeName eq "id") {
1866 $id=$textNode->getNodeValue;
1867 }
1868 elsif ($childrenNode->getNodeName eq "isBidirectional") {
1869 $isBidirectional=$textNode->getNodeValue;
1870 }
1871 elsif ($childrenNode->getNodeName eq "sourceHighCardinality") {
1872 $sourceHighCardinality=$textNode->getNodeValue;
1873 }
1874 elsif ($childrenNode->getNodeName eq "sourceLowCardinality") {
1875 $sourceLowCardinality=$textNode->getNodeValue;
1876 }
1877 elsif ($childrenNode->getNodeName eq "sourceRoleName") {
1878 $sourceRoleName=$textNode->getNodeValue;
1879 }
1880 elsif ($childrenNode->getNodeName eq "targetHighCardinality") {
1881 $targetHighCardinality=$textNode->getNodeValue;
1882 }
1883 elsif ($childrenNode->getNodeName eq "targetLowCardinality") {
1884 $targetLowCardinality=$textNode->getNodeValue;
1885 }
1886 elsif ($childrenNode->getNodeName eq "targetRoleName") {
1887 $targetRoleName=$textNode->getNodeValue;
1888 }
1889 ## end iterate ELEMENT_NODE ##
1890 }
1891 }
1892 my $newobj = new CaCORE::CaDSR::UMLProject::UMLAssociationMetadata;
1893 ## begin set attr ##
1894 $newobj->setId($id);
1895 $newobj->setIsBidirectional($isBidirectional);
1896 $newobj->setSourceHighCardinality($sourceHighCardinality);
1897 $newobj->setSourceLowCardinality($sourceLowCardinality);
1898 $newobj->setSourceRoleName($sourceRoleName);
1899 $newobj->setTargetHighCardinality($targetHighCardinality);
1900 $newobj->setTargetLowCardinality($targetLowCardinality);
1901 $newobj->setTargetRoleName($targetRoleName);
1902 ## end set attr ##
1903
1904 return $newobj;
1905 }
1906
1907 ## begin getters and setters ##
1908
1909 sub getId {
1910 my $self = shift;
1911 return $self->{id};
1912 }
1913  
1914 sub setId {
1915 my $self = shift;
1916 $self->{id} = shift;
1917 }
1918  
1919 sub getIsBidirectional {
1920 my $self = shift;
1921 return $self->{isBidirectional};
1922 }
1923  
1924 sub setIsBidirectional {
1925 my $self = shift;
1926 $self->{isBidirectional} = shift;
1927 }
1928  
1929 sub getSourceHighCardinality {
1930 my $self = shift;
1931 return $self->{sourceHighCardinality};
1932 }
1933  
1934 sub setSourceHighCardinality {
1935 my $self = shift;
1936 $self->{sourceHighCardinality} = shift;
1937 }
1938  
1939 sub getSourceLowCardinality {
1940 my $self = shift;
1941 return $self->{sourceLowCardinality};
1942 }
1943  
1944 sub setSourceLowCardinality {
1945 my $self = shift;
1946 $self->{sourceLowCardinality} = shift;
1947 }
1948  
1949 sub getSourceRoleName {
1950 my $self = shift;
1951 return $self->{sourceRoleName};
1952 }
1953  
1954 sub setSourceRoleName {
1955 my $self = shift;
1956 $self->{sourceRoleName} = shift;
1957 }
1958  
1959 sub getTargetHighCardinality {
1960 my $self = shift;
1961 return $self->{targetHighCardinality};
1962 }
1963  
1964 sub setTargetHighCardinality {
1965 my $self = shift;
1966 $self->{targetHighCardinality} = shift;
1967 }
1968  
1969 sub getTargetLowCardinality {
1970 my $self = shift;
1971 return $self->{targetLowCardinality};
1972 }
1973  
1974 sub setTargetLowCardinality {
1975 my $self = shift;
1976 $self->{targetLowCardinality} = shift;
1977 }
1978  
1979 sub getTargetRoleName {
1980 my $self = shift;
1981 return $self->{targetRoleName};
1982 }
1983  
1984 sub setTargetRoleName {
1985 my $self = shift;
1986 $self->{targetRoleName} = shift;
1987 }
1988  
1989 ## end getters and setters ##
1990
1991 ## begin bean association methods ##
1992
1993 sub getObjectClassRelationship {
1994 my $self = shift;
1995 my $appSvc = CaCORE::ApplicationService->instance();
1996 my @results = $appSvc->queryObject("CaCORE::CaDSR::ObjectClassRelationship", $self);
1997 return $results[0];
1998 }
1999  
2000 sub getProject {
2001 my $self = shift;
2002 my $appSvc = CaCORE::ApplicationService->instance();
2003 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::Project", $self);
2004 return $results[0];
2005 }
2006  
2007 sub getSemanticMetadataCollection {
2008 my $self = shift;
2009 my $appSvc = CaCORE::ApplicationService->instance();
2010 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::SemanticMetadata", $self);
2011 return @results;
2012 }
2013  
2014 sub getSourceUMLClassMetadata {
2015 my $self = shift;
2016 my $appSvc = CaCORE::ApplicationService->instance();
2017 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::UMLClassMetadata", $self);
2018 return $results[0];
2019 }
2020  
2021 sub getTargetUMLClassMetadata {
2022 my $self = shift;
2023 my $appSvc = CaCORE::ApplicationService->instance();
2024 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::UMLClassMetadata", $self);
2025 return $results[0];
2026 }
2027  
2028 ## end bean association methods ##
2029
2030 1;
2031 #end
2032 # ------------------------------------------------------------------------------------------
2033 package CaCORE::CaDSR::UMLProject::SemanticMetadata;
2034
2035 use 5.005;
2036 #use strict;
2037 use warnings;
2038
2039 require Exporter;
2040
2041 use XML::DOM;
2042
2043 ## begin import objects ##
2044 use CaCORE::ApplicationService;
2045 ## end import objects ##
2046
2047
2048 @ISA = qw(CaCORE::DomainObjectI);
2049
2050 our %EXPORT_TAGS = ( 'all' => [ qw(
2051
2052 ) ] );
2053
2054 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
2055
2056 our @EXPORT = qw(
2057 );
2058
2059 # create an instance of the SemanticMetadata object
2060 # returns: a SemanticMetadata object
2061 sub new {
2062 my $class = shift;
2063 my $self = {};
2064 bless($self, $class);
2065 #print "new SemanticMetadata\n";
2066 return $self;
2067 }
2068
2069 # Construct the specific section of the WSDL request corresponding
2070 # to this SemanticMetadata intance
2071 # returns: XML in string format
2072 sub toWebserviceXML {
2073 my $self = shift;
2074 my $result = shift;
2075 my $assigned_id = shift;
2076 my $current_id = shift;
2077 my $l = shift;
2078 my %worklist = %$l;
2079
2080 # prefix portion of the xml
2081 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":SemanticMetadata\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.umlproject.cadsr.nci.nih.gov\">";
2082 my $tmpstr = "";
2083 $current_id ++;
2084
2085 ## begin attribute to XML ##
2086 # conceptCode;
2087 if( defined( $self->getConceptCode ) ) {
2088 $tmpstr = "<conceptCode xsi:type=\"xsd:string\">" . $self->getConceptCode . "</conceptCode>";
2089 } else {
2090 $tmpstr = "<conceptCode xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
2091 }
2092 $result .= $tmpstr;
2093  
2094 # conceptDefinition;
2095 if( defined( $self->getConceptDefinition ) ) {
2096 $tmpstr = "<conceptDefinition xsi:type=\"xsd:string\">" . $self->getConceptDefinition . "</conceptDefinition>";
2097 } else {
2098 $tmpstr = "<conceptDefinition xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
2099 }
2100 $result .= $tmpstr;
2101  
2102 # conceptName;
2103 if( defined( $self->getConceptName ) ) {
2104 $tmpstr = "<conceptName xsi:type=\"xsd:string\">" . $self->getConceptName . "</conceptName>";
2105 } else {
2106 $tmpstr = "<conceptName xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
2107 }
2108 $result .= $tmpstr;
2109  
2110 # id;
2111 if( defined( $self->getId ) ) {
2112 $tmpstr = "<id xsi:type=\"xsd:string\">" . $self->getId . "</id>";
2113 } else {
2114 $tmpstr = "<id xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
2115 }
2116 $result .= $tmpstr;
2117  
2118 # isPrimaryConcept;
2119 if( defined( $self->getIsPrimaryConcept ) ) {
2120 $tmpstr = "<isPrimaryConcept xsi:type=\"xsd:boolean\">" . $self->getIsPrimaryConcept . "</isPrimaryConcept>";
2121 } else {
2122 $tmpstr = "<isPrimaryConcept xsi:type=\"xsd:boolean\" xsi:nil=\"true\" />";
2123 }
2124 $result .= $tmpstr;
2125  
2126 # order;
2127 if( defined( $self->getOrder ) ) {
2128 $tmpstr = "<order xsi:type=\"xsd:int\">" . $self->getOrder . "</order>";
2129 } else {
2130 $tmpstr = "<order xsi:type=\"xsd:int\" xsi:nil=\"true\" />";
2131 }
2132 $result .= $tmpstr;
2133  
2134 # orderLevel;
2135 if( defined( $self->getOrderLevel ) ) {
2136 $tmpstr = "<orderLevel xsi:type=\"xsd:int\">" . $self->getOrderLevel . "</orderLevel>";
2137 } else {
2138 $tmpstr = "<orderLevel xsi:type=\"xsd:int\" xsi:nil=\"true\" />";
2139 }
2140 $result .= $tmpstr;
2141  
2142 ## end attribute to XML ##
2143
2144 ## begin association to XML ##
2145 ## end association to XML ##
2146
2147 # add trailing close tags
2148 $result .= "</multiRef>";
2149
2150 return ($result, $current_id, %worklist);
2151 }
2152
2153 # parse a given webservice response xml, construct a list of SemanticMetadata objects
2154 # param: xml doc
2155 # returns: list of SemanticMetadata objects
2156 sub fromWebserviceXML {
2157 my $self = shift;
2158 my $parser = new XML::DOM::Parser;
2159 my $docnode = $parser->parse(shift);
2160 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
2161
2162 return $self->fromWSXMLListNode($root);
2163 }
2164
2165 # parse a given xml node, construct a list of SemanticMetadata objects
2166 # param: xml node
2167 # returns: a list of SemanticMetadata objects
2168 sub fromWSXMLListNode {
2169 my $self = shift;
2170 my $listNode = shift;
2171 my @obj_list = ();
2172
2173 # get all children for this node
2174 for my $childrenNode ($listNode->getChildNodes) {
2175 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
2176 my $newobj = $self->fromWSXMLNode($childrenNode);
2177 push @obj_list, $newobj;
2178 }
2179 }
2180
2181 return @obj_list;
2182 }
2183
2184 # parse a given xml node, construct one SemanticMetadata object
2185 # param: xml node
2186 # returns: one SemanticMetadata object
2187 sub fromWSXMLNode {
2188 my $SemanticMetadataNode = $_[1];
2189
2190 ## begin ELEMENT_NODE children ##
2191 my $conceptCode;
2192 my $conceptDefinition;
2193 my $conceptName;
2194 my $id;
2195 my $isPrimaryConcept;
2196 my $order;
2197 my $orderLevel;
2198 ## end ELEMENT_NODE children ##
2199
2200 # get all children for this node
2201 for my $childrenNode ($SemanticMetadataNode->getChildNodes) {
2202 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
2203 if( ! defined($childrenNode->getFirstChild) ){ next; };
2204 my $textNode = $childrenNode->getFirstChild;
2205 ## begin iterate ELEMENT_NODE ##
2206 if (0) {
2207 # do nothing, just a place holder for "if" component
2208 }
2209 elsif ($childrenNode->getNodeName eq "conceptCode") {
2210 $conceptCode=$textNode->getNodeValue;
2211 }
2212 elsif ($childrenNode->getNodeName eq "conceptDefinition") {
2213 $conceptDefinition=$textNode->getNodeValue;
2214 }
2215 elsif ($childrenNode->getNodeName eq "conceptName") {
2216 $conceptName=$textNode->getNodeValue;
2217 }
2218 elsif ($childrenNode->getNodeName eq "id") {
2219 $id=$textNode->getNodeValue;
2220 }
2221 elsif ($childrenNode->getNodeName eq "isPrimaryConcept") {
2222 $isPrimaryConcept=$textNode->getNodeValue;
2223 }
2224 elsif ($childrenNode->getNodeName eq "order") {
2225 $order=$textNode->getNodeValue;
2226 }
2227 elsif ($childrenNode->getNodeName eq "orderLevel") {
2228 $orderLevel=$textNode->getNodeValue;
2229 }
2230 ## end iterate ELEMENT_NODE ##
2231 }
2232 }
2233 my $newobj = new CaCORE::CaDSR::UMLProject::SemanticMetadata;
2234 ## begin set attr ##
2235 $newobj->setConceptCode($conceptCode);
2236 $newobj->setConceptDefinition($conceptDefinition);
2237 $newobj->setConceptName($conceptName);
2238 $newobj->setId($id);
2239 $newobj->setIsPrimaryConcept($isPrimaryConcept);
2240 $newobj->setOrder($order);
2241 $newobj->setOrderLevel($orderLevel);
2242 ## end set attr ##
2243
2244 return $newobj;
2245 }
2246
2247 ## begin getters and setters ##
2248
2249 sub getConceptCode {
2250 my $self = shift;
2251 return $self->{conceptCode};
2252 }
2253  
2254 sub setConceptCode {
2255 my $self = shift;
2256 $self->{conceptCode} = shift;
2257 }
2258  
2259 sub getConceptDefinition {
2260 my $self = shift;
2261 return $self->{conceptDefinition};
2262 }
2263  
2264 sub setConceptDefinition {
2265 my $self = shift;
2266 $self->{conceptDefinition} = shift;
2267 }
2268  
2269 sub getConceptName {
2270 my $self = shift;
2271 return $self->{conceptName};
2272 }
2273  
2274 sub setConceptName {
2275 my $self = shift;
2276 $self->{conceptName} = shift;
2277 }
2278  
2279 sub getId {
2280 my $self = shift;
2281 return $self->{id};
2282 }
2283  
2284 sub setId {
2285 my $self = shift;
2286 $self->{id} = shift;
2287 }
2288  
2289 sub getIsPrimaryConcept {
2290 my $self = shift;
2291 return $self->{isPrimaryConcept};
2292 }
2293  
2294 sub setIsPrimaryConcept {
2295 my $self = shift;
2296 $self->{isPrimaryConcept} = shift;
2297 }
2298  
2299 sub getOrder {
2300 my $self = shift;
2301 return $self->{order};
2302 }
2303  
2304 sub setOrder {
2305 my $self = shift;
2306 $self->{order} = shift;
2307 }
2308  
2309 sub getOrderLevel {
2310 my $self = shift;
2311 return $self->{orderLevel};
2312 }
2313  
2314 sub setOrderLevel {
2315 my $self = shift;
2316 $self->{orderLevel} = shift;
2317 }
2318  
2319 ## end getters and setters ##
2320
2321 ## begin bean association methods ##
2322
2323 sub getConcept {
2324 my $self = shift;
2325 my $appSvc = CaCORE::ApplicationService->instance();
2326 my @results = $appSvc->queryObject("CaCORE::CaDSR::Concept", $self);
2327 return $results[0];
2328 }
2329  
2330 ## end bean association methods ##
2331
2332 1;
2333 #end
2334 # ------------------------------------------------------------------------------------------
2335 package CaCORE::CaDSR::UMLProject::TypeEnumerationMetadata;
2336
2337 use 5.005;
2338 #use strict;
2339 use warnings;
2340
2341 require Exporter;
2342
2343 use XML::DOM;
2344
2345 ## begin import objects ##
2346 use CaCORE::ApplicationService;
2347 ## end import objects ##
2348
2349
2350 @ISA = qw(CaCORE::DomainObjectI);
2351
2352 our %EXPORT_TAGS = ( 'all' => [ qw(
2353
2354 ) ] );
2355
2356 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
2357
2358 our @EXPORT = qw(
2359 );
2360
2361 # create an instance of the TypeEnumerationMetadata object
2362 # returns: a TypeEnumerationMetadata object
2363 sub new {
2364 my $class = shift;
2365 my $self = {};
2366 bless($self, $class);
2367 #print "new TypeEnumerationMetadata\n";
2368 return $self;
2369 }
2370
2371 # Construct the specific section of the WSDL request corresponding
2372 # to this TypeEnumerationMetadata intance
2373 # returns: XML in string format
2374 sub toWebserviceXML {
2375 my $self = shift;
2376 my $result = shift;
2377 my $assigned_id = shift;
2378 my $current_id = shift;
2379 my $l = shift;
2380 my %worklist = %$l;
2381
2382 # prefix portion of the xml
2383 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":TypeEnumerationMetadata\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.umlproject.cadsr.nci.nih.gov\">";
2384 my $tmpstr = "";
2385 $current_id ++;
2386
2387 ## begin attribute to XML ##
2388 # id;
2389 if( defined( $self->getId ) ) {
2390 $tmpstr = "<id xsi:type=\"xsd:string\">" . $self->getId . "</id>";
2391 } else {
2392 $tmpstr = "<id xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
2393 }
2394 $result .= $tmpstr;
2395  
2396 # permissibleValue;
2397 if( defined( $self->getPermissibleValue ) ) {
2398 $tmpstr = "<permissibleValue xsi:type=\"xsd:string\">" . $self->getPermissibleValue . "</permissibleValue>";
2399 } else {
2400 $tmpstr = "<permissibleValue xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
2401 }
2402 $result .= $tmpstr;
2403  
2404 # valueMeaning;
2405 if( defined( $self->getValueMeaning ) ) {
2406 $tmpstr = "<valueMeaning xsi:type=\"xsd:string\">" . $self->getValueMeaning . "</valueMeaning>";
2407 } else {
2408 $tmpstr = "<valueMeaning xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
2409 }
2410 $result .= $tmpstr;
2411  
2412 ## end attribute to XML ##
2413
2414 ## begin association to XML ##
2415 ## end association to XML ##
2416
2417 # add trailing close tags
2418 $result .= "</multiRef>";
2419
2420 return ($result, $current_id, %worklist);
2421 }
2422
2423 # parse a given webservice response xml, construct a list of TypeEnumerationMetadata objects
2424 # param: xml doc
2425 # returns: list of TypeEnumerationMetadata objects
2426 sub fromWebserviceXML {
2427 my $self = shift;
2428 my $parser = new XML::DOM::Parser;
2429 my $docnode = $parser->parse(shift);
2430 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
2431
2432 return $self->fromWSXMLListNode($root);
2433 }
2434
2435 # parse a given xml node, construct a list of TypeEnumerationMetadata objects
2436 # param: xml node
2437 # returns: a list of TypeEnumerationMetadata objects
2438 sub fromWSXMLListNode {
2439 my $self = shift;
2440 my $listNode = shift;
2441 my @obj_list = ();
2442
2443 # get all children for this node
2444 for my $childrenNode ($listNode->getChildNodes) {
2445 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
2446 my $newobj = $self->fromWSXMLNode($childrenNode);
2447 push @obj_list, $newobj;
2448 }
2449 }
2450
2451 return @obj_list;
2452 }
2453
2454 # parse a given xml node, construct one TypeEnumerationMetadata object
2455 # param: xml node
2456 # returns: one TypeEnumerationMetadata object
2457 sub fromWSXMLNode {
2458 my $TypeEnumerationMetadataNode = $_[1];
2459
2460 ## begin ELEMENT_NODE children ##
2461 my $id;
2462 my $permissibleValue;
2463 my $valueMeaning;
2464 ## end ELEMENT_NODE children ##
2465
2466 # get all children for this node
2467 for my $childrenNode ($TypeEnumerationMetadataNode->getChildNodes) {
2468 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
2469 if( ! defined($childrenNode->getFirstChild) ){ next; };
2470 my $textNode = $childrenNode->getFirstChild;
2471 ## begin iterate ELEMENT_NODE ##
2472 if (0) {
2473 # do nothing, just a place holder for "if" component
2474 }
2475 elsif ($childrenNode->getNodeName eq "id") {
2476 $id=$textNode->getNodeValue;
2477 }
2478 elsif ($childrenNode->getNodeName eq "permissibleValue") {
2479 $permissibleValue=$textNode->getNodeValue;
2480 }
2481 elsif ($childrenNode->getNodeName eq "valueMeaning") {
2482 $valueMeaning=$textNode->getNodeValue;
2483 }
2484 ## end iterate ELEMENT_NODE ##
2485 }
2486 }
2487 my $newobj = new CaCORE::CaDSR::UMLProject::TypeEnumerationMetadata;
2488 ## begin set attr ##
2489 $newobj->setId($id);
2490 $newobj->setPermissibleValue($permissibleValue);
2491 $newobj->setValueMeaning($valueMeaning);
2492 ## end set attr ##
2493
2494 return $newobj;
2495 }
2496
2497 ## begin getters and setters ##
2498
2499 sub getId {
2500 my $self = shift;
2501 return $self->{id};
2502 }
2503  
2504 sub setId {
2505 my $self = shift;
2506 $self->{id} = shift;
2507 }
2508  
2509 sub getPermissibleValue {
2510 my $self = shift;
2511 return $self->{permissibleValue};
2512 }
2513  
2514 sub setPermissibleValue {
2515 my $self = shift;
2516 $self->{permissibleValue} = shift;
2517 }
2518  
2519 sub getValueMeaning {
2520 my $self = shift;
2521 return $self->{valueMeaning};
2522 }
2523  
2524 sub setValueMeaning {
2525 my $self = shift;
2526 $self->{valueMeaning} = shift;
2527 }
2528  
2529 ## end getters and setters ##
2530
2531 ## begin bean association methods ##
2532
2533 sub getSemanticMetadataCollection {
2534 my $self = shift;
2535 my $appSvc = CaCORE::ApplicationService->instance();
2536 my @results = $appSvc->queryObject("CaCORE::CaDSR::UMLProject::SemanticMetadata", $self);
2537 return @results;
2538 }
2539  
2540 ## end bean association methods ##
2541
2542 1;
2543 #end
2544 # Below is module documentation for AttributeTypeMetadata
2545
2546 =pod
2547
2548 =head1 AttributeTypeMetadata
2549
2550 CaCORE::CaDSR::UMLProject::AttributeTypeMetadata - Perl extension for AttributeTypeMetadata.
2551
2552 =head2 ABSTRACT
2553
2554 The CaCORE::CaDSR::UMLProject::AttributeTypeMetadata is a Perl object representation of the
2555 CaCORE AttributeTypeMetadata object.
2556
2557
2558 =head2 SYNOPSIS
2559
2560 See L<CaCORE::ApplicationService>.
2561
2562 =head2 DESCRIPTION
2563
2564
2565
2566 =head2 ATTRIBUTES of AttributeTypeMetadata
2567
2568 The following are all the attributes of the AttributeTypeMetadata object and their data types:
2569
2570 =over 4
2571
2572 =item id
2573  
2574 data type: C<string>
2575  
2576 =item valueDomainDataType
2577  
2578 data type: C<string>
2579  
2580 =item valueDomainLongName
2581  
2582 data type: C<string>
2583  
2584
2585 =back
2586
2587 Note: Although you can also use the corresponding setter methods to set the
2588 attribute values, it is not recommended to do so unless you absolutely have
2589 to change the object's attributes.
2590
2591 =head2 ASSOCIATIONS of AttributeTypeMetadata
2592
2593 The following are all the objects that are associated with the AttributeTypeMetadata:
2594
2595 =over 4
2596
2597 =item Instance of L</SemanticMetadata>:
2598  
2599 One to many assoication, use C<getSemanticMetadataCollection> to get a collection of associated SemanticMetadata.
2600  
2601 =item Instance of L</TypeEnumeration>:
2602  
2603 One to many assoication, use C<getTypeEnumerationCollection> to get a collection of associated TypeEnumeration.
2604  
2605 =item Collection of L</ValueDomain>:
2606  
2607 Many to one assoication, use C<getValueDomain> to get the associated ValueDomain.
2608  
2609
2610 =back
2611
2612 =cut
2613
2614 # Below is module documentation for Project
2615
2616 =pod
2617
2618 =head1 Project
2619
2620 CaCORE::CaDSR::UMLProject::Project - Perl extension for Project.
2621
2622 =head2 ABSTRACT
2623
2624 The CaCORE::CaDSR::UMLProject::Project is a Perl object representation of the
2625 CaCORE Project object.
2626
2627
2628 =head2 SYNOPSIS
2629
2630 See L<CaCORE::ApplicationService>.
2631
2632 =head2 DESCRIPTION
2633
2634
2635
2636 =head2 ATTRIBUTES of Project
2637
2638 The following are all the attributes of the Project object and their data types:
2639
2640 =over 4
2641
2642 =item description
2643  
2644 data type: C<string>
2645  
2646 =item id
2647  
2648 data type: C<string>
2649  
2650 =item longName
2651  
2652 data type: C<string>
2653  
2654 =item shortName
2655  
2656 data type: C<string>
2657  
2658 =item version
2659  
2660 data type: C<string>
2661  
2662
2663 =back
2664
2665 Note: Although you can also use the corresponding setter methods to set the
2666 attribute values, it is not recommended to do so unless you absolutely have
2667 to change the object's attributes.
2668
2669 =head2 ASSOCIATIONS of Project
2670
2671 The following are all the objects that are associated with the Project:
2672
2673 =over 4
2674
2675 =item Instance of L</UMLAssociationMetadata>:
2676  
2677 One to many assoication, use C<getUMLAssociationMetadataCollection> to get a collection of associated UMLAssociationMetadata.
2678  
2679 =item Instance of L</UMLAttributeMetadata>:
2680  
2681 One to many assoication, use C<getUMLAttributeMetadataCollection> to get a collection of associated UMLAttributeMetadata.
2682  
2683 =item Instance of L</UMLClassMetadata>:
2684  
2685 One to many assoication, use C<getUMLClassMetadataCollection> to get a collection of associated UMLClassMetadata.
2686  
2687 =item Instance of L</UMLPackageMetadata>:
2688  
2689 One to many assoication, use C<getUMLPackageMetadataCollection> to get a collection of associated UMLPackageMetadata.
2690  
2691 =item Collection of L</ClassificationScheme>:
2692  
2693 Many to one assoication, use C<getClassificationScheme> to get the associated ClassificationScheme.
2694  
2695 =item Instance of L</SubProject>:
2696  
2697 One to many assoication, use C<getSubProjectCollection> to get a collection of associated SubProject.
2698  
2699
2700 =back
2701
2702 =cut
2703
2704 # Below is module documentation for SemanticMetadata
2705
2706 =pod
2707
2708 =head1 SemanticMetadata
2709
2710 CaCORE::CaDSR::UMLProject::SemanticMetadata - Perl extension for SemanticMetadata.
2711
2712 =head2 ABSTRACT
2713
2714 The CaCORE::CaDSR::UMLProject::SemanticMetadata is a Perl object representation of the
2715 CaCORE SemanticMetadata object.
2716
2717
2718 =head2 SYNOPSIS
2719
2720 See L<CaCORE::ApplicationService>.
2721
2722 =head2 DESCRIPTION
2723
2724
2725
2726 =head2 ATTRIBUTES of SemanticMetadata
2727
2728 The following are all the attributes of the SemanticMetadata object and their data types:
2729
2730 =over 4
2731
2732 =item conceptCode
2733  
2734 data type: C<string>
2735  
2736 =item conceptDefinition
2737  
2738 data type: C<string>
2739  
2740 =item conceptName
2741  
2742 data type: C<string>
2743  
2744 =item id
2745  
2746 data type: C<string>
2747  
2748 =item isPrimaryConcept
2749  
2750 data type: C<boolean>
2751  
2752 =item order
2753  
2754 data type: C<int>
2755  
2756 =item orderLevel
2757  
2758 data type: C<int>
2759  
2760
2761 =back
2762
2763 Note: Although you can also use the corresponding setter methods to set the
2764 attribute values, it is not recommended to do so unless you absolutely have
2765 to change the object's attributes.
2766
2767 =head2 ASSOCIATIONS of SemanticMetadata
2768
2769 The following are all the objects that are associated with the SemanticMetadata:
2770
2771 =over 4
2772
2773 =item Collection of L</Concept>:
2774  
2775 Many to one assoication, use C<getConcept> to get the associated Concept.
2776  
2777
2778 =back
2779
2780 =cut
2781
2782 # Below is module documentation for SubProject
2783
2784 =pod
2785
2786 =head1 SubProject
2787
2788 CaCORE::CaDSR::UMLProject::SubProject - Perl extension for SubProject.
2789
2790 =head2 ABSTRACT
2791
2792 The CaCORE::CaDSR::UMLProject::SubProject is a Perl object representation of the
2793 CaCORE SubProject object.
2794
2795
2796 =head2 SYNOPSIS
2797
2798 See L<CaCORE::ApplicationService>.
2799
2800 =head2 DESCRIPTION
2801
2802
2803
2804 =head2 ATTRIBUTES of SubProject
2805
2806 The following are all the attributes of the SubProject object and their data types:
2807
2808 =over 4
2809
2810 =item description
2811  
2812 data type: C<string>
2813  
2814 =item id
2815  
2816 data type: C<string>
2817  
2818 =item name
2819  
2820 data type: C<string>
2821  
2822
2823 =back
2824
2825 Note: Although you can also use the corresponding setter methods to set the
2826 attribute values, it is not recommended to do so unless you absolutely have
2827 to change the object's attributes.
2828
2829 =head2 ASSOCIATIONS of SubProject
2830
2831 The following are all the objects that are associated with the SubProject:
2832
2833 =over 4
2834
2835 =item Instance of L</UMLPackageMetadata>:
2836  
2837 One to many assoication, use C<getUMLPackageMetadataCollection> to get a collection of associated UMLPackageMetadata.
2838  
2839 =item Collection of L</ClassSchemeClassSchemeItem>:
2840  
2841 Many to one assoication, use C<getClassSchemeClassSchemeItem> to get the associated ClassSchemeClassSchemeItem.
2842  
2843 =item Collection of L</Project>:
2844  
2845 Many to one assoication, use C<getProject> to get the associated Project.
2846  
2847
2848 =back
2849
2850 =cut
2851
2852 # Below is module documentation for TypeEnumerationMetadata
2853
2854 =pod
2855
2856 =head1 TypeEnumerationMetadata
2857
2858 CaCORE::CaDSR::UMLProject::TypeEnumerationMetadata - Perl extension for TypeEnumerationMetadata.
2859
2860 =head2 ABSTRACT
2861
2862 The CaCORE::CaDSR::UMLProject::TypeEnumerationMetadata is a Perl object representation of the
2863 CaCORE TypeEnumerationMetadata object.
2864
2865
2866 =head2 SYNOPSIS
2867
2868 See L<CaCORE::ApplicationService>.
2869
2870 =head2 DESCRIPTION
2871
2872
2873
2874 =head2 ATTRIBUTES of TypeEnumerationMetadata
2875
2876 The following are all the attributes of the TypeEnumerationMetadata object and their data types:
2877
2878 =over 4
2879
2880 =item id
2881  
2882 data type: C<string>
2883  
2884 =item permissibleValue
2885  
2886 data type: C<string>
2887  
2888 =item valueMeaning
2889  
2890 data type: C<string>
2891  
2892
2893 =back
2894
2895 Note: Although you can also use the corresponding setter methods to set the
2896 attribute values, it is not recommended to do so unless you absolutely have
2897 to change the object's attributes.
2898
2899 =head2 ASSOCIATIONS of TypeEnumerationMetadata
2900
2901 The following are all the objects that are associated with the TypeEnumerationMetadata:
2902
2903 =over 4
2904
2905 =item Instance of L</SemanticMetadata>:
2906  
2907 One to many assoication, use C<getSemanticMetadataCollection> to get a collection of associated SemanticMetadata.
2908  
2909
2910 =back
2911
2912 =cut
2913
2914 # Below is module documentation for UMLAssociationMetadata
2915
2916 =pod
2917
2918 =head1 UMLAssociationMetadata
2919
2920 CaCORE::CaDSR::UMLProject::UMLAssociationMetadata - Perl extension for UMLAssociationMetadata.
2921
2922 =head2 ABSTRACT
2923
2924 The CaCORE::CaDSR::UMLProject::UMLAssociationMetadata is a Perl object representation of the
2925 CaCORE UMLAssociationMetadata object.
2926
2927
2928 =head2 SYNOPSIS
2929
2930 See L<CaCORE::ApplicationService>.
2931
2932 =head2 DESCRIPTION
2933
2934
2935
2936 =head2 ATTRIBUTES of UMLAssociationMetadata
2937
2938 The following are all the attributes of the UMLAssociationMetadata object and their data types:
2939
2940 =over 4
2941
2942 =item id
2943  
2944 data type: C<string>
2945  
2946 =item isBidirectional
2947  
2948 data type: C<boolean>
2949  
2950 =item sourceHighCardinality
2951  
2952 data type: C<int>
2953  
2954 =item sourceLowCardinality
2955  
2956 data type: C<int>
2957  
2958 =item sourceRoleName
2959  
2960 data type: C<string>
2961  
2962 =item targetHighCardinality
2963  
2964 data type: C<int>
2965  
2966 =item targetLowCardinality
2967  
2968 data type: C<int>
2969  
2970 =item targetRoleName
2971  
2972 data type: C<string>
2973  
2974
2975 =back
2976
2977 Note: Although you can also use the corresponding setter methods to set the
2978 attribute values, it is not recommended to do so unless you absolutely have
2979 to change the object's attributes.
2980
2981 =head2 ASSOCIATIONS of UMLAssociationMetadata
2982
2983 The following are all the objects that are associated with the UMLAssociationMetadata:
2984
2985 =over 4
2986
2987 =item Collection of L</ObjectClassRelationship>:
2988  
2989 Many to one assoication, use C<getObjectClassRelationship> to get the associated ObjectClassRelationship.
2990  
2991 =item Collection of L</Project>:
2992  
2993 Many to one assoication, use C<getProject> to get the associated Project.
2994  
2995 =item Instance of L</SemanticMetadata>:
2996  
2997 One to many assoication, use C<getSemanticMetadataCollection> to get a collection of associated SemanticMetadata.
2998  
2999 =item Collection of L</SourceUMLClassMetadata>:
3000  
3001 Many to one assoication, use C<getSourceUMLClassMetadata> to get the associated SourceUMLClassMetadata.
3002  
3003 =item Collection of L</TargetUMLClassMetadata>:
3004  
3005 Many to one assoication, use C<getTargetUMLClassMetadata> to get the associated TargetUMLClassMetadata.
3006  
3007
3008 =back
3009
3010 =cut
3011
3012 # Below is module documentation for UMLAttributeMetadata
3013
3014 =pod
3015
3016 =head1 UMLAttributeMetadata
3017
3018 CaCORE::CaDSR::UMLProject::UMLAttributeMetadata - Perl extension for UMLAttributeMetadata.
3019
3020 =head2 ABSTRACT
3021
3022 The CaCORE::CaDSR::UMLProject::UMLAttributeMetadata is a Perl object representation of the
3023 CaCORE UMLAttributeMetadata object.
3024
3025
3026 =head2 SYNOPSIS
3027
3028 See L<CaCORE::ApplicationService>.
3029
3030 =head2 DESCRIPTION
3031
3032
3033
3034 =head2 ATTRIBUTES of UMLAttributeMetadata
3035
3036 The following are all the attributes of the UMLAttributeMetadata object and their data types:
3037
3038 =over 4
3039
3040 =item description
3041  
3042 data type: C<string>
3043  
3044 =item fullyQualifiedName
3045  
3046 data type: C<string>
3047  
3048 =item id
3049  
3050 data type: C<string>
3051  
3052 =item name
3053  
3054 data type: C<string>
3055  
3056
3057 =back
3058
3059 Note: Although you can also use the corresponding setter methods to set the
3060 attribute values, it is not recommended to do so unless you absolutely have
3061 to change the object's attributes.
3062
3063 =head2 ASSOCIATIONS of UMLAttributeMetadata
3064
3065 The following are all the objects that are associated with the UMLAttributeMetadata:
3066
3067 =over 4
3068
3069 =item Collection of L</UMLClassMetadata>:
3070  
3071 Many to one assoication, use C<getUMLClassMetadata> to get the associated UMLClassMetadata.
3072  
3073 =item Collection of L</AttributeTypeMetadata>:
3074  
3075 Many to one assoication, use C<getAttributeTypeMetadata> to get the associated AttributeTypeMetadata.
3076  
3077 =item Collection of L</DataElement>:
3078  
3079 Many to one assoication, use C<getDataElement> to get the associated DataElement.
3080  
3081 =item Collection of L</Project>:
3082  
3083 Many to one assoication, use C<getProject> to get the associated Project.
3084  
3085 =item Instance of L</SemanticMetadata>:
3086  
3087 One to many assoication, use C<getSemanticMetadataCollection> to get a collection of associated SemanticMetadata.
3088  
3089
3090 =back
3091
3092 =cut
3093
3094 # Below is module documentation for UMLClassMetadata
3095
3096 =pod
3097
3098 =head1 UMLClassMetadata
3099
3100 CaCORE::CaDSR::UMLProject::UMLClassMetadata - Perl extension for UMLClassMetadata.
3101
3102 =head2 ABSTRACT
3103
3104 The CaCORE::CaDSR::UMLProject::UMLClassMetadata is a Perl object representation of the
3105 CaCORE UMLClassMetadata object.
3106
3107
3108 =head2 SYNOPSIS
3109
3110 See L<CaCORE::ApplicationService>.
3111
3112 =head2 DESCRIPTION
3113
3114
3115
3116 =head2 ATTRIBUTES of UMLClassMetadata
3117
3118 The following are all the attributes of the UMLClassMetadata object and their data types:
3119
3120 =over 4
3121
3122 =item description
3123  
3124 data type: C<string>
3125  
3126 =item fullyQualifiedName
3127  
3128 data type: C<string>
3129  
3130 =item id
3131  
3132 data type: C<string>
3133  
3134 =item name
3135  
3136 data type: C<string>
3137  
3138
3139 =back
3140
3141 Note: Although you can also use the corresponding setter methods to set the
3142 attribute values, it is not recommended to do so unless you absolutely have
3143 to change the object's attributes.
3144
3145 =head2 ASSOCIATIONS of UMLClassMetadata
3146
3147 The following are all the objects that are associated with the UMLClassMetadata:
3148
3149 =over 4
3150
3151 =item Instance of L</UMLAssociationMetadata>:
3152  
3153 One to many assoication, use C<getUMLAssociationMetadataCollection> to get a collection of associated UMLAssociationMetadata.
3154  
3155 =item Instance of L</UMLAttributeMetadata>:
3156  
3157 One to many assoication, use C<getUMLAttributeMetadataCollection> to get a collection of associated UMLAttributeMetadata.
3158  
3159 =item Collection of L</UMLGeneralizationMetadata>:
3160  
3161 Many to one assoication, use C<getUMLGeneralizationMetadata> to get the associated UMLGeneralizationMetadata.
3162  
3163 =item Collection of L</UMLPackageMetadata>:
3164  
3165 Many to one assoication, use C<getUMLPackageMetadata> to get the associated UMLPackageMetadata.
3166  
3167 =item Collection of L</ObjectClass>:
3168  
3169 Many to one assoication, use C<getObjectClass> to get the associated ObjectClass.
3170  
3171 =item Collection of L</Project>:
3172  
3173 Many to one assoication, use C<getProject> to get the associated Project.
3174  
3175 =item Instance of L</SemanticMetadata>:
3176  
3177 One to many assoication, use C<getSemanticMetadataCollection> to get a collection of associated SemanticMetadata.
3178  
3179
3180 =back
3181
3182 =cut
3183
3184 # Below is module documentation for UMLGeneralizationMetadata
3185
3186 =pod
3187
3188 =head1 UMLGeneralizationMetadata
3189
3190 CaCORE::CaDSR::UMLProject::UMLGeneralizationMetadata - Perl extension for UMLGeneralizationMetadata.
3191
3192 =head2 ABSTRACT
3193
3194 The CaCORE::CaDSR::UMLProject::UMLGeneralizationMetadata is a Perl object representation of the
3195 CaCORE UMLGeneralizationMetadata object.
3196
3197
3198 =head2 SYNOPSIS
3199
3200 See L<CaCORE::ApplicationService>.
3201
3202 =head2 DESCRIPTION
3203
3204
3205
3206 =head2 ATTRIBUTES of UMLGeneralizationMetadata
3207
3208 The following are all the attributes of the UMLGeneralizationMetadata object and their data types:
3209
3210 =over 4
3211
3212 =item id
3213  
3214 data type: C<string>
3215  
3216
3217 =back
3218
3219 Note: Although you can also use the corresponding setter methods to set the
3220 attribute values, it is not recommended to do so unless you absolutely have
3221 to change the object's attributes.
3222
3223 =head2 ASSOCIATIONS of UMLGeneralizationMetadata
3224
3225 The following are all the objects that are associated with the UMLGeneralizationMetadata:
3226
3227 =over 4
3228
3229 =item Collection of L</ObjectClassRelationship>:
3230  
3231 Many to one assoication, use C<getObjectClassRelationship> to get the associated ObjectClassRelationship.
3232  
3233 =item Collection of L</SuperUMLClassMetadata>:
3234  
3235 Many to one assoication, use C<getSuperUMLClassMetadata> to get the associated SuperUMLClassMetadata.
3236  
3237
3238 =back
3239
3240 =cut
3241
3242 # Below is module documentation for UMLPackageMetadata
3243
3244 =pod
3245
3246 =head1 UMLPackageMetadata
3247
3248 CaCORE::CaDSR::UMLProject::UMLPackageMetadata - Perl extension for UMLPackageMetadata.
3249
3250 =head2 ABSTRACT
3251
3252 The CaCORE::CaDSR::UMLProject::UMLPackageMetadata is a Perl object representation of the
3253 CaCORE UMLPackageMetadata object.
3254
3255
3256 =head2 SYNOPSIS
3257
3258 See L<CaCORE::ApplicationService>.
3259
3260 =head2 DESCRIPTION
3261
3262
3263
3264 =head2 ATTRIBUTES of UMLPackageMetadata
3265
3266 The following are all the attributes of the UMLPackageMetadata object and their data types:
3267
3268 =over 4
3269
3270 =item description
3271  
3272 data type: C<string>
3273  
3274 =item id
3275  
3276 data type: C<string>
3277  
3278 =item name
3279  
3280 data type: C<string>
3281  
3282
3283 =back
3284
3285 Note: Although you can also use the corresponding setter methods to set the
3286 attribute values, it is not recommended to do so unless you absolutely have
3287 to change the object's attributes.
3288
3289 =head2 ASSOCIATIONS of UMLPackageMetadata
3290
3291 The following are all the objects that are associated with the UMLPackageMetadata:
3292
3293 =over 4
3294
3295 =item Instance of L</UMLClassMetadata>:
3296  
3297 One to many assoication, use C<getUMLClassMetadataCollection> to get a collection of associated UMLClassMetadata.
3298  
3299 =item Collection of L</ClassSchemeClassSchemeItem>:
3300  
3301 Many to one assoication, use C<getClassSchemeClassSchemeItem> to get the associated ClassSchemeClassSchemeItem.
3302  
3303 =item Collection of L</Project>:
3304  
3305 Many to one assoication, use C<getProject> to get the associated Project.
3306  
3307 =item Collection of L</SubProject>:
3308  
3309 Many to one assoication, use C<getSubProject> to get the associated SubProject.
3310  
3311
3312 =back
3313
3314 =cut
3315
3316
3317 =pod
3318
3319 =head1 SUPPORT
3320
3321 Please do not contact author directly. Send email to ncicb@pop.nci.nih.gov to request
3322 support or report a bug.
3323
3324 =head1 AUTHOR
3325
3326 Shan Jiang <jiangs@mail.nih.gov>
3327
3328 =head1 COPYRIGHT AND LICENSE
3329
3330 The CaCORE Software License, Version 1.0
3331
3332 Copyright 2001-2005 SAIC. This software was developed in conjunction with the National Cancer Institute, and so to the extent government employees are co-authors, any rights in such works shall be subject to Title 17 of the United States Code, section 105. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
3333
3334 =over 1
3335
3336 =item 1
3337
3338 Redistributions of source code must retain the above copyright notice, this list of conditions and the disclaimer of Article 5, below. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the disclaimer of Article 5 in the documentation and/or other materials provided with the distribution.
3339
3340 =item 2
3341
3342 The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by SAIC and the National Cancer Institute." If no such end-user documentation is to be included, this acknowledgment shall appear in the software itself, wherever such third-party acknowledgments normally appear.
3343
3344 =item 3
3345
3346 The names "The National Cancer Institute", "NCI" and "SAIC" must not be used to endorse or promote products derived from this software. This license does not authorize the licensee to use any trademarks owned by either NCI or SAIC.
3347
3348 =item 4
3349
3350 This license does not authorize or prohibit the incorporation of this software into any third party proprietary programs. Licensee is expressly made responsible for obtaining any permission required to incorporate this software into third party proprietary programs and for informing licensee's end-users of their obligation to secure any required permissions before incorporating this software into third party proprietary software programs.
3351
3352 =item 5
3353
3354 THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE) ARE DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, SAIC, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3355
3356 =back
3357
3358 =cut
3359
3360