[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Quick export plugin question



Good morning Robin,

> $data->{B} = $dataobj->get_value( "divisions" ) if $dataobj->exists_and_set( "divisions" );
following ~/Eprints/perl_lib/EPrints/DataObj/Subject.pm what about
        if( $dataobj->exists_and_set( "subjects" ) )
        {
                my $subjectid;
                foreach $subjectid ( @{$dataobj->get_value( "subjects" )} )
                {
                  my $subject = EPrints::DataObj::Subject->new( $plugin->{session}, $subjectid );
                  # avoid problems with bad subjects
                  next unless( defined $subject ); 
                  my $path = $subject->render_with_path( $plugin->{session},  $subject->top ) ;
                  my $name = $subject->render_description( ) ;

                  print STDERR 'ID, path, name', $subject, $path, $name, "\n";
                }
         }
?

Hth
Thomas