Annotation of nsdl/lib/perl/Apache/NSDL/ToTheGateway.pm, revision 1.1
1.1 ! harris41 1: # Apache::NSDL::ToTheGateway
! 2: #
! 3: # ToTheGateway.pm
! 4: # API for passing information from NSDL to the Gateway Server
! 5: #
! 6: # For more documentation, read the POD documentation
! 7: # of this module with the perldoc command:
! 8: #
! 9: # perldoc ./ToTheGateway.pm
! 10: #
! 11: # Brief description
! 12: # =================
! 13: #
! 14: # This module contains functionality for
! 15: # transferring information from NSDL to the Gateway Server.
! 16: #
! 17: # In terms of the overall data flow, the
! 18: # '=====>' below indicates the role of this
! 19: # module.
! 20: #
! 21: # NSDL =========> Gateway --------> LON-CAPA
! 22: # LON-CAPA -----> Gateway --------> NSDL
! 23: #
! 24: # SUBROUTINES:
! 25: # NSDL->answer_list_records_request
! 26: # NSDL->answer_search_request
! 27: # NSDL->answer_metadata_record_request
! 28: # NSDL->answer_resource_request
! 29:
! 30: # Year 2002
! 31: # Scott Harrison
! 32: # February-May
! 33: #
! 34: ###
! 35:
! 36: package Apache::NSDL::ToTheGateway;
! 37:
! 38: # ================================================================ DEPENDENCIES
! 39: use strict; # enforce handling of variables, references and subroutines
! 40:
! 41: # ============================================================ MODULE VARIABLES
! 42: my $VERSION = sprintf("%d.%02d", q$Revision: 1.2 $ =~ /(\d+)\.(\d+)/);
! 43:
! 44: # ================================================================= SUBROUTINES
! 45:
! 46: # ------------------------------------------- NSDL->answer_list_records_request
! 47: sub answer_list_records_request {
! 48: # Not yet implemented
! 49: # Need to specifically characterize INPUT arguments and OUTPUT data
! 50: }
! 51:
! 52: # ------------------------------------------------- NSDL->answer_search_request
! 53: sub answer_search_request {
! 54: # Not yet implemented
! 55: # Need to specifically characterize INPUT arguments and OUTPUT data
! 56: }
! 57:
! 58: # ---------------------------------------- NSDL->answer_metadata_record_request
! 59: sub answer_metadata_record_request {
! 60: # Not yet implemented
! 61: # Need to specifically characterize INPUT arguments and OUTPUT data
! 62: }
! 63:
! 64: # ----------------------------------------------- NSDL->answer_resource_request
! 65: sub answer_resource_request {
! 66: # Not yet implemented
! 67: # Need to specifically characterize INPUT arguments and OUTPUT data
! 68: }
! 69:
! 70: 1;
! 71:
! 72: __END__
! 73:
! 74: =pod
! 75:
! 76: =head1 NAME
! 77:
! 78: B<Apache::NSDL::ToTheGateway> - API for passing information from NSDL to the Gateway Server
! 79:
! 80: =head1 SYNOPSIS
! 81:
! 82: use Apache::NSDL::ToTheGateway;
! 83:
! 84: my $arrayref=
! 85: Apache::NSDL::ToTheGateway::answer_list_records_request
! 86: ($OAI_protocol_request);
! 87:
! 88: =head1 DESCRIPTION
! 89:
! 90: This module contains functionality for
! 91: transferring information from NSDL to the Gateway Server.
! 92:
! 93: In terms of the overall data flow, the
! 94: '=====>' below indicates the role of this
! 95: module.
! 96:
! 97: B<NSDL =========E<gt> Gateway> --------E<gt> LON-CAPA
! 98:
! 99: LON-CAPA -----E<gt> Gateway --------E<gt> NSDL
! 100:
! 101: =head2 EXIT CODES
! 102:
! 103: The subroutines of this module all output an exit code which
! 104: describes the status of function completion. The exit code
! 105: may be followed by a more descriptive message such as:
! 106:
! 107: FORMATERROR:Sun May 5 20:15:16 GMT 2002:missing 'protocol://' pattern
! 108:
! 109: =over 4
! 110:
! 111: =item *
! 112:
! 113: B<'SUCCESS'>, information was found and is being returned
! 114:
! 115: =item *
! 116:
! 117: B<'EMPTY'>, everything functioned properly, but no information was present
! 118:
! 119: =item *
! 120:
! 121: B<'BADEMPTY'>, everything appeared to function properly, but no information
! 122: was present (which defies expectation); this is useful for detecting phantom
! 123: cases of connectivity when verifying test cases of vertical software partitions
! 124:
! 125: =item *
! 126:
! 127: B<'TIMEOUT'>, the request is taking WAY too long
! 128:
! 129: =item *
! 130:
! 131: B<'FORMATERROR'>, the input argument is not formatted correctly in a way that
! 132: can be processed by the NSDL server
! 133:
! 134: =item *
! 135:
! 136: B<'CONNECTIONFAILURE'>, the NSDL server cannot be contacted
! 137:
! 138: =back
! 139:
! 140: =head2 SUBROUTINES
! 141:
! 142: Note that the subroutines all output an exit code which
! 143: describes the status of function completion.
! 144:
! 145: In the case of failed function completion, the other
! 146: output argument(s) will typically only be 'NULL' values.
! 147:
! 148: =over 4
! 149:
! 150: =item B<Apache::NSDL::answer_list_records_request>
! 151:
! 152: =over 4
! 153:
! 154: =item B<Input> - Scalar string
! 155:
! 156: Take in an OAI-format request for a specific NSDL server.
! 157:
! 158: =item B<Output> - Scalar string, Scalar array reference
! 159:
! 160: An exit code is returned as a scalar string.
! 161:
! 162: A list of records returned via an array reference.
! 163:
! 164: =item B<Description>
! 165:
! 166: This lists the records matching a given request.
! 167: The request comes from the Gateway Server, B<and the information
! 168: passes from NSDL I<to the> GATEWAY>.
! 169:
! 170: =back
! 171:
! 172: =item B<Apache::NSDL::answer_search_request>
! 173:
! 174: =over 4
! 175:
! 176: =item B<Input> - Scalar string
! 177:
! 178: Take in an OAI-format request for a specific NSDL server (a search expression
! 179: is passed).
! 180:
! 181: =item B<Output> - Scalar string, Scalar array reference
! 182:
! 183: An exit code is returned as a scalar string.
! 184:
! 185: A list of relevant records (matching the search request) returned via an
! 186: array reference.
! 187:
! 188: =item B<Description>
! 189:
! 190: This lists the records matching a given search request.
! 191: The request comes from the Gateway Server, B<and the information
! 192: passes from NSDL I<to the> GATEWAY>.
! 193:
! 194: =back
! 195:
! 196: =item B<Apache::NSDL::answer_metadata_record_request>
! 197:
! 198: =over 4
! 199:
! 200: =item B<Input> - Scalar string
! 201:
! 202: Take in an OAI-format request for a specific NSDL server resource's
! 203: metadata.
! 204:
! 205: =item B<Output> - Scalar string, Scalar string reference
! 206:
! 207: An exit code is returned as a scalar string.
! 208:
! 209: The metadata entries for the resource; returned via a scalar reference.
! 210:
! 211: =item B<Description>
! 212:
! 213: This lists the records matching a given request.
! 214: The request comes from the Gateway Server, B<and the information
! 215: passes from NSDL I<to the> GATEWAY>.
! 216:
! 217: =back
! 218:
! 219: =item B<Apache::NSDL::answer_resource_request>
! 220:
! 221: =over 4
! 222:
! 223: =item B<Input> - Scalar string
! 224:
! 225: Take in an OAI-format request for a specific NSDL server's
! 226: resource content.
! 227:
! 228: =item B<Output> - Scalar string, Scalar string reference
! 229:
! 230: An exit code is returned as a scalar string.
! 231:
! 232: A reference to the resource content (now physically present in computer
! 233: memory).
! 234:
! 235: =item B<Description>
! 236:
! 237: This provides the content of the resource matching a given request.
! 238: The request comes from the Gateway Server, B<and the information
! 239: passes from NSDL I<to the> GATEWAY>.
! 240:
! 241: =back
! 242:
! 243: =back
! 244:
! 245: =head1 README
! 246:
! 247: B<Apache::NSDL::ToTheGateway>
! 248: is part of the NSDL-LONCAPA Gateway Server system.
! 249: Please see http://nsdl.lon-capa.org/ for more information.
! 250:
! 251: =head1 AUTHOR
! 252:
! 253: Scott Harrison, 2002
! 254:
! 255: =head1 PREREQUISITES
! 256:
! 257: This module requires the C<strict> module.
! 258:
! 259: =head1 COREQUISITES
! 260:
! 261: Apache::NSDL::FromTheGateway
! 262: Apache::GATEWAY::ToNSDL
! 263: Apache::GATEWAY::FromNSDL
! 264: Apache::GATEWAY::ToLONCAPA
! 265: Apache::GATEWAY::FromLONCAPA
! 266: Apache::LONCAPA::FromTheGateway
! 267: Apache::LONCAPA::ToTheGateway
! 268:
! 269: =head1 SEE ALSO
! 270:
! 271: http://www.lon-capa.org/
! 272:
! 273: http://www.smete.org/
! 274:
! 275: Also visit the other Apache::NSDL::*, Apache::LONCAPA::*,
! 276: and Apache::GATEWAY::* manpages.
! 277:
! 278: =head1 OSNAMES
! 279:
! 280: linux
! 281:
! 282: =cut
! 283:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>