Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

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

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

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)

Check Out this Related Man Page

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

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)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

regarding sort command.

hi, In UNIX I want a sort records in a file based on the certain position in the record as the key in the file. Now if certain 2 records have the same record then the out file should have the records as the First in First out i.e. in the same order in which they occur in the input file. ... (2 Replies)
Discussion started by: aman_aj
2 Replies

2. UNIX for Dummies Questions & Answers

Removing spaces between records

Hi I have an XML file. Which has spaces between different records.... current file( Has many lines, like this... I want to delete all the spaces between > and <, if there are only spaces between them) input file <xyzr> <abc>1234</xyzr> <aaa> <bbb> ayz mnz</bbb> <sen>KEA... (6 Replies)
Discussion started by: thanuman
6 Replies

3. Shell Programming and Scripting

trying to get a boolean response from sed

I have a file coming in with many columns, but the first character of the the coumn is a record type, if I wanted to get a true/false kind of response as to whether it contains at least one of each type of record how would be best? sed -e '/01/!d; /02/!d; /03/!d; /04/!d' datafile returns... (4 Replies)
Discussion started by: badg3r
4 Replies

4. Shell Programming and Scripting

Taking user response in perl

I was wondering if it was possible to take in a user's response in a perl program. For example. Ask user a yes or no question, and then depending on the response, print out a corresponding answer? Thanks! (2 Replies)
Discussion started by: silkiechicken
2 Replies

5. Solaris

Problem in using wildcard characters in xargs with find

Hi, Under my parent diectory I have directory named "Response" in many of its subfolders. I am interested to see all files with extention .pro in Response Directory. I am giving following command - find . -name "Response" -type d | xargs -i ls -lrt {}/*.pro but it is not giving result. ... (3 Replies)
Discussion started by: sanjay1979
3 Replies

6. Shell Programming and Scripting

Issues with filtering duplicate records using gawk script

Hi All, I have huge trade file with milions of trades.I need to remove duplicate records (e.g I have following records) 30/10/2009,trdeId1,..,.. 26/10/2009.tradeId1,..,..,, 30/10/2009,tradeId2,.. In the above case i need to filter duplicate recods and I should get following output.... (2 Replies)
Discussion started by: nmumbarkar
2 Replies

7. Shell Programming and Scripting

how to group records in a file

hi, I have records like this,127,569,BRAD,25/08/2009 23:59,127,569,BRAD,25/08/2009 23:59,159,1170,DAVE,25/08/2009 23:59,159,1181,HALE,25/08/2009 23:59,393,1209,CAPIT,25/08/2009 23:59,457,571,NORTT,25/08/2009 23:59... (4 Replies)
Discussion started by: trichyselva
4 Replies

8. UNIX for Dummies Questions & Answers

print records where an ID appears more than once

Hi everyone! I have something like the following records in a file: ID: 1 Name: A Age: 23 ID: 2 Name: B ID: 1 Activity: Climbing ID: 3 Name: C ID: 3 Activity: Skating I want to capture the records where the field Age exists AND the records that have the same ID as the one... (4 Replies)
Discussion started by: Atrisa
4 Replies

9. UNIX for Advanced & Expert Users

Searching and extracting records

Hello, I have a file with DNA sequences and I want to extract some records by searching them with a word in it and then write the whole record into another file. I am new to perl and having trouble to extract the whole record. Instead I am only able to write the line that contains the word. Can... (2 Replies)
Discussion started by: bjorngill
2 Replies

10. Programming

Unix system crashing - Need help to identify the issue

Hi, We are accessing our remote webserver using libcurl.We are using GET method to post the request.The request is a simplified URL.We will receive XML Response for the URL request. Problem For Few Scenarios, response for the URL request is received & our component is killed abruptly. Can... (11 Replies)
Discussion started by: banus
11 Replies

11. Shell Programming and Scripting

Automating a Challenge/Response Method.

Hi guys, I will need some help with a to automate a challenge/response sequence when I try to SCP files from a server to another. The scenario is like this : After selecting in a script the option to send files via scp (case switch): I get this output from linux term: The... (4 Replies)
Discussion started by: REX:)
4 Replies

12. Shell Programming and Scripting

Insert a new line between the XML tags?.

<TestLog> <TriggerAPI> <StartDate>Nov 16, 2012 6:34:02 AM com.satttest01.Response() </StartDate> <RequestType>SUCCESS: Send :</RequestType> <TranNumber>5210203</TranNumber> <TranId>8585319731207148</TranId> </TriggerAPI> <TriggerAPI> <StartDate>Nov 16, 2012 6:34:02 AM... (3 Replies)
Discussion started by: laknar
3 Replies

13. Shell Programming and Scripting

How to read records in a file and sort it?

I have a file which has number of pipe delimited records. I am able to read the records....but I want to sort it after reading. i=0 while IFS="|" read -r usrId dataOwn expire email group secProf startDt endDt smhRole RoleCat DataProf SysRole MesgRole SearchProf do print $usrId $dataOwn... (4 Replies)
Discussion started by: harish468
4 Replies

14. Shell Programming and Scripting

[Solved] Need Help in reading Response file

Hi All, I have a requirement to read response file which looks like below Ex: NAME=SAM DOB=01/01/1980 ADDRESS= 7658 James Street NewYork 0000 Now, I need to take NAME, DOB, ADDRESS into variables I am fine taking NAME and DOB I need help on how can I... (6 Replies)
Discussion started by: mallak
6 Replies

15. Solaris

Solaris 11 SRU latest version

Hi During a host review session I was told to check if the engineers have been updating Solaris 11 OS regularly by verifying the SRU version of the system. However i was having no luck in finding the latest SRU version number in oracle website for hours. I wonder did anyone here know where i... (4 Replies)
Discussion started by: kaze
4 Replies

Featured Tech Videos