Annotation of nsdl/lib/perl/Apache/NSDL/ToTheGateway.pm, revision 1.2

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
1.2     ! harris41   42: my $VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/);
1.1       harris41   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: 
1.2     ! harris41  170: =item B<Status of Implementation>
        !           171: 
        !           172: n/a
        !           173: 
1.1       harris41  174: =back
                    175: 
                    176: =item B<Apache::NSDL::answer_search_request>
                    177: 
                    178: =over 4
                    179: 
                    180: =item B<Input> - Scalar string
                    181: 
                    182: Take in an OAI-format request for a specific NSDL server (a search expression
                    183: is passed).
                    184: 
                    185: =item B<Output> - Scalar string, Scalar array reference
                    186: 
                    187: An exit code is returned as a scalar string.
                    188: 
                    189: A list of relevant records (matching the search request) returned via an
                    190: array reference.
                    191: 
                    192: =item B<Description>
                    193: 
                    194: This lists the records matching a given search request.
                    195: The request comes from the Gateway Server, B<and the information
                    196: passes from NSDL I<to the> GATEWAY>.
                    197: 
1.2     ! harris41  198: =item B<Status of Implementation>
        !           199: 
        !           200: n/a
        !           201: 
1.1       harris41  202: =back
                    203: 
                    204: =item B<Apache::NSDL::answer_metadata_record_request>
                    205: 
                    206: =over 4
                    207: 
                    208: =item B<Input> - Scalar string
                    209: 
                    210: Take in an OAI-format request for a specific NSDL server resource's
                    211: metadata.
                    212: 
                    213: =item B<Output> - Scalar string, Scalar string reference
                    214: 
                    215: An exit code is returned as a scalar string.
                    216: 
                    217: The metadata entries for the resource; returned via a scalar reference.
                    218: 
                    219: =item B<Description>
                    220: 
                    221: This lists the records matching a given request.
                    222: The request comes from the Gateway Server, B<and the information
                    223: passes from NSDL I<to the> GATEWAY>.
                    224: 
1.2     ! harris41  225: =item B<Status of Implementation>
        !           226: 
        !           227: n/a
        !           228: 
1.1       harris41  229: =back
                    230: 
                    231: =item B<Apache::NSDL::answer_resource_request>
                    232: 
                    233: =over 4
                    234: 
                    235: =item B<Input> - Scalar string
                    236: 
                    237: Take in an OAI-format request for a specific NSDL server's
                    238: resource content.
                    239: 
                    240: =item B<Output> - Scalar string, Scalar string reference
                    241: 
                    242: An exit code is returned as a scalar string.
                    243: 
                    244: A reference to the resource content (now physically present in computer
                    245: memory).
                    246: 
                    247: =item B<Description>
                    248: 
                    249: This provides the content of the resource matching a given request.
                    250: The request comes from the Gateway Server, B<and the information
                    251: passes from NSDL I<to the> GATEWAY>.
1.2     ! harris41  252: 
        !           253: =item B<Status of Implementation>
        !           254: 
        !           255: n/a
1.1       harris41  256: 
                    257: =back
                    258: 
                    259: =back
                    260: 
                    261: =head1 README
                    262: 
                    263: B<Apache::NSDL::ToTheGateway>
                    264: is part of the NSDL-LONCAPA Gateway Server system.
                    265: Please see http://nsdl.lon-capa.org/ for more information.
                    266: 
                    267: =head1 AUTHOR
                    268: 
                    269: Scott Harrison, 2002
                    270: 
                    271: =head1 PREREQUISITES
                    272: 
                    273: This module requires the C<strict> module.
                    274: 
                    275: =head1 COREQUISITES
                    276: 
                    277: Apache::NSDL::FromTheGateway
                    278: Apache::GATEWAY::ToNSDL
                    279: Apache::GATEWAY::FromNSDL
                    280: Apache::GATEWAY::ToLONCAPA
                    281: Apache::GATEWAY::FromLONCAPA
                    282: Apache::LONCAPA::FromTheGateway
                    283: Apache::LONCAPA::ToTheGateway
                    284: 
                    285: =head1 SEE ALSO
                    286: 
                    287: http://www.lon-capa.org/
                    288: 
                    289: http://www.smete.org/
                    290: 
                    291: Also visit the other Apache::NSDL::*, Apache::LONCAPA::*,
                    292: and Apache::GATEWAY::* manpages.
                    293: 
                    294: =head1 OSNAMES
                    295: 
                    296: linux
                    297: 
                    298: =cut
                    299: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>