$xmldoc->getElementsByTagNameNS( $self->namespace(),
'ItemIdentifierValue' );
my $item = NCIP::Item->new( { itemid => $item_id->textContent(), ils => $self->ils} );
+ my ($itemdata,$error) = $item->itemdata();
+ if ($error){
+# handle error here
+ }
warn $item->itemid();
}
return $self->type;
use base qw(Class::Accessor);
# Make accessors for the ones that makes sense
-NCIP::Item->mk_accessors(qw(itemid));
+NCIP::Item->mk_accessors(qw(itemid ils));
+
+# Call the apppropriate subroutine in the ILS specific code and get the data
+
+sub itemdata {
+ my $self = shift;
+ my $ils = $self->ils;
+ my ( $itemdata, $error ) = $ils->itemdata( $self->itemid );
+
+# add anything NCIP specific not handled by the ILS to the itemdata object at this point, if no error
+
+ return $itemdata, $error;
+}
1;