28 code results in eprints/eprints or view all results on GitHub
| 272 | my $epdata = $plugin->convert_input( $input_data ); |
| 273 | |
| 274 | return $plugin->epdata_to_dataobj( $plugin->{dataset}, $epdata ); |
| 275 | } |
| 276 | |
| 277 | sub convert_input |
| … | |
| 283 | $plugin->log( $r ); |
| 284 | } |
| 285 | |
| 286 | =item $dataobj = $plugin->epdata_to_dataobj( $epdata, %opts ) |
| 287 | |
| 288 | Turn B<$epdata> into a L<EPrints::DataObj> using the L<dataset|EPrints::DataSet> argument passed in %opts. |
Perl
Showing the top two matches
Last indexed | 35 | $self->{id} = "Import::XML"; # hack to make phrases work |
| 36 | |
| 37 | return $self; |
| 38 | } |
| 39 | |
| 40 | sub epdata_to_dataobj |
| 41 | { |
| 42 | my( $self, $dataset, $epdata ) = @_; |
| 43 | |
| 44 | my $dataobj = $self->{import}->epdata_to_dataobj( $dataset, $epdata ); |
| 45 | |
| 46 | $self->handler->parsed( $epdata ); # TODO: parse-only import? |
Perl
Showing the top match
Last indexed | 90 | sub epdata_to_dataobj |
| 91 | { |
| 92 | my( $self, $epdata, %opts ) = @_; |
| 93 | |
| 94 | my $dataobj = $self->SUPER::epdata_to_dataobj( $epdata, %opts ); |
| … | |
| 111 | $plugin->set_handler(EPrints::CLIProcessor->new( |
| 112 | message => sub { $self->{processor}->add_message( @_ ) }, |
| 113 | epdata_to_dataobj => sub { |
Perl
Showing the top three matches
Last indexed | 32 | my $dataset = $opts{dataset}; |
| 33 | |
| 34 | my @ids; |
| 35 | |
| 36 | my $handler = EPrints::Plugin::Import::ISIWoKXML::Handler->new( |
| 37 | epdata_to_dataobj => sub { |
| 38 | my $dataobj = $self->epdata_to_dataobj($dataset, $_[0]); |
| 39 | push @ids, $dataobj->id if defined $dataobj; |
Perl
Showing the top two matches
Last indexed | 94 | my $epdata = $self->xml_to_epdata( $dataset, $xml ); |
| 95 | return $self->epdata_to_dataobj( $dataset, $epdata ); |
| 96 | } |
| 97 | |
| 98 | sub xml_to_text |
| … | |
| 188 | my $epdata = delete $self->{epdata}; |
| 189 | my $dataobj = $self->{plugin}->epdata_to_dataobj( $self->{dataset}, $epdata ); |
| 190 | push @{$self->{imported}}, $dataobj->id if defined $dataobj; |
Perl
Showing the top two matches
Last indexed | 142 | _content => $parts[1]{tmpfile}, |
| 143 | }], |
| 144 | }; |
| 145 | |
| 146 | my @ids; |
| 147 | |
| 148 | my $dataobj = $self->SUPER::epdata_to_dataobj( $dataset, $epdata ); |
| 149 | push @ids, $dataobj->id if defined $dataobj; |
| … | |
| 152 | session => $self->{repository}, |
| 153 | dataset => $dataset, |
| 154 | ids => \@ids ); |
| 155 | } |
| 156 | |
| 157 | sub epdata_to_dataobj |
| 158 | { |
| 159 | my( $self, $epdata ) = @_; |
Perl
Showing the top two matches
Last indexed | 138 | # we ask the plugin to import into either documents or eprints |
| 139 | # -> produce a single document or |
| 140 | # -> produce lots of documents |
| 141 | # the normal epdata_to_dataobj is intercepted (parse_only=>1) and we merge |
| … | |
| 144 | message => sub { $self->{processor}->add_message( $_[0], $self->{session}->make_text( $_[1] ) ) }, |
| 145 | epdata_to_dataobj => sub { |
| 146 | my( $epdata ) = @_; |
| 147 | |
| 148 | $epdata = [$epdata]; |
Perl
Showing the top two matches
Last indexed | 229 | sub epdata_to_dataobj |
| 230 | { |
| 231 | my( $self, $epdata, %opts ) = @_; |
| 232 | |
| 233 | $self->{processor}->{count}++; |
| 234 | |
| 235 | my $dataset = $opts{dataset}; |
| … | |
| 276 | message => sub { !$quiet && $self->{processor}->add_message( @_ ) }, |
| 277 | epdata_to_dataobj => sub { |
| 278 | return $self->epdata_to_dataobj( |
| 279 | @_, |
| 280 | parse_only => $dryrun, |
Perl
Showing the top three matches
Last indexed