Common/Provenance.pm untested

filter: Statementstmt 0.0% 0 / 940 Branchbran 0.0% 0 / 224 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 167 Podpod 0.0% 0 / 127 totaltotal 0.0% 0 / 1458 CC 113 SCAR 36.3
CC
113
Cov
0%
fromWSXMLNode
156.0
fromWSXMLNode
156.0
fromWSXMLNode
110.0
CRAP 37.7
1 # ------------------------------------------------------------------------------------------
2 package CaCORE::Common::Provenance::Source;
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 Source object
30 # returns: a Source object
31 sub new {
32 my $class = shift;
33 my $self = {};
34 bless($self, $class);
35 #print "new Source\n";
36 return $self;
37 }
38
39 # Construct the specific section of the WSDL request corresponding
40 # to this Source 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 . ":Source\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.provenance.common.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:long\">" . $self->getId . "</id>";
59 } else {
60 $tmpstr = "<id xsi:type=\"xsd:long\" xsi:nil=\"true\" />";
61 }
62 $result .= $tmpstr;
63  
64 # name;
65 if( defined( $self->getName ) ) {
66 $tmpstr = "<name xsi:type=\"xsd:string\">" . $self->getName . "</name>";
67 } else {
68 $tmpstr = "<name xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
69 }
70 $result .= $tmpstr;
71  
72 ## end attribute to XML ##
73
74 ## begin association to XML ##
75 ## end association to XML ##
76
77 # add trailing close tags
78 $result .= "</multiRef>";
79
80 return ($result, $current_id, %worklist);
81 }
82
83 # parse a given webservice response xml, construct a list of Source objects
84 # param: xml doc
85 # returns: list of Source objects
86 sub fromWebserviceXML {
87 my $self = shift;
88 my $parser = new XML::DOM::Parser;
89 my $docnode = $parser->parse(shift);
90 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
91
92 return $self->fromWSXMLListNode($root);
93 }
94
95 # parse a given xml node, construct a list of Source objects
96 # param: xml node
97 # returns: a list of Source objects
98 sub fromWSXMLListNode {
99 my $self = shift;
100 my $listNode = shift;
101 my @obj_list = ();
102
103 # get all children for this node
104 for my $childrenNode ($listNode->getChildNodes) {
105 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
106 my $newobj = $self->fromWSXMLNode($childrenNode);
107 push @obj_list, $newobj;
108 }
109 }
110
111 return @obj_list;
112 }
113
114 # parse a given xml node, construct one Source object
115 # param: xml node
116 # returns: one Source object
117 sub fromWSXMLNode {
118 my $SourceNode = $_[1];
119
120 ## begin ELEMENT_NODE children ##
121 my $id;
122 my $name;
123 ## end ELEMENT_NODE children ##
124
125 # get all children for this node
126 for my $childrenNode ($SourceNode->getChildNodes) {
127 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
128 if( ! defined($childrenNode->getFirstChild) ){ next; };
129 my $textNode = $childrenNode->getFirstChild;
130 ## begin iterate ELEMENT_NODE ##
131 if (0) {
132 # do nothing, just a place holder for "if" component
133 }
134 elsif ($childrenNode->getNodeName eq "id") {
135 $id=$textNode->getNodeValue;
136 }
137 elsif ($childrenNode->getNodeName eq "name") {
138 $name=$textNode->getNodeValue;
139 }
140 ## end iterate ELEMENT_NODE ##
141 }
142 }
143 my $newobj = new CaCORE::Common::Provenance::Source;
144 ## begin set attr ##
145 $newobj->setId($id);
146 $newobj->setName($name);
147 ## end set attr ##
148
149 return $newobj;
150 }
151
152 ## begin getters and setters ##
153
154 sub getId {
155 my $self = shift;
156 return $self->{id};
157 }
158  
159 sub setId {
160 my $self = shift;
161 $self->{id} = shift;
162 }
163  
164 sub getName {
165 my $self = shift;
166 return $self->{name};
167 }
168  
169 sub setName {
170 my $self = shift;
171 $self->{name} = shift;
172 }
173  
174 ## end getters and setters ##
175
176 ## begin bean association methods ##
177
178 ## end bean association methods ##
179
180 1;
181 #end
182 # ------------------------------------------------------------------------------------------
183 package CaCORE::Common::Provenance::PublicationSource;
184
185 use 5.005;
186 #use strict;
187 use warnings;
188
189 require Exporter;
190
191 use XML::DOM;
192
193 ## begin import objects ##
194 use CaCORE::ApplicationService;
195 ## end import objects ##
196
197
198 @ISA = qw(CaCORE::Common::Provenance::Source);
199 our %EXPORT_TAGS = ( 'all' => [ qw(
200
201 ) ] );
202
203 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
204
205 our @EXPORT = qw(
206 );
207
208 # create an instance of the PublicationSource object
209 # returns: a PublicationSource object
210 sub new {
211 my $class = shift;
212 my $self = {};
213 bless($self, $class);
214 #print "new PublicationSource\n";
215 return $self;
216 }
217
218 # Construct the specific section of the WSDL request corresponding
219 # to this PublicationSource intance
220 # returns: XML in string format
221 sub toWebserviceXML {
222 my $self = shift;
223 my $result = shift;
224 my $assigned_id = shift;
225 my $current_id = shift;
226 my $l = shift;
227 my %worklist = %$l;
228
229 # prefix portion of the xml
230 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":PublicationSource\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.provenance.common.nci.nih.gov\">";
231 my $tmpstr = "";
232 $current_id ++;
233
234 ## begin attribute to XML ##
235 # authors;
236 if( defined( $self->getAuthors ) ) {
237 $tmpstr = "<authors xsi:type=\"xsd:string\">" . $self->getAuthors . "</authors>";
238 } else {
239 $tmpstr = "<authors xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
240 }
241 $result .= $tmpstr;
242  
243 # endPage;
244 if( defined( $self->getEndPage ) ) {
245 $tmpstr = "<endPage xsi:type=\"xsd:int\">" . $self->getEndPage . "</endPage>";
246 } else {
247 $tmpstr = "<endPage xsi:type=\"xsd:int\" xsi:nil=\"true\" />";
248 }
249 $result .= $tmpstr;
250  
251 # startPage;
252 if( defined( $self->getStartPage ) ) {
253 $tmpstr = "<startPage xsi:type=\"xsd:int\">" . $self->getStartPage . "</startPage>";
254 } else {
255 $tmpstr = "<startPage xsi:type=\"xsd:int\" xsi:nil=\"true\" />";
256 }
257 $result .= $tmpstr;
258  
259 # title;
260 if( defined( $self->getTitle ) ) {
261 $tmpstr = "<title xsi:type=\"xsd:string\">" . $self->getTitle . "</title>";
262 } else {
263 $tmpstr = "<title xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
264 }
265 $result .= $tmpstr;
266  
267 # volume;
268 if( defined( $self->getVolume ) ) {
269 $tmpstr = "<volume xsi:type=\"xsd:int\">" . $self->getVolume . "</volume>";
270 } else {
271 $tmpstr = "<volume xsi:type=\"xsd:int\" xsi:nil=\"true\" />";
272 }
273 $result .= $tmpstr;
274  
275 # year;
276 if( defined( $self->getYear ) ) {
277 $tmpstr = "<year xsi:type=\"xsd:int\">" . $self->getYear . "</year>";
278 } else {
279 $tmpstr = "<year xsi:type=\"xsd:int\" xsi:nil=\"true\" />";
280 }
281 $result .= $tmpstr;
282  
283 # id;
284 if( defined( $self->getId ) ) {
285 $tmpstr = "<id xsi:type=\"xsd:long\">" . $self->getId . "</id>";
286 } else {
287 $tmpstr = "<id xsi:type=\"xsd:long\" xsi:nil=\"true\" />";
288 }
289 $result .= $tmpstr;
290  
291 # name;
292 if( defined( $self->getName ) ) {
293 $tmpstr = "<name xsi:type=\"xsd:string\">" . $self->getName . "</name>";
294 } else {
295 $tmpstr = "<name xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
296 }
297 $result .= $tmpstr;
298  
299 ## end attribute to XML ##
300
301 ## begin association to XML ##
302 ## end association to XML ##
303
304 # add trailing close tags
305 $result .= "</multiRef>";
306
307 return ($result, $current_id, %worklist);
308 }
309
310 # parse a given webservice response xml, construct a list of PublicationSource objects
311 # param: xml doc
312 # returns: list of PublicationSource objects
313 sub fromWebserviceXML {
314 my $self = shift;
315 my $parser = new XML::DOM::Parser;
316 my $docnode = $parser->parse(shift);
317 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
318
319 return $self->fromWSXMLListNode($root);
320 }
321
322 # parse a given xml node, construct a list of PublicationSource objects
323 # param: xml node
324 # returns: a list of PublicationSource objects
325 sub fromWSXMLListNode {
326 my $self = shift;
327 my $listNode = shift;
328 my @obj_list = ();
329
330 # get all children for this node
331 for my $childrenNode ($listNode->getChildNodes) {
332 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
333 my $newobj = $self->fromWSXMLNode($childrenNode);
334 push @obj_list, $newobj;
335 }
336 }
337
338 return @obj_list;
339 }
340
341 # parse a given xml node, construct one PublicationSource object
342 # param: xml node
343 # returns: one PublicationSource object
344 sub fromWSXMLNode {
345 my $PublicationSourceNode = $_[1];
346
347 ## begin ELEMENT_NODE children ##
348 my $authors;
349 my $endPage;
350 my $startPage;
351 my $title;
352 my $volume;
353 my $year;
354 my $id;
355 my $name;
356 ## end ELEMENT_NODE children ##
357
358 # get all children for this node
359 for my $childrenNode ($PublicationSourceNode->getChildNodes) {
360 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
361 if( ! defined($childrenNode->getFirstChild) ){ next; };
362 my $textNode = $childrenNode->getFirstChild;
363 ## begin iterate ELEMENT_NODE ##
364 if (0) {
365 # do nothing, just a place holder for "if" component
366 }
367 elsif ($childrenNode->getNodeName eq "authors") {
368 $authors=$textNode->getNodeValue;
369 }
370 elsif ($childrenNode->getNodeName eq "endPage") {
371 $endPage=$textNode->getNodeValue;
372 }
373 elsif ($childrenNode->getNodeName eq "startPage") {
374 $startPage=$textNode->getNodeValue;
375 }
376 elsif ($childrenNode->getNodeName eq "title") {
377 $title=$textNode->getNodeValue;
378 }
379 elsif ($childrenNode->getNodeName eq "volume") {
380 $volume=$textNode->getNodeValue;
381 }
382 elsif ($childrenNode->getNodeName eq "year") {
383 $year=$textNode->getNodeValue;
384 }
385 elsif ($childrenNode->getNodeName eq "id") {
386 $id=$textNode->getNodeValue;
387 }
388 elsif ($childrenNode->getNodeName eq "name") {
389 $name=$textNode->getNodeValue;
390 }
391 ## end iterate ELEMENT_NODE ##
392 }
393 }
394 my $newobj = new CaCORE::Common::Provenance::PublicationSource;
395 ## begin set attr ##
396 $newobj->setAuthors($authors);
397 $newobj->setEndPage($endPage);
398 $newobj->setStartPage($startPage);
399 $newobj->setTitle($title);
400 $newobj->setVolume($volume);
401 $newobj->setYear($year);
402 $newobj->setId($id);
403 $newobj->setName($name);
404 ## end set attr ##
405
406 return $newobj;
407 }
408
409 ## begin getters and setters ##
410
411 sub getAuthors {
412 my $self = shift;
413 return $self->{authors};
414 }
415  
416 sub setAuthors {
417 my $self = shift;
418 $self->{authors} = shift;
419 }
420  
421 sub getEndPage {
422 my $self = shift;
423 return $self->{endPage};
424 }
425  
426 sub setEndPage {
427 my $self = shift;
428 $self->{endPage} = shift;
429 }
430  
431 sub getStartPage {
432 my $self = shift;
433 return $self->{startPage};
434 }
435  
436 sub setStartPage {
437 my $self = shift;
438 $self->{startPage} = shift;
439 }
440  
441 sub getTitle {
442 my $self = shift;
443 return $self->{title};
444 }
445  
446 sub setTitle {
447 my $self = shift;
448 $self->{title} = shift;
449 }
450  
451 sub getVolume {
452 my $self = shift;
453 return $self->{volume};
454 }
455  
456 sub setVolume {
457 my $self = shift;
458 $self->{volume} = shift;
459 }
460  
461 sub getYear {
462 my $self = shift;
463 return $self->{year};
464 }
465  
466 sub setYear {
467 my $self = shift;
468 $self->{year} = shift;
469 }
470  
471 sub getId {
472 my $self = shift;
473 return $self->{id};
474 }
475  
476 sub setId {
477 my $self = shift;
478 $self->{id} = shift;
479 }
480  
481 sub getName {
482 my $self = shift;
483 return $self->{name};
484 }
485  
486 sub setName {
487 my $self = shift;
488 $self->{name} = shift;
489 }
490  
491 ## end getters and setters ##
492
493 ## begin bean association methods ##
494
495 ## end bean association methods ##
496
497 1;
498 #end
499 # ------------------------------------------------------------------------------------------
500 package CaCORE::Common::Provenance::SourceReference;
501
502 use 5.005;
503 #use strict;
504 use warnings;
505
506 require Exporter;
507
508 use XML::DOM;
509
510 ## begin import objects ##
511 use CaCORE::ApplicationService;
512 ## end import objects ##
513
514
515 @ISA = qw(CaCORE::DomainObjectI);
516
517 our %EXPORT_TAGS = ( 'all' => [ qw(
518
519 ) ] );
520
521 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
522
523 our @EXPORT = qw(
524 );
525
526 # create an instance of the SourceReference object
527 # returns: a SourceReference object
528 sub new {
529 my $class = shift;
530 my $self = {};
531 bless($self, $class);
532 #print "new SourceReference\n";
533 return $self;
534 }
535
536 # Construct the specific section of the WSDL request corresponding
537 # to this SourceReference intance
538 # returns: XML in string format
539 sub toWebserviceXML {
540 my $self = shift;
541 my $result = shift;
542 my $assigned_id = shift;
543 my $current_id = shift;
544 my $l = shift;
545 my %worklist = %$l;
546
547 # prefix portion of the xml
548 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":SourceReference\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.provenance.common.nci.nih.gov\">";
549 my $tmpstr = "";
550 $current_id ++;
551
552 ## begin attribute to XML ##
553 # id;
554 if( defined( $self->getId ) ) {
555 $tmpstr = "<id xsi:type=\"xsd:long\">" . $self->getId . "</id>";
556 } else {
557 $tmpstr = "<id xsi:type=\"xsd:long\" xsi:nil=\"true\" />";
558 }
559 $result .= $tmpstr;
560  
561 # reference;
562 if( defined( $self->getReference ) ) {
563 $tmpstr = "<reference xsi:type=\"xsd:string\">" . $self->getReference . "</reference>";
564 } else {
565 $tmpstr = "<reference xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
566 }
567 $result .= $tmpstr;
568  
569 # sourceReferenceType;
570 if( defined( $self->getSourceReferenceType ) ) {
571 $tmpstr = "<sourceReferenceType xsi:type=\"xsd:string\">" . $self->getSourceReferenceType . "</sourceReferenceType>";
572 } else {
573 $tmpstr = "<sourceReferenceType xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
574 }
575 $result .= $tmpstr;
576  
577 ## end attribute to XML ##
578
579 ## begin association to XML ##
580 ## end association to XML ##
581
582 # add trailing close tags
583 $result .= "</multiRef>";
584
585 return ($result, $current_id, %worklist);
586 }
587
588 # parse a given webservice response xml, construct a list of SourceReference objects
589 # param: xml doc
590 # returns: list of SourceReference objects
591 sub fromWebserviceXML {
592 my $self = shift;
593 my $parser = new XML::DOM::Parser;
594 my $docnode = $parser->parse(shift);
595 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
596
597 return $self->fromWSXMLListNode($root);
598 }
599
600 # parse a given xml node, construct a list of SourceReference objects
601 # param: xml node
602 # returns: a list of SourceReference objects
603 sub fromWSXMLListNode {
604 my $self = shift;
605 my $listNode = shift;
606 my @obj_list = ();
607
608 # get all children for this node
609 for my $childrenNode ($listNode->getChildNodes) {
610 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
611 my $newobj = $self->fromWSXMLNode($childrenNode);
612 push @obj_list, $newobj;
613 }
614 }
615
616 return @obj_list;
617 }
618
619 # parse a given xml node, construct one SourceReference object
620 # param: xml node
621 # returns: one SourceReference object
622 sub fromWSXMLNode {
623 my $SourceReferenceNode = $_[1];
624
625 ## begin ELEMENT_NODE children ##
626 my $id;
627 my $reference;
628 my $sourceReferenceType;
629 ## end ELEMENT_NODE children ##
630
631 # get all children for this node
632 for my $childrenNode ($SourceReferenceNode->getChildNodes) {
633 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
634 if( ! defined($childrenNode->getFirstChild) ){ next; };
635 my $textNode = $childrenNode->getFirstChild;
636 ## begin iterate ELEMENT_NODE ##
637 if (0) {
638 # do nothing, just a place holder for "if" component
639 }
640 elsif ($childrenNode->getNodeName eq "id") {
641 $id=$textNode->getNodeValue;
642 }
643 elsif ($childrenNode->getNodeName eq "reference") {
644 $reference=$textNode->getNodeValue;
645 }
646 elsif ($childrenNode->getNodeName eq "sourceReferenceType") {
647 $sourceReferenceType=$textNode->getNodeValue;
648 }
649 ## end iterate ELEMENT_NODE ##
650 }
651 }
652 my $newobj = new CaCORE::Common::Provenance::SourceReference;
653 ## begin set attr ##
654 $newobj->setId($id);
655 $newobj->setReference($reference);
656 $newobj->setSourceReferenceType($sourceReferenceType);
657 ## end set attr ##
658
659 return $newobj;
660 }
661
662 ## begin getters and setters ##
663
664 sub getId {
665 my $self = shift;
666 return $self->{id};
667 }
668  
669 sub setId {
670 my $self = shift;
671 $self->{id} = shift;
672 }
673  
674 sub getReference {
675 my $self = shift;
676 return $self->{reference};
677 }
678  
679 sub setReference {
680 my $self = shift;
681 $self->{reference} = shift;
682 }
683  
684 sub getSourceReferenceType {
685 my $self = shift;
686 return $self->{sourceReferenceType};
687 }
688  
689 sub setSourceReferenceType {
690 my $self = shift;
691 $self->{sourceReferenceType} = shift;
692 }
693  
694 ## end getters and setters ##
695
696 ## begin bean association methods ##
697
698 sub getProvenanceCollection {
699 my $self = shift;
700 my $appSvc = CaCORE::ApplicationService->instance();
701 my @results = $appSvc->queryObject("CaCORE::Common::Provenance::Provenance", $self);
702 return @results;
703 }
704  
705 ## end bean association methods ##
706
707 1;
708 #end
709 # ------------------------------------------------------------------------------------------
710 package CaCORE::Common::Provenance::WebServicesSourceReference;
711
712 use 5.005;
713 #use strict;
714 use warnings;
715
716 require Exporter;
717
718 use XML::DOM;
719
720 ## begin import objects ##
721 use CaCORE::ApplicationService;
722 ## end import objects ##
723
724
725 @ISA = qw(CaCORE::Common::Provenance::SourceReference);
726 our %EXPORT_TAGS = ( 'all' => [ qw(
727
728 ) ] );
729
730 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
731
732 our @EXPORT = qw(
733 );
734
735 # create an instance of the WebServicesSourceReference object
736 # returns: a WebServicesSourceReference object
737 sub new {
738 my $class = shift;
739 my $self = {};
740 bless($self, $class);
741 #print "new WebServicesSourceReference\n";
742 return $self;
743 }
744
745 # Construct the specific section of the WSDL request corresponding
746 # to this WebServicesSourceReference intance
747 # returns: XML in string format
748 sub toWebserviceXML {
749 my $self = shift;
750 my $result = shift;
751 my $assigned_id = shift;
752 my $current_id = shift;
753 my $l = shift;
754 my %worklist = %$l;
755
756 # prefix portion of the xml
757 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":WebServicesSourceReference\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.provenance.common.nci.nih.gov\">";
758 my $tmpstr = "";
759 $current_id ++;
760
761 ## begin attribute to XML ##
762 # request;
763 if( defined( $self->getRequest ) ) {
764 $tmpstr = "<request xsi:type=\"xsd:string\">" . $self->getRequest . "</request>";
765 } else {
766 $tmpstr = "<request xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
767 }
768 $result .= $tmpstr;
769  
770 # id;
771 if( defined( $self->getId ) ) {
772 $tmpstr = "<id xsi:type=\"xsd:long\">" . $self->getId . "</id>";
773 } else {
774 $tmpstr = "<id xsi:type=\"xsd:long\" xsi:nil=\"true\" />";
775 }
776 $result .= $tmpstr;
777  
778 # reference;
779 if( defined( $self->getReference ) ) {
780 $tmpstr = "<reference xsi:type=\"xsd:string\">" . $self->getReference . "</reference>";
781 } else {
782 $tmpstr = "<reference xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
783 }
784 $result .= $tmpstr;
785  
786 # sourceReferenceType;
787 if( defined( $self->getSourceReferenceType ) ) {
788 $tmpstr = "<sourceReferenceType xsi:type=\"xsd:string\">" . $self->getSourceReferenceType . "</sourceReferenceType>";
789 } else {
790 $tmpstr = "<sourceReferenceType xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
791 }
792 $result .= $tmpstr;
793  
794 ## end attribute to XML ##
795
796 ## begin association to XML ##
797 ## end association to XML ##
798
799 # add trailing close tags
800 $result .= "</multiRef>";
801
802 return ($result, $current_id, %worklist);
803 }
804
805 # parse a given webservice response xml, construct a list of WebServicesSourceReference objects
806 # param: xml doc
807 # returns: list of WebServicesSourceReference objects
808 sub fromWebserviceXML {
809 my $self = shift;
810 my $parser = new XML::DOM::Parser;
811 my $docnode = $parser->parse(shift);
812 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
813
814 return $self->fromWSXMLListNode($root);
815 }
816
817 # parse a given xml node, construct a list of WebServicesSourceReference objects
818 # param: xml node
819 # returns: a list of WebServicesSourceReference objects
820 sub fromWSXMLListNode {
821 my $self = shift;
822 my $listNode = shift;
823 my @obj_list = ();
824
825 # get all children for this node
826 for my $childrenNode ($listNode->getChildNodes) {
827 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
828 my $newobj = $self->fromWSXMLNode($childrenNode);
829 push @obj_list, $newobj;
830 }
831 }
832
833 return @obj_list;
834 }
835
836 # parse a given xml node, construct one WebServicesSourceReference object
837 # param: xml node
838 # returns: one WebServicesSourceReference object
839 sub fromWSXMLNode {
840 my $WebServicesSourceReferenceNode = $_[1];
841
842 ## begin ELEMENT_NODE children ##
843 my $request;
844 my $id;
845 my $reference;
846 my $sourceReferenceType;
847 ## end ELEMENT_NODE children ##
848
849 # get all children for this node
850 for my $childrenNode ($WebServicesSourceReferenceNode->getChildNodes) {
851 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
852 if( ! defined($childrenNode->getFirstChild) ){ next; };
853 my $textNode = $childrenNode->getFirstChild;
854 ## begin iterate ELEMENT_NODE ##
855 if (0) {
856 # do nothing, just a place holder for "if" component
857 }
858 elsif ($childrenNode->getNodeName eq "request") {
859 $request=$textNode->getNodeValue;
860 }
861 elsif ($childrenNode->getNodeName eq "id") {
862 $id=$textNode->getNodeValue;
863 }
864 elsif ($childrenNode->getNodeName eq "reference") {
865 $reference=$textNode->getNodeValue;
866 }
867 elsif ($childrenNode->getNodeName eq "sourceReferenceType") {
868 $sourceReferenceType=$textNode->getNodeValue;
869 }
870 ## end iterate ELEMENT_NODE ##
871 }
872 }
873 my $newobj = new CaCORE::Common::Provenance::WebServicesSourceReference;
874 ## begin set attr ##
875 $newobj->setRequest($request);
876 $newobj->setId($id);
877 $newobj->setReference($reference);
878 $newobj->setSourceReferenceType($sourceReferenceType);
879 ## end set attr ##
880
881 return $newobj;
882 }
883
884 ## begin getters and setters ##
885
886 sub getRequest {
887 my $self = shift;
888 return $self->{request};
889 }
890  
891 sub setRequest {
892 my $self = shift;
893 $self->{request} = shift;
894 }
895  
896 sub getId {
897 my $self = shift;
898 return $self->{id};
899 }
900  
901 sub setId {
902 my $self = shift;
903 $self->{id} = shift;
904 }
905  
906 sub getReference {
907 my $self = shift;
908 return $self->{reference};
909 }
910  
911 sub setReference {
912 my $self = shift;
913 $self->{reference} = shift;
914 }
915  
916 sub getSourceReferenceType {
917 my $self = shift;
918 return $self->{sourceReferenceType};
919 }
920  
921 sub setSourceReferenceType {
922 my $self = shift;
923 $self->{sourceReferenceType} = shift;
924 }
925  
926 ## end getters and setters ##
927
928 ## begin bean association methods ##
929
930 sub getProvenanceCollection {
931 my $self = shift;
932 my $appSvc = CaCORE::ApplicationService->instance();
933 my @results = $appSvc->queryObject("CaCORE::Common::Provenance::Provenance", $self);
934 return @results;
935 }
936  
937 ## end bean association methods ##
938
939 1;
940 #end
941 # ------------------------------------------------------------------------------------------
942 package CaCORE::Common::Provenance::URLSourceReference;
943
944 use 5.005;
945 #use strict;
946 use warnings;
947
948 require Exporter;
949
950 use XML::DOM;
951
952 ## begin import objects ##
953 use CaCORE::ApplicationService;
954 ## end import objects ##
955
956
957 @ISA = qw(CaCORE::Common::Provenance::SourceReference);
958 our %EXPORT_TAGS = ( 'all' => [ qw(
959
960 ) ] );
961
962 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
963
964 our @EXPORT = qw(
965 );
966
967 # create an instance of the URLSourceReference object
968 # returns: a URLSourceReference object
969 sub new {
970 my $class = shift;
971 my $self = {};
972 bless($self, $class);
973 #print "new URLSourceReference\n";
974 return $self;
975 }
976
977 # Construct the specific section of the WSDL request corresponding
978 # to this URLSourceReference intance
979 # returns: XML in string format
980 sub toWebserviceXML {
981 my $self = shift;
982 my $result = shift;
983 my $assigned_id = shift;
984 my $current_id = shift;
985 my $l = shift;
986 my %worklist = %$l;
987
988 # prefix portion of the xml
989 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":URLSourceReference\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.provenance.common.nci.nih.gov\">";
990 my $tmpstr = "";
991 $current_id ++;
992
993 ## begin attribute to XML ##
994 # sourceURL;
995 if( defined( $self->getSourceURL ) ) {
996 $tmpstr = "<sourceURL xsi:type=\"xsd:string\">" . $self->getSourceURL . "</sourceURL>";
997 } else {
998 $tmpstr = "<sourceURL xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
999 }
1000 $result .= $tmpstr;
1001  
1002 # id;
1003 if( defined( $self->getId ) ) {
1004 $tmpstr = "<id xsi:type=\"xsd:long\">" . $self->getId . "</id>";
1005 } else {
1006 $tmpstr = "<id xsi:type=\"xsd:long\" xsi:nil=\"true\" />";
1007 }
1008 $result .= $tmpstr;
1009  
1010 # reference;
1011 if( defined( $self->getReference ) ) {
1012 $tmpstr = "<reference xsi:type=\"xsd:string\">" . $self->getReference . "</reference>";
1013 } else {
1014 $tmpstr = "<reference xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1015 }
1016 $result .= $tmpstr;
1017  
1018 # sourceReferenceType;
1019 if( defined( $self->getSourceReferenceType ) ) {
1020 $tmpstr = "<sourceReferenceType xsi:type=\"xsd:string\">" . $self->getSourceReferenceType . "</sourceReferenceType>";
1021 } else {
1022 $tmpstr = "<sourceReferenceType xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1023 }
1024 $result .= $tmpstr;
1025  
1026 ## end attribute to XML ##
1027
1028 ## begin association to XML ##
1029 ## end association to XML ##
1030
1031 # add trailing close tags
1032 $result .= "</multiRef>";
1033
1034 return ($result, $current_id, %worklist);
1035 }
1036
1037 # parse a given webservice response xml, construct a list of URLSourceReference objects
1038 # param: xml doc
1039 # returns: list of URLSourceReference objects
1040 sub fromWebserviceXML {
1041 my $self = shift;
1042 my $parser = new XML::DOM::Parser;
1043 my $docnode = $parser->parse(shift);
1044 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
1045
1046 return $self->fromWSXMLListNode($root);
1047 }
1048
1049 # parse a given xml node, construct a list of URLSourceReference objects
1050 # param: xml node
1051 # returns: a list of URLSourceReference objects
1052 sub fromWSXMLListNode {
1053 my $self = shift;
1054 my $listNode = shift;
1055 my @obj_list = ();
1056
1057 # get all children for this node
1058 for my $childrenNode ($listNode->getChildNodes) {
1059 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1060 my $newobj = $self->fromWSXMLNode($childrenNode);
1061 push @obj_list, $newobj;
1062 }
1063 }
1064
1065 return @obj_list;
1066 }
1067
1068 # parse a given xml node, construct one URLSourceReference object
1069 # param: xml node
1070 # returns: one URLSourceReference object
1071 sub fromWSXMLNode {
1072 my $URLSourceReferenceNode = $_[1];
1073
1074 ## begin ELEMENT_NODE children ##
1075 my $sourceURL;
1076 my $id;
1077 my $reference;
1078 my $sourceReferenceType;
1079 ## end ELEMENT_NODE children ##
1080
1081 # get all children for this node
1082 for my $childrenNode ($URLSourceReferenceNode->getChildNodes) {
1083 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1084 if( ! defined($childrenNode->getFirstChild) ){ next; };
1085 my $textNode = $childrenNode->getFirstChild;
1086 ## begin iterate ELEMENT_NODE ##
1087 if (0) {
1088 # do nothing, just a place holder for "if" component
1089 }
1090 elsif ($childrenNode->getNodeName eq "sourceURL") {
1091 $sourceURL=$textNode->getNodeValue;
1092 }
1093 elsif ($childrenNode->getNodeName eq "id") {
1094 $id=$textNode->getNodeValue;
1095 }
1096 elsif ($childrenNode->getNodeName eq "reference") {
1097 $reference=$textNode->getNodeValue;
1098 }
1099 elsif ($childrenNode->getNodeName eq "sourceReferenceType") {
1100 $sourceReferenceType=$textNode->getNodeValue;
1101 }
1102 ## end iterate ELEMENT_NODE ##
1103 }
1104 }
1105 my $newobj = new CaCORE::Common::Provenance::URLSourceReference;
1106 ## begin set attr ##
1107 $newobj->setSourceURL($sourceURL);
1108 $newobj->setId($id);
1109 $newobj->setReference($reference);
1110 $newobj->setSourceReferenceType($sourceReferenceType);
1111 ## end set attr ##
1112
1113 return $newobj;
1114 }
1115
1116 ## begin getters and setters ##
1117
1118 sub getSourceURL {
1119 my $self = shift;
1120 return $self->{sourceURL};
1121 }
1122  
1123 sub setSourceURL {
1124 my $self = shift;
1125 $self->{sourceURL} = shift;
1126 }
1127  
1128 sub getId {
1129 my $self = shift;
1130 return $self->{id};
1131 }
1132  
1133 sub setId {
1134 my $self = shift;
1135 $self->{id} = shift;
1136 }
1137  
1138 sub getReference {
1139 my $self = shift;
1140 return $self->{reference};
1141 }
1142  
1143 sub setReference {
1144 my $self = shift;
1145 $self->{reference} = shift;
1146 }
1147  
1148 sub getSourceReferenceType {
1149 my $self = shift;
1150 return $self->{sourceReferenceType};
1151 }
1152  
1153 sub setSourceReferenceType {
1154 my $self = shift;
1155 $self->{sourceReferenceType} = shift;
1156 }
1157  
1158 ## end getters and setters ##
1159
1160 ## begin bean association methods ##
1161
1162 sub getProvenanceCollection {
1163 my $self = shift;
1164 my $appSvc = CaCORE::ApplicationService->instance();
1165 my @results = $appSvc->queryObject("CaCORE::Common::Provenance::Provenance", $self);
1166 return @results;
1167 }
1168  
1169 ## end bean association methods ##
1170
1171 1;
1172 #end
1173 # ------------------------------------------------------------------------------------------
1174 package CaCORE::Common::Provenance::InternetSource;
1175
1176 use 5.005;
1177 #use strict;
1178 use warnings;
1179
1180 require Exporter;
1181
1182 use XML::DOM;
1183
1184 ## begin import objects ##
1185 use CaCORE::ApplicationService;
1186 ## end import objects ##
1187
1188
1189 @ISA = qw(CaCORE::Common::Provenance::Source);
1190 our %EXPORT_TAGS = ( 'all' => [ qw(
1191
1192 ) ] );
1193
1194 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
1195
1196 our @EXPORT = qw(
1197 );
1198
1199 # create an instance of the InternetSource object
1200 # returns: a InternetSource object
1201 sub new {
1202 my $class = shift;
1203 my $self = {};
1204 bless($self, $class);
1205 #print "new InternetSource\n";
1206 return $self;
1207 }
1208
1209 # Construct the specific section of the WSDL request corresponding
1210 # to this InternetSource intance
1211 # returns: XML in string format
1212 sub toWebserviceXML {
1213 my $self = shift;
1214 my $result = shift;
1215 my $assigned_id = shift;
1216 my $current_id = shift;
1217 my $l = shift;
1218 my %worklist = %$l;
1219
1220 # prefix portion of the xml
1221 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":InternetSource\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.provenance.common.nci.nih.gov\">";
1222 my $tmpstr = "";
1223 $current_id ++;
1224
1225 ## begin attribute to XML ##
1226 # ownerInstitution;
1227 if( defined( $self->getOwnerInstitution ) ) {
1228 $tmpstr = "<ownerInstitution xsi:type=\"xsd:string\">" . $self->getOwnerInstitution . "</ownerInstitution>";
1229 } else {
1230 $tmpstr = "<ownerInstitution xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1231 }
1232 $result .= $tmpstr;
1233  
1234 # ownerPersons;
1235 if( defined( $self->getOwnerPersons ) ) {
1236 $tmpstr = "<ownerPersons xsi:type=\"xsd:string\">" . $self->getOwnerPersons . "</ownerPersons>";
1237 } else {
1238 $tmpstr = "<ownerPersons xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1239 }
1240 $result .= $tmpstr;
1241  
1242 # sourceURI;
1243 if( defined( $self->getSourceURI ) ) {
1244 $tmpstr = "<sourceURI xsi:type=\"xsd:string\">" . $self->getSourceURI . "</sourceURI>";
1245 } else {
1246 $tmpstr = "<sourceURI xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1247 }
1248 $result .= $tmpstr;
1249  
1250 # id;
1251 if( defined( $self->getId ) ) {
1252 $tmpstr = "<id xsi:type=\"xsd:long\">" . $self->getId . "</id>";
1253 } else {
1254 $tmpstr = "<id xsi:type=\"xsd:long\" xsi:nil=\"true\" />";
1255 }
1256 $result .= $tmpstr;
1257  
1258 # name;
1259 if( defined( $self->getName ) ) {
1260 $tmpstr = "<name xsi:type=\"xsd:string\">" . $self->getName . "</name>";
1261 } else {
1262 $tmpstr = "<name xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1263 }
1264 $result .= $tmpstr;
1265  
1266 ## end attribute to XML ##
1267
1268 ## begin association to XML ##
1269 ## end association to XML ##
1270
1271 # add trailing close tags
1272 $result .= "</multiRef>";
1273
1274 return ($result, $current_id, %worklist);
1275 }
1276
1277 # parse a given webservice response xml, construct a list of InternetSource objects
1278 # param: xml doc
1279 # returns: list of InternetSource objects
1280 sub fromWebserviceXML {
1281 my $self = shift;
1282 my $parser = new XML::DOM::Parser;
1283 my $docnode = $parser->parse(shift);
1284 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
1285
1286 return $self->fromWSXMLListNode($root);
1287 }
1288
1289 # parse a given xml node, construct a list of InternetSource objects
1290 # param: xml node
1291 # returns: a list of InternetSource objects
1292 sub fromWSXMLListNode {
1293 my $self = shift;
1294 my $listNode = shift;
1295 my @obj_list = ();
1296
1297 # get all children for this node
1298 for my $childrenNode ($listNode->getChildNodes) {
1299 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1300 my $newobj = $self->fromWSXMLNode($childrenNode);
1301 push @obj_list, $newobj;
1302 }
1303 }
1304
1305 return @obj_list;
1306 }
1307
1308 # parse a given xml node, construct one InternetSource object
1309 # param: xml node
1310 # returns: one InternetSource object
1311 sub fromWSXMLNode {
1312 my $InternetSourceNode = $_[1];
1313
1314 ## begin ELEMENT_NODE children ##
1315 my $ownerInstitution;
1316 my $ownerPersons;
1317 my $sourceURI;
1318 my $id;
1319 my $name;
1320 ## end ELEMENT_NODE children ##
1321
1322 # get all children for this node
1323 for my $childrenNode ($InternetSourceNode->getChildNodes) {
1324 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1325 if( ! defined($childrenNode->getFirstChild) ){ next; };
1326 my $textNode = $childrenNode->getFirstChild;
1327 ## begin iterate ELEMENT_NODE ##
1328 if (0) {
1329 # do nothing, just a place holder for "if" component
1330 }
1331 elsif ($childrenNode->getNodeName eq "ownerInstitution") {
1332 $ownerInstitution=$textNode->getNodeValue;
1333 }
1334 elsif ($childrenNode->getNodeName eq "ownerPersons") {
1335 $ownerPersons=$textNode->getNodeValue;
1336 }
1337 elsif ($childrenNode->getNodeName eq "sourceURI") {
1338 $sourceURI=$textNode->getNodeValue;
1339 }
1340 elsif ($childrenNode->getNodeName eq "id") {
1341 $id=$textNode->getNodeValue;
1342 }
1343 elsif ($childrenNode->getNodeName eq "name") {
1344 $name=$textNode->getNodeValue;
1345 }
1346 ## end iterate ELEMENT_NODE ##
1347 }
1348 }
1349 my $newobj = new CaCORE::Common::Provenance::InternetSource;
1350 ## begin set attr ##
1351 $newobj->setOwnerInstitution($ownerInstitution);
1352 $newobj->setOwnerPersons($ownerPersons);
1353 $newobj->setSourceURI($sourceURI);
1354 $newobj->setId($id);
1355 $newobj->setName($name);
1356 ## end set attr ##
1357
1358 return $newobj;
1359 }
1360
1361 ## begin getters and setters ##
1362
1363 sub getOwnerInstitution {
1364 my $self = shift;
1365 return $self->{ownerInstitution};
1366 }
1367  
1368 sub setOwnerInstitution {
1369 my $self = shift;
1370 $self->{ownerInstitution} = shift;
1371 }
1372  
1373 sub getOwnerPersons {
1374 my $self = shift;
1375 return $self->{ownerPersons};
1376 }
1377  
1378 sub setOwnerPersons {
1379 my $self = shift;
1380 $self->{ownerPersons} = shift;
1381 }
1382  
1383 sub getSourceURI {
1384 my $self = shift;
1385 return $self->{sourceURI};
1386 }
1387  
1388 sub setSourceURI {
1389 my $self = shift;
1390 $self->{sourceURI} = shift;
1391 }
1392  
1393 sub getId {
1394 my $self = shift;
1395 return $self->{id};
1396 }
1397  
1398 sub setId {
1399 my $self = shift;
1400 $self->{id} = shift;
1401 }
1402  
1403 sub getName {
1404 my $self = shift;
1405 return $self->{name};
1406 }
1407  
1408 sub setName {
1409 my $self = shift;
1410 $self->{name} = shift;
1411 }
1412  
1413 ## end getters and setters ##
1414
1415 ## begin bean association methods ##
1416
1417 ## end bean association methods ##
1418
1419 1;
1420 #end
1421 # ------------------------------------------------------------------------------------------
1422 package CaCORE::Common::Provenance::ResearchInstitutionSource;
1423
1424 use 5.005;
1425 #use strict;
1426 use warnings;
1427
1428 require Exporter;
1429
1430 use XML::DOM;
1431
1432 ## begin import objects ##
1433 use CaCORE::ApplicationService;
1434 ## end import objects ##
1435
1436
1437 @ISA = qw(CaCORE::Common::Provenance::Source);
1438 our %EXPORT_TAGS = ( 'all' => [ qw(
1439
1440 ) ] );
1441
1442 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
1443
1444 our @EXPORT = qw(
1445 );
1446
1447 # create an instance of the ResearchInstitutionSource object
1448 # returns: a ResearchInstitutionSource object
1449 sub new {
1450 my $class = shift;
1451 my $self = {};
1452 bless($self, $class);
1453 #print "new ResearchInstitutionSource\n";
1454 return $self;
1455 }
1456
1457 # Construct the specific section of the WSDL request corresponding
1458 # to this ResearchInstitutionSource intance
1459 # returns: XML in string format
1460 sub toWebserviceXML {
1461 my $self = shift;
1462 my $result = shift;
1463 my $assigned_id = shift;
1464 my $current_id = shift;
1465 my $l = shift;
1466 my %worklist = %$l;
1467
1468 # prefix portion of the xml
1469 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":ResearchInstitutionSource\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.provenance.common.nci.nih.gov\">";
1470 my $tmpstr = "";
1471 $current_id ++;
1472
1473 ## begin attribute to XML ##
1474 # institutionAddress;
1475 if( defined( $self->getInstitutionAddress ) ) {
1476 $tmpstr = "<institutionAddress xsi:type=\"xsd:string\">" . $self->getInstitutionAddress . "</institutionAddress>";
1477 } else {
1478 $tmpstr = "<institutionAddress xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1479 }
1480 $result .= $tmpstr;
1481  
1482 # institutionDepartment;
1483 if( defined( $self->getInstitutionDepartment ) ) {
1484 $tmpstr = "<institutionDepartment xsi:type=\"xsd:string\">" . $self->getInstitutionDepartment . "</institutionDepartment>";
1485 } else {
1486 $tmpstr = "<institutionDepartment xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1487 }
1488 $result .= $tmpstr;
1489  
1490 # institutionName;
1491 if( defined( $self->getInstitutionName ) ) {
1492 $tmpstr = "<institutionName xsi:type=\"xsd:string\">" . $self->getInstitutionName . "</institutionName>";
1493 } else {
1494 $tmpstr = "<institutionName xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1495 }
1496 $result .= $tmpstr;
1497  
1498 # institutionPersons;
1499 if( defined( $self->getInstitutionPersons ) ) {
1500 $tmpstr = "<institutionPersons xsi:type=\"xsd:string\">" . $self->getInstitutionPersons . "</institutionPersons>";
1501 } else {
1502 $tmpstr = "<institutionPersons xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1503 }
1504 $result .= $tmpstr;
1505  
1506 # id;
1507 if( defined( $self->getId ) ) {
1508 $tmpstr = "<id xsi:type=\"xsd:long\">" . $self->getId . "</id>";
1509 } else {
1510 $tmpstr = "<id xsi:type=\"xsd:long\" xsi:nil=\"true\" />";
1511 }
1512 $result .= $tmpstr;
1513  
1514 # name;
1515 if( defined( $self->getName ) ) {
1516 $tmpstr = "<name xsi:type=\"xsd:string\">" . $self->getName . "</name>";
1517 } else {
1518 $tmpstr = "<name xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1519 }
1520 $result .= $tmpstr;
1521  
1522 ## end attribute to XML ##
1523
1524 ## begin association to XML ##
1525 ## end association to XML ##
1526
1527 # add trailing close tags
1528 $result .= "</multiRef>";
1529
1530 return ($result, $current_id, %worklist);
1531 }
1532
1533 # parse a given webservice response xml, construct a list of ResearchInstitutionSource objects
1534 # param: xml doc
1535 # returns: list of ResearchInstitutionSource objects
1536 sub fromWebserviceXML {
1537 my $self = shift;
1538 my $parser = new XML::DOM::Parser;
1539 my $docnode = $parser->parse(shift);
1540 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
1541
1542 return $self->fromWSXMLListNode($root);
1543 }
1544
1545 # parse a given xml node, construct a list of ResearchInstitutionSource objects
1546 # param: xml node
1547 # returns: a list of ResearchInstitutionSource objects
1548 sub fromWSXMLListNode {
1549 my $self = shift;
1550 my $listNode = shift;
1551 my @obj_list = ();
1552
1553 # get all children for this node
1554 for my $childrenNode ($listNode->getChildNodes) {
1555 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1556 my $newobj = $self->fromWSXMLNode($childrenNode);
1557 push @obj_list, $newobj;
1558 }
1559 }
1560
1561 return @obj_list;
1562 }
1563
1564 # parse a given xml node, construct one ResearchInstitutionSource object
1565 # param: xml node
1566 # returns: one ResearchInstitutionSource object
1567 sub fromWSXMLNode {
1568 my $ResearchInstitutionSourceNode = $_[1];
1569
1570 ## begin ELEMENT_NODE children ##
1571 my $institutionAddress;
1572 my $institutionDepartment;
1573 my $institutionName;
1574 my $institutionPersons;
1575 my $id;
1576 my $name;
1577 ## end ELEMENT_NODE children ##
1578
1579 # get all children for this node
1580 for my $childrenNode ($ResearchInstitutionSourceNode->getChildNodes) {
1581 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1582 if( ! defined($childrenNode->getFirstChild) ){ next; };
1583 my $textNode = $childrenNode->getFirstChild;
1584 ## begin iterate ELEMENT_NODE ##
1585 if (0) {
1586 # do nothing, just a place holder for "if" component
1587 }
1588 elsif ($childrenNode->getNodeName eq "institutionAddress") {
1589 $institutionAddress=$textNode->getNodeValue;
1590 }
1591 elsif ($childrenNode->getNodeName eq "institutionDepartment") {
1592 $institutionDepartment=$textNode->getNodeValue;
1593 }
1594 elsif ($childrenNode->getNodeName eq "institutionName") {
1595 $institutionName=$textNode->getNodeValue;
1596 }
1597 elsif ($childrenNode->getNodeName eq "institutionPersons") {
1598 $institutionPersons=$textNode->getNodeValue;
1599 }
1600 elsif ($childrenNode->getNodeName eq "id") {
1601 $id=$textNode->getNodeValue;
1602 }
1603 elsif ($childrenNode->getNodeName eq "name") {
1604 $name=$textNode->getNodeValue;
1605 }
1606 ## end iterate ELEMENT_NODE ##
1607 }
1608 }
1609 my $newobj = new CaCORE::Common::Provenance::ResearchInstitutionSource;
1610 ## begin set attr ##
1611 $newobj->setInstitutionAddress($institutionAddress);
1612 $newobj->setInstitutionDepartment($institutionDepartment);
1613 $newobj->setInstitutionName($institutionName);
1614 $newobj->setInstitutionPersons($institutionPersons);
1615 $newobj->setId($id);
1616 $newobj->setName($name);
1617 ## end set attr ##
1618
1619 return $newobj;
1620 }
1621
1622 ## begin getters and setters ##
1623
1624 sub getInstitutionAddress {
1625 my $self = shift;
1626 return $self->{institutionAddress};
1627 }
1628  
1629 sub setInstitutionAddress {
1630 my $self = shift;
1631 $self->{institutionAddress} = shift;
1632 }
1633  
1634 sub getInstitutionDepartment {
1635 my $self = shift;
1636 return $self->{institutionDepartment};
1637 }
1638  
1639 sub setInstitutionDepartment {
1640 my $self = shift;
1641 $self->{institutionDepartment} = shift;
1642 }
1643  
1644 sub getInstitutionName {
1645 my $self = shift;
1646 return $self->{institutionName};
1647 }
1648  
1649 sub setInstitutionName {
1650 my $self = shift;
1651 $self->{institutionName} = shift;
1652 }
1653  
1654 sub getInstitutionPersons {
1655 my $self = shift;
1656 return $self->{institutionPersons};
1657 }
1658  
1659 sub setInstitutionPersons {
1660 my $self = shift;
1661 $self->{institutionPersons} = shift;
1662 }
1663  
1664 sub getId {
1665 my $self = shift;
1666 return $self->{id};
1667 }
1668  
1669 sub setId {
1670 my $self = shift;
1671 $self->{id} = shift;
1672 }
1673  
1674 sub getName {
1675 my $self = shift;
1676 return $self->{name};
1677 }
1678  
1679 sub setName {
1680 my $self = shift;
1681 $self->{name} = shift;
1682 }
1683  
1684 ## end getters and setters ##
1685
1686 ## begin bean association methods ##
1687
1688 ## end bean association methods ##
1689
1690 1;
1691 #end
1692 # ------------------------------------------------------------------------------------------
1693 package CaCORE::Common::Provenance::Provenance;
1694
1695 use 5.005;
1696 #use strict;
1697 use warnings;
1698
1699 require Exporter;
1700
1701 use XML::DOM;
1702
1703 ## begin import objects ##
1704 use CaCORE::ApplicationService;
1705 ## end import objects ##
1706
1707
1708 @ISA = qw(CaCORE::DomainObjectI);
1709
1710 our %EXPORT_TAGS = ( 'all' => [ qw(
1711
1712 ) ] );
1713
1714 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
1715
1716 our @EXPORT = qw(
1717 );
1718
1719 # create an instance of the Provenance object
1720 # returns: a Provenance object
1721 sub new {
1722 my $class = shift;
1723 my $self = {};
1724 bless($self, $class);
1725 #print "new Provenance\n";
1726 return $self;
1727 }
1728
1729 # Construct the specific section of the WSDL request corresponding
1730 # to this Provenance intance
1731 # returns: XML in string format
1732 sub toWebserviceXML {
1733 my $self = shift;
1734 my $result = shift;
1735 my $assigned_id = shift;
1736 my $current_id = shift;
1737 my $l = shift;
1738 my %worklist = %$l;
1739
1740 # prefix portion of the xml
1741 $result .= "<multiRef id=\"id" . $assigned_id ."\" soapenc:root=\"0\" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xsi:type=\"ns" . $current_id . ":Provenance\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns" . $current_id . "=\"urn:ws.domain.provenance.common.nci.nih.gov\">";
1742 my $tmpstr = "";
1743 $current_id ++;
1744
1745 ## begin attribute to XML ##
1746 # evidenceCode;
1747 if( defined( $self->getEvidenceCode ) ) {
1748 $tmpstr = "<evidenceCode xsi:type=\"xsd:string\">" . $self->getEvidenceCode . "</evidenceCode>";
1749 } else {
1750 $tmpstr = "<evidenceCode xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1751 }
1752 $result .= $tmpstr;
1753  
1754 # fullyQualifiedClassName;
1755 if( defined( $self->getFullyQualifiedClassName ) ) {
1756 $tmpstr = "<fullyQualifiedClassName xsi:type=\"xsd:string\">" . $self->getFullyQualifiedClassName . "</fullyQualifiedClassName>";
1757 } else {
1758 $tmpstr = "<fullyQualifiedClassName xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1759 }
1760 $result .= $tmpstr;
1761  
1762 # id;
1763 if( defined( $self->getId ) ) {
1764 $tmpstr = "<id xsi:type=\"xsd:long\">" . $self->getId . "</id>";
1765 } else {
1766 $tmpstr = "<id xsi:type=\"xsd:long\" xsi:nil=\"true\" />";
1767 }
1768 $result .= $tmpstr;
1769  
1770 # immediateSourceId;
1771 if( defined( $self->getImmediateSourceId ) ) {
1772 $tmpstr = "<immediateSourceId xsi:type=\"xsd:long\">" . $self->getImmediateSourceId . "</immediateSourceId>";
1773 } else {
1774 $tmpstr = "<immediateSourceId xsi:type=\"xsd:long\" xsi:nil=\"true\" />";
1775 }
1776 $result .= $tmpstr;
1777  
1778 # objectIdentifier;
1779 if( defined( $self->getObjectIdentifier ) ) {
1780 $tmpstr = "<objectIdentifier xsi:type=\"xsd:string\">" . $self->getObjectIdentifier . "</objectIdentifier>";
1781 } else {
1782 $tmpstr = "<objectIdentifier xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1783 }
1784 $result .= $tmpstr;
1785  
1786 # originalSourceId;
1787 if( defined( $self->getOriginalSourceId ) ) {
1788 $tmpstr = "<originalSourceId xsi:type=\"xsd:long\">" . $self->getOriginalSourceId . "</originalSourceId>";
1789 } else {
1790 $tmpstr = "<originalSourceId xsi:type=\"xsd:long\" xsi:nil=\"true\" />";
1791 }
1792 $result .= $tmpstr;
1793  
1794 # supplyingSourceId;
1795 if( defined( $self->getSupplyingSourceId ) ) {
1796 $tmpstr = "<supplyingSourceId xsi:type=\"xsd:long\">" . $self->getSupplyingSourceId . "</supplyingSourceId>";
1797 } else {
1798 $tmpstr = "<supplyingSourceId xsi:type=\"xsd:long\" xsi:nil=\"true\" />";
1799 }
1800 $result .= $tmpstr;
1801  
1802 # transformation;
1803 if( defined( $self->getTransformation ) ) {
1804 $tmpstr = "<transformation xsi:type=\"xsd:string\">" . $self->getTransformation . "</transformation>";
1805 } else {
1806 $tmpstr = "<transformation xsi:type=\"xsd:string\" xsi:nil=\"true\" />";
1807 }
1808 $result .= $tmpstr;
1809  
1810 ## end attribute to XML ##
1811
1812 ## begin association to XML ##
1813 ## end association to XML ##
1814
1815 # add trailing close tags
1816 $result .= "</multiRef>";
1817
1818 return ($result, $current_id, %worklist);
1819 }
1820
1821 # parse a given webservice response xml, construct a list of Provenance objects
1822 # param: xml doc
1823 # returns: list of Provenance objects
1824 sub fromWebserviceXML {
1825 my $self = shift;
1826 my $parser = new XML::DOM::Parser;
1827 my $docnode = $parser->parse(shift);
1828 my $root = $docnode->getFirstChild->getFirstChild->getFirstChild->getFirstChild;
1829
1830 return $self->fromWSXMLListNode($root);
1831 }
1832
1833 # parse a given xml node, construct a list of Provenance objects
1834 # param: xml node
1835 # returns: a list of Provenance objects
1836 sub fromWSXMLListNode {
1837 my $self = shift;
1838 my $listNode = shift;
1839 my @obj_list = ();
1840
1841 # get all children for this node
1842 for my $childrenNode ($listNode->getChildNodes) {
1843 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1844 my $newobj = $self->fromWSXMLNode($childrenNode);
1845 push @obj_list, $newobj;
1846 }
1847 }
1848
1849 return @obj_list;
1850 }
1851
1852 # parse a given xml node, construct one Provenance object
1853 # param: xml node
1854 # returns: one Provenance object
1855 sub fromWSXMLNode {
1856 my $ProvenanceNode = $_[1];
1857
1858 ## begin ELEMENT_NODE children ##
1859 my $evidenceCode;
1860 my $fullyQualifiedClassName;
1861 my $id;
1862 my $immediateSourceId;
1863 my $objectIdentifier;
1864 my $originalSourceId;
1865 my $supplyingSourceId;
1866 my $transformation;
1867 ## end ELEMENT_NODE children ##
1868
1869 # get all children for this node
1870 for my $childrenNode ($ProvenanceNode->getChildNodes) {
1871 if ($childrenNode->getNodeType == XML::DOM::ELEMENT_NODE()) {
1872 if( ! defined($childrenNode->getFirstChild) ){ next; };
1873 my $textNode = $childrenNode->getFirstChild;
1874 ## begin iterate ELEMENT_NODE ##
1875 if (0) {
1876 # do nothing, just a place holder for "if" component
1877 }
1878 elsif ($childrenNode->getNodeName eq "evidenceCode") {
1879 $evidenceCode=$textNode->getNodeValue;
1880 }
1881 elsif ($childrenNode->getNodeName eq "fullyQualifiedClassName") {
1882 $fullyQualifiedClassName=$textNode->getNodeValue;
1883 }
1884 elsif ($childrenNode->getNodeName eq "id") {
1885 $id=$textNode->getNodeValue;
1886 }
1887 elsif ($childrenNode->getNodeName eq "immediateSourceId") {
1888 $immediateSourceId=$textNode->getNodeValue;
1889 }
1890 elsif ($childrenNode->getNodeName eq "objectIdentifier") {
1891 $objectIdentifier=$textNode->getNodeValue;
1892 }
1893 elsif ($childrenNode->getNodeName eq "originalSourceId") {
1894 $originalSourceId=$textNode->getNodeValue;
1895 }
1896 elsif ($childrenNode->getNodeName eq "supplyingSourceId") {
1897 $supplyingSourceId=$textNode->getNodeValue;
1898 }
1899 elsif ($childrenNode->getNodeName eq "transformation") {
1900 $transformation=$textNode->getNodeValue;
1901 }
1902 ## end iterate ELEMENT_NODE ##
1903 }
1904 }
1905 my $newobj = new CaCORE::Common::Provenance::Provenance;
1906 ## begin set attr ##
1907 $newobj->setEvidenceCode($evidenceCode);
1908 $newobj->setFullyQualifiedClassName($fullyQualifiedClassName);
1909 $newobj->setId($id);
1910 $newobj->setImmediateSourceId($immediateSourceId);
1911 $newobj->setObjectIdentifier($objectIdentifier);
1912 $newobj->setOriginalSourceId($originalSourceId);
1913 $newobj->setSupplyingSourceId($supplyingSourceId);
1914 $newobj->setTransformation($transformation);
1915 ## end set attr ##
1916
1917 return $newobj;
1918 }
1919
1920 ## begin getters and setters ##
1921
1922 sub getEvidenceCode {
1923 my $self = shift;
1924 return $self->{evidenceCode};
1925 }
1926  
1927 sub setEvidenceCode {
1928 my $self = shift;
1929 $self->{evidenceCode} = shift;
1930 }
1931  
1932 sub getFullyQualifiedClassName {
1933 my $self = shift;
1934 return $self->{fullyQualifiedClassName};
1935 }
1936  
1937 sub setFullyQualifiedClassName {
1938 my $self = shift;
1939 $self->{fullyQualifiedClassName} = shift;
1940 }
1941  
1942 sub getId {
1943 my $self = shift;
1944 return $self->{id};
1945 }
1946  
1947 sub setId {
1948 my $self = shift;
1949 $self->{id} = shift;
1950 }
1951  
1952 sub getImmediateSourceId {
1953 my $self = shift;
1954 return $self->{immediateSourceId};
1955 }
1956  
1957 sub setImmediateSourceId {
1958 my $self = shift;
1959 $self->{immediateSourceId} = shift;
1960 }
1961  
1962 sub getObjectIdentifier {
1963 my $self = shift;
1964 return $self->{objectIdentifier};
1965 }
1966  
1967 sub setObjectIdentifier {
1968 my $self = shift;
1969 $self->{objectIdentifier} = shift;
1970 }
1971  
1972 sub getOriginalSourceId {
1973 my $self = shift;
1974 return $self->{originalSourceId};
1975 }
1976  
1977 sub setOriginalSourceId {
1978 my $self = shift;
1979 $self->{originalSourceId} = shift;
1980 }
1981  
1982 sub getSupplyingSourceId {
1983 my $self = shift;
1984 return $self->{supplyingSourceId};
1985 }
1986  
1987 sub setSupplyingSourceId {
1988 my $self = shift;
1989 $self->{supplyingSourceId} = shift;
1990 }
1991  
1992 sub getTransformation {
1993 my $self = shift;
1994 return $self->{transformation};
1995 }
1996  
1997 sub setTransformation {
1998 my $self = shift;
1999 $self->{transformation} = shift;
2000 }
2001  
2002 ## end getters and setters ##
2003
2004 ## begin bean association methods ##
2005
2006 sub getImmediateSource {
2007 my $self = shift;
2008 my $appSvc = CaCORE::ApplicationService->instance();
2009 my @results = $appSvc->queryObject("CaCORE::Common::Provenance::Source", $self);
2010 return $results[0];
2011 }
2012  
2013 sub getOriginalSource {
2014 my $self = shift;
2015 my $appSvc = CaCORE::ApplicationService->instance();
2016 my @results = $appSvc->queryObject("CaCORE::Common::Provenance::Source", $self);
2017 return $results[0];
2018 }
2019  
2020 sub getSourceReference {
2021 my $self = shift;
2022 my $appSvc = CaCORE::ApplicationService->instance();
2023 my @results = $appSvc->queryObject("CaCORE::Common::Provenance::SourceReference", $self);
2024 return $results[0];
2025 }
2026  
2027 sub getSupplyingSource {
2028 my $self = shift;
2029 my $appSvc = CaCORE::ApplicationService->instance();
2030 my @results = $appSvc->queryObject("CaCORE::Common::Provenance::Source", $self);
2031 return $results[0];
2032 }
2033  
2034 ## end bean association methods ##
2035
2036 1;
2037 #end
2038 # Below is module documentation for InternetSource
2039
2040 =pod
2041
2042 =head1 InternetSource
2043
2044 CaCORE::Common::Provenance::InternetSource - Perl extension for InternetSource.
2045
2046 =head2 ABSTRACT
2047
2048 The CaCORE::Common::Provenance::InternetSource is a Perl object representation of the
2049 CaCORE InternetSource object.
2050
2051 InternetSource extends from domain object L<"Source">.
2052
2053 =head2 SYNOPSIS
2054
2055 See L<CaCORE::ApplicationService>.
2056
2057 =head2 DESCRIPTION
2058
2059
2060
2061 =head2 ATTRIBUTES of InternetSource
2062
2063 The following are all the attributes of the InternetSource object and their data types:
2064
2065 =over 4
2066
2067 =item ownerInstitution
2068  
2069 data type: C<string>
2070  
2071 =item ownerPersons
2072  
2073 data type: C<string>
2074  
2075 =item sourceURI
2076  
2077 data type: C<string>
2078  
2079
2080 =back
2081
2082 Note: Although you can also use the corresponding setter methods to set the
2083 attribute values, it is not recommended to do so unless you absolutely have
2084 to change the object's attributes.
2085
2086 =head2 ASSOCIATIONS of InternetSource
2087
2088 The following are all the objects that are associated with the InternetSource:
2089
2090 =over 4
2091
2092
2093 =back
2094
2095 =cut
2096
2097 # Below is module documentation for Provenance
2098
2099 =pod
2100
2101 =head1 Provenance
2102
2103 CaCORE::Common::Provenance::Provenance - Perl extension for Provenance.
2104
2105 =head2 ABSTRACT
2106
2107 The CaCORE::Common::Provenance::Provenance is a Perl object representation of the
2108 CaCORE Provenance object.
2109
2110
2111 =head2 SYNOPSIS
2112
2113 See L<CaCORE::ApplicationService>.
2114
2115 =head2 DESCRIPTION
2116
2117
2118
2119 =head2 ATTRIBUTES of Provenance
2120
2121 The following are all the attributes of the Provenance object and their data types:
2122
2123 =over 4
2124
2125 =item evidenceCode
2126  
2127 data type: C<string>
2128  
2129 =item fullyQualifiedClassName
2130  
2131 data type: C<string>
2132  
2133 =item id
2134  
2135 data type: C<long>
2136  
2137 =item immediateSourceId
2138  
2139 data type: C<long>
2140  
2141 =item objectIdentifier
2142  
2143 data type: C<string>
2144  
2145 =item originalSourceId
2146  
2147 data type: C<long>
2148  
2149 =item supplyingSourceId
2150  
2151 data type: C<long>
2152  
2153 =item transformation
2154  
2155 data type: C<string>
2156  
2157
2158 =back
2159
2160 Note: Although you can also use the corresponding setter methods to set the
2161 attribute values, it is not recommended to do so unless you absolutely have
2162 to change the object's attributes.
2163
2164 =head2 ASSOCIATIONS of Provenance
2165
2166 The following are all the objects that are associated with the Provenance:
2167
2168 =over 4
2169
2170 =item Collection of L</ImmediateSource>:
2171  
2172 Many to one assoication, use C<getImmediateSource> to get the associated ImmediateSource.
2173  
2174 =item Collection of L</OriginalSource>:
2175  
2176 Many to one assoication, use C<getOriginalSource> to get the associated OriginalSource.
2177  
2178 =item Collection of L</SourceReference>:
2179  
2180 Many to one assoication, use C<getSourceReference> to get the associated SourceReference.
2181  
2182 =item Collection of L</SupplyingSource>:
2183  
2184 Many to one assoication, use C<getSupplyingSource> to get the associated SupplyingSource.
2185  
2186
2187 =back
2188
2189 =cut
2190
2191 # Below is module documentation for PublicationSource
2192
2193 =pod
2194
2195 =head1 PublicationSource
2196
2197 CaCORE::Common::Provenance::PublicationSource - Perl extension for PublicationSource.
2198
2199 =head2 ABSTRACT
2200
2201 The CaCORE::Common::Provenance::PublicationSource is a Perl object representation of the
2202 CaCORE PublicationSource object.
2203
2204 PublicationSource extends from domain object L<"Source">.
2205
2206 =head2 SYNOPSIS
2207
2208 See L<CaCORE::ApplicationService>.
2209
2210 =head2 DESCRIPTION
2211
2212
2213
2214 =head2 ATTRIBUTES of PublicationSource
2215
2216 The following are all the attributes of the PublicationSource object and their data types:
2217
2218 =over 4
2219
2220 =item authors
2221  
2222 data type: C<string>
2223  
2224 =item endPage
2225  
2226 data type: C<int>
2227  
2228 =item startPage
2229  
2230 data type: C<int>
2231  
2232 =item title
2233  
2234 data type: C<string>
2235  
2236 =item volume
2237  
2238 data type: C<int>
2239  
2240 =item year
2241  
2242 data type: C<int>
2243  
2244
2245 =back
2246
2247 Note: Although you can also use the corresponding setter methods to set the
2248 attribute values, it is not recommended to do so unless you absolutely have
2249 to change the object's attributes.
2250
2251 =head2 ASSOCIATIONS of PublicationSource
2252
2253 The following are all the objects that are associated with the PublicationSource:
2254
2255 =over 4
2256
2257
2258 =back
2259
2260 =cut
2261
2262 # Below is module documentation for ResearchInstitutionSource
2263
2264 =pod
2265
2266 =head1 ResearchInstitutionSource
2267
2268 CaCORE::Common::Provenance::ResearchInstitutionSource - Perl extension for ResearchInstitutionSource.
2269
2270 =head2 ABSTRACT
2271
2272 The CaCORE::Common::Provenance::ResearchInstitutionSource is a Perl object representation of the
2273 CaCORE ResearchInstitutionSource object.
2274
2275 ResearchInstitutionSource extends from domain object L<"Source">.
2276
2277 =head2 SYNOPSIS
2278
2279 See L<CaCORE::ApplicationService>.
2280
2281 =head2 DESCRIPTION
2282
2283
2284
2285 =head2 ATTRIBUTES of ResearchInstitutionSource
2286
2287 The following are all the attributes of the ResearchInstitutionSource object and their data types:
2288
2289 =over 4
2290
2291 =item institutionAddress
2292  
2293 data type: C<string>
2294  
2295 =item institutionDepartment
2296  
2297 data type: C<string>
2298  
2299 =item institutionName
2300  
2301 data type: C<string>
2302  
2303 =item institutionPersons
2304  
2305 data type: C<string>
2306  
2307
2308 =back
2309
2310 Note: Although you can also use the corresponding setter methods to set the
2311 attribute values, it is not recommended to do so unless you absolutely have
2312 to change the object's attributes.
2313
2314 =head2 ASSOCIATIONS of ResearchInstitutionSource
2315
2316 The following are all the objects that are associated with the ResearchInstitutionSource:
2317
2318 =over 4
2319
2320
2321 =back
2322
2323 =cut
2324
2325 # Below is module documentation for Source
2326
2327 =pod
2328
2329 =head1 Source
2330
2331 CaCORE::Common::Provenance::Source - Perl extension for Source.
2332
2333 =head2 ABSTRACT
2334
2335 The CaCORE::Common::Provenance::Source is a Perl object representation of the
2336 CaCORE Source object.
2337
2338
2339 =head2 SYNOPSIS
2340
2341 See L<CaCORE::ApplicationService>.
2342
2343 =head2 DESCRIPTION
2344
2345
2346
2347 =head2 ATTRIBUTES of Source
2348
2349 The following are all the attributes of the Source object and their data types:
2350
2351 =over 4
2352
2353 =item id
2354  
2355 data type: C<long>
2356  
2357 =item name
2358  
2359 data type: C<string>
2360  
2361
2362 =back
2363
2364 Note: Although you can also use the corresponding setter methods to set the
2365 attribute values, it is not recommended to do so unless you absolutely have
2366 to change the object's attributes.
2367
2368 =head2 ASSOCIATIONS of Source
2369
2370 The following are all the objects that are associated with the Source:
2371
2372 =over 4
2373
2374
2375 =back
2376
2377 =cut
2378
2379 # Below is module documentation for SourceReference
2380
2381 =pod
2382
2383 =head1 SourceReference
2384
2385 CaCORE::Common::Provenance::SourceReference - Perl extension for SourceReference.
2386
2387 =head2 ABSTRACT
2388
2389 The CaCORE::Common::Provenance::SourceReference is a Perl object representation of the
2390 CaCORE SourceReference object.
2391
2392
2393 =head2 SYNOPSIS
2394
2395 See L<CaCORE::ApplicationService>.
2396
2397 =head2 DESCRIPTION
2398
2399
2400
2401 =head2 ATTRIBUTES of SourceReference
2402
2403 The following are all the attributes of the SourceReference object and their data types:
2404
2405 =over 4
2406
2407 =item id
2408  
2409 data type: C<long>
2410  
2411 =item reference
2412  
2413 data type: C<string>
2414  
2415 =item sourceReferenceType
2416  
2417 data type: C<string>
2418  
2419
2420 =back
2421
2422 Note: Although you can also use the corresponding setter methods to set the
2423 attribute values, it is not recommended to do so unless you absolutely have
2424 to change the object's attributes.
2425
2426 =head2 ASSOCIATIONS of SourceReference
2427
2428 The following are all the objects that are associated with the SourceReference:
2429
2430 =over 4
2431
2432 =item Instance of L</Provenance>:
2433  
2434 One to many assoication, use C<getProvenanceCollection> to get a collection of associated Provenance.
2435  
2436
2437 =back
2438
2439 =cut
2440
2441 # Below is module documentation for URLSourceReference
2442
2443 =pod
2444
2445 =head1 URLSourceReference
2446
2447 CaCORE::Common::Provenance::URLSourceReference - Perl extension for URLSourceReference.
2448
2449 =head2 ABSTRACT
2450
2451 The CaCORE::Common::Provenance::URLSourceReference is a Perl object representation of the
2452 CaCORE URLSourceReference object.
2453
2454 URLSourceReference extends from domain object L<"SourceReference">.
2455
2456 =head2 SYNOPSIS
2457
2458 See L<CaCORE::ApplicationService>.
2459
2460 =head2 DESCRIPTION
2461
2462
2463
2464 =head2 ATTRIBUTES of URLSourceReference
2465
2466 The following are all the attributes of the URLSourceReference object and their data types:
2467
2468 =over 4
2469
2470 =item sourceURL
2471  
2472 data type: C<string>
2473  
2474
2475 =back
2476
2477 Note: Although you can also use the corresponding setter methods to set the
2478 attribute values, it is not recommended to do so unless you absolutely have
2479 to change the object's attributes.
2480
2481 =head2 ASSOCIATIONS of URLSourceReference
2482
2483 The following are all the objects that are associated with the URLSourceReference:
2484
2485 =over 4
2486
2487
2488 =back
2489
2490 =cut
2491
2492 # Below is module documentation for WebServicesSourceReference
2493
2494 =pod
2495
2496 =head1 WebServicesSourceReference
2497
2498 CaCORE::Common::Provenance::WebServicesSourceReference - Perl extension for WebServicesSourceReference.
2499
2500 =head2 ABSTRACT
2501
2502 The CaCORE::Common::Provenance::WebServicesSourceReference is a Perl object representation of the
2503 CaCORE WebServicesSourceReference object.
2504
2505 WebServicesSourceReference extends from domain object L<"SourceReference">.
2506
2507 =head2 SYNOPSIS
2508
2509 See L<CaCORE::ApplicationService>.
2510
2511 =head2 DESCRIPTION
2512
2513
2514
2515 =head2 ATTRIBUTES of WebServicesSourceReference
2516
2517 The following are all the attributes of the WebServicesSourceReference object and their data types:
2518
2519 =over 4
2520
2521 =item request
2522  
2523 data type: C<string>
2524  
2525
2526 =back
2527
2528 Note: Although you can also use the corresponding setter methods to set the
2529 attribute values, it is not recommended to do so unless you absolutely have
2530 to change the object's attributes.
2531
2532 =head2 ASSOCIATIONS of WebServicesSourceReference
2533
2534 The following are all the objects that are associated with the WebServicesSourceReference:
2535
2536 =over 4
2537
2538
2539 =back
2540
2541 =cut
2542
2543
2544 =pod
2545
2546 =head1 SUPPORT
2547
2548 Please do not contact author directly. Send email to ncicb@pop.nci.nih.gov to request
2549 support or report a bug.
2550
2551 =head1 AUTHOR
2552
2553 Shan Jiang <jiangs@mail.nih.gov>
2554
2555 =head1 COPYRIGHT AND LICENSE
2556
2557 The CaCORE Software License, Version 1.0
2558
2559 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:
2560
2561 =over 1
2562
2563 =item 1
2564
2565 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.
2566
2567 =item 2
2568
2569 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.
2570
2571 =item 3
2572
2573 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.
2574
2575 =item 4
2576
2577 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.
2578
2579 =item 5
2580
2581 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.
2582
2583 =back
2584
2585 =cut
2586
2587