SRU::R...:Record(3pm)

πŸ“¦
version 1.01 Β· 2 versions
  • 1.01 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.01 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– SRU::Response::Record β€” the record-glow-up page πŸ’–

ok so bestie, welcome to the User Contributed Perl Documentation corner of the internet πŸŽ€ this is the page for SRU::Response::Record, and yes the header up top gets truncated to SRU::R...:Record(3pm) because Perl manpages love a dramatic ellipsis πŸ’…


✨ NAME ✨

SRU::Response::Record β€” a class for representing a result record in a searchRetrieve response. it's giving "one little metadata record, all dressed up and ready to be shipped out" πŸ¦‹


✨ SYNOPSIS ✨

my $record = SRU::Response::Record->new();
$record->recordData( '<title>Huck Finn</title>' );
$response->addRecord( $record );

look at that. three lines. flawless. no notes. πŸ‘‘


✨ DESCRIPTION ✨

SRU::Response::Record is the lil bundle-up container for all the info about one specific metadata record inside an SRU::Response::SearchRetrieve object. 🌸

the usual vibe: you build a record object, then you add it to the SearchRetrieve response. that's it. that's the whole job. main character energy, minimal effort, periodt. πŸ’œ


✨ METHODS ✨

🌈 new()

ok so you must supply the recordSchema and recordData parameters. no skipping, bestie, they're required. πŸ™ˆ

you may also supply recordPacking, recordPosition, and extraRecordData. those ones are optional, they just come along for the ride. ✨

my $record = SRU::Response::Record->new(
    recordSchema        => 'info:srw/schema/1/dc-v1.1',
    recordData          => '<title>Huckleberry Finn</title>'
);

🌈 recordSchema()

this is the URI identifier of the XML schema that the record is encoded in. πŸ”₯

important lore: even though the request might use the server's assigned short name, the response must always be the full URI. no shortcuts in the response, bestie, we're doing it properly. πŸ’…

🌈 recordData()

the record itself, either as a string or as embedded XML. πŸŽ€

and if you wanna pass in an object? totally allowed, queen β€” as long as it implements the asXML() method. that's the one condition. iykyk. πŸ¦‹

🌈 recordPacking()

the packing used in recordData, as requested by the client, or the default: "XML". that's the fallback, no cap. πŸ’–

🌈 recordPosition()

the position of the record within the result set. πŸ“

and here's the cute part: if you don't pass it in, recordPosition gets automatically calculated for you when you add or retrieve a record from an SRU::Response::SearchRetrieve object. it just handles it. lowkey thoughtful of it. 😭

🌈 extraRecordData()

any extra data associated with the record. 🌟

for the full tea on this one, go look at the section on extensions. that's where the details live.

🌈 asXML()

that's it, that's the entry. the original page lists the method and then moves straight on β€” no description follows it here, so i'm not gonna invent one for you, bestie. i would never make up lore. πŸ™ˆπŸ’€


this software is copyright (c) 2013 by Ed Summers. 🫢

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, honestly. πŸŽ€


and that's the whole page!! ⭐ big mwah to perl v5.34.0, dated 2022-06-17, and to SRU::R...:Record(3pm) for being our little truncated icon πŸ’– byeee, go build some records πŸ§šπŸ’œ

πŸ“¦ where this page comes from