Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sru::response::record(3pm) [debian man page]

SRU::Response::Record(3pm)				User Contributed Perl Documentation				SRU::Response::Record(3pm)

NAME
SRU::Response::Record - A class for representing a result record in a searchRetrieve response. SYNOPSIS
my $record = SRU::Response::Record->new(); $record->recordData( '<title>Huck Finn</title>' ); $response->addRecord( $record ); DESCRIPTION
SRU::Response::Record is used to bundle up the information about a particular metadata record in a SRU::Response::SearchRetrieve object. Typically you'll construct a record object and add it to the SearchRetrieve response. METHODS
new() You must supply the recordSchema and recordData parameters. recordPacking, recordPosition, and extraRecordData may also be supplied. my $record = SRU::Response::Record->new( recordSchema => 'info:srw/schema/1/dc-v1.1', recordData => '<title>Huckleberry Finn</title>' ); recordSchema() The URI identifier of the XML schema in which the record is encoded. Although the request may use the server's assigned short name, the response must always be the full URI. recordData() The record itself, either as a string or embedded XML. If would like to pass an object in here you may do so as long as it imlements the asXML() method. recordPacking() The packing used in recordData, as requested by the client or the default: "XML". recordPosition() The position of the record within the result set. If you don't pass this in recordPosition will be automaticlly calculated for you when add or retrieve a record from a SRU::Response::SearchRetrieve object. extraRecordData() Any extra data associated with the record. See the section on extensions for more information. asXML() perl v5.12.4 2009-11-20 SRU::Response::Record(3pm)

Check Out this Related Man Page

SRU::Response::SearchRetrieve(3pm)			User Contributed Perl Documentation			SRU::Response::SearchRetrieve(3pm)

NAME
SRU::Response::SearchRetrieve - A class for representing SRU searchRetrieve responses SYNOPSIS
## create response from the request object my $response = SRU::Response::SearchRetrieve->new( $request ); ## add records to the response foreach my $record ( @records ) { $response->addRecord( $record ); } ## print out the response as XML print $response->asXML(); DESCRIPTION
SRU::Response::SearchRetrieve provides a framework for bundling up the response to a searchRetrieve request. You are responsible for generating the XML representation of the records, and the rest should be taken care of. METHODS
new() numberOfRecords() Returns the number of results associated with the object. addRecord() Add a SRU::Response::Record object to the response. $response->addRecord( $r ); If you don't pass in the right sort of object you'll get back undef and $SRU::Error will be populated appropriately. records() Gets or sets all the records associated with the object. Be careful with this one :) You must pass in an array ref, and expect an array ref back. resultSetId() resultSetIdleTime() nextRecordPosition() diagnostics() extraResponseData() echoedSearchRetrieveRequest() asXML() asXML(encoding=>"ISO-8859-1") Returns the object serialized as XML. UTF-8 and UTF-16 are default encodings if you don't pass the encoding parameter. You can define different encoding in order to parse you XML document correctly. perl v5.12.4 2009-11-20 SRU::Response::SearchRetrieve(3pm)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove duplicated xml record in a file under unix

Hi, If i have a file with xml format, i would like to remove duplicated records and save to a new file. Is it possible...to write script to do it? (8 Replies)
Discussion started by: happyv
8 Replies

2. Shell Programming and Scripting

Remove & insertion of data in a same file

I am iterating record by record through a file as below, A,B A,C A,D B,E B,F E,G E,H The same file should look like in the final output as below, A,B B,E E,G E,H B,F A,C A,D (10 Replies)
Discussion started by: videsh77
10 Replies

3. Shell Programming and Scripting

Help: deletion of record

I have created a address book file. Insertion of Record (using >> symbol)and searching of record (using grep command) into the address book is also working correctly. Now I want to delete a record into a file. Any body can help me in this case without using sed and awk18 18. Thanks and best... (24 Replies)
Discussion started by: murtaza
24 Replies

4. Shell Programming and Scripting

Append (cat) to beginning of file ?

Hi, Fairly new to unix scripting, hoping to get some help. using AIX v5 Basically I have 3 files 1). Header record 2). many detail record 3). Trailer record My desired result is 1 file which contains Heaeder, Detail, Trailer Currenty I am using a series of: ... (8 Replies)
Discussion started by: CBZ
8 Replies

5. Shell Programming and Scripting

How to remove a particular record from a file?

Please tell me the command(s) to remove a particular record from the file and placing the rest of the record in a seperate file. (9 Replies)
Discussion started by: kanu_pathak
9 Replies

6. Shell Programming and Scripting

Insertion of Header record

A header record is to be inserted in the begining of a flat file without using extra file or new file. It should be inserted into same file. Advace thanks for all help... (7 Replies)
Discussion started by: shreekrishnagd
7 Replies

7. Shell Programming and Scripting

Inserting into first record using perl

hi all... i got some requirment where i need to insert some values into first record of flat file. i am using perl for that job. var1=456 var2=789 echo `perl -p -i -e "s/U/\${var1}U${var2}/g;" myFile.txt` but it is writing into all records which has U.... can anyone help me out in this... (7 Replies)
Discussion started by: shreekrishnagd
7 Replies

8. Shell Programming and Scripting

filtering one file based on results from other- AGAIN

I have asked this question here before and got the answer too. Unfortunately I used only one record as an example and the script works fine for one record but not for more than one record. Can anybody help me with writing a script for the data that I want to use from one file based on the... (13 Replies)
Discussion started by: digipak
13 Replies

9. Shell Programming and Scripting

How to add record separator after certain lines

How to add record separator after certain lines? I am faicing issue where some lines have result as successive line & some are not having. how can I add record separator after every record here is example of data I have (line numbers are not present in data): 1. <enabled="true" name="dSuite1"... (7 Replies)
Discussion started by: sach253
7 Replies

10. Shell Programming and Scripting

Testing Next Record before processing is done on that Record

I am trying to see if there is a way in awk to test the next record before processing. All I am trying to do is see if the next line equal something then turn a flag off. Example: Problem Cron IneedThis KeyOnThis somemoredata somemoredata Cron somemoredata somemoredata IneedThis... (7 Replies)
Discussion started by: timj123
7 Replies

11. UNIX for Dummies Questions & Answers

Hardcoding & Record counts in a file

HI , I am having a huge comma delimiter file, I have to append the following four lines before the starting of the file through a shell script. FILE NAME = TEST_LOAD DATETIME = CURRENT DATE TIME LOAD DATE = CURRENT DATE RECORD COUNT = TOTAL RECORDS IN FILE Source data 1,2,3,4,5,6,7... (7 Replies)
Discussion started by: shruthidwh
7 Replies

12. Shell Programming and Scripting

Search and Replace by record position

Hi All, I have a file that I would like to search for data and replace other data by record position number: Example search.. search for "CLARK KENT" and replace Amt data "000025" with "000155"??? I'm able to search and replace unique data but, came to a stump when wanting to replace data... (11 Replies)
Discussion started by: macastor
11 Replies

13. Shell Programming and Scripting

Remove dashes if exist between positions 351-357 and then add - at the 357th position

I need to remove dash (i.e. -) if present from positions 351-357, and then add - (dash) at 357th position. For example in following first and 3rd record we got Before processing 1) 1st Record positions 351-357 = 0-12345 2) 3rd Record positions 351-357 = 00-4567 After processing:- 1) 1st... (7 Replies)
Discussion started by: lancesunny
7 Replies

14. Shell Programming and Scripting

Record count checking for multiple files through for-loop

Hi Friends, I wrote one shell script to check the record count in two files and that will send us the notification activity if found zero record count. What i did is I created for loop and checking the count for both of the files but what is happening is for first file has data then it's... (13 Replies)
Discussion started by: victory
13 Replies

15. Shell Programming and Scripting

Replace a string for every record after the 1st record

I have data coming in the below format for each record <?xml version="1.0" encoding="UTF-8" standalone="no"?><test_sox xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><testdetials>....</test_sox> <?xml version="1.0" encoding="UTF-8" standalone="no"?><test_sox... (8 Replies)
Discussion started by: dsravanam
8 Replies