Annotation of nsdl/lib/perl/Apache/GATEWAY/ToNSDL.pm, revision 1.2

1.1       harris41    1: # Apache::GATEWAY::ToNSDL
                      2: #
                      3: # ToNSDL.pm
                      4: # API for passing information from the Gateway Server to NSDL
                      5: #
                      6: # For more documentation, read the POD documentation
                      7: # of this module with the perldoc command:
                      8: #
                      9: #         perldoc ./ToNSDL.pm
                     10: #
                     11: # Brief description
                     12: # =================
                     13: #
                     14: # This module contains functionality for
                     15: # transferring information from the Gateway Server to NSDL
                     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: # GATEWAY->search_against_LONCAPAnetwork
                     26: # GATEWAY->view_LONCAPAnetwork_results
                     27: # GATEWAY->view_LONCAPAnetwork_metadata_record
                     28: # GATEWAY->access_LONCAPAnetwork_resource
                     29: 
                     30: # Year 2002
                     31: # Scott Harrison
                     32: # February-May
                     33: #
                     34: ###
                     35: 
                     36: package Apache::GATEWAY::ToNSDL;
                     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: # ---------------------------------------- GATEWAY->view_LONCAPAnetwork_results
                     47: sub view_LONCAPAnetwork_results {
                     48: # Not yet implemented
                     49: # Need to specifically characterize INPUT arguments and OUTPUT data
                     50: }
                     51: 
                     52: # -------------------------------- GATEWAY->view_LONCAPAnetwork_metadata_record
                     53: sub view_LONCAPAnetwork_metadata_record {
                     54: # Not yet implemented
                     55: # Need to specifically characterize INPUT arguments and OUTPUT data
                     56: }
                     57: 
                     58: # ------------------------------------- GATEWAY->access_LONCAPAnetwork_resource
                     59: sub access_LONCAPAnetwork_resource {
                     60: # Not yet implemented
                     61: # Need to specifically characterize INPUT arguments and OUTPUT data
                     62: }
                     63: 
                     64: # -------------------------------------- GATEWAY->search_against_LONCAPAnetwork
                     65: sub search_against_LONCAPAnetwork {
                     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::GATEWAY::ToNSDL> - API for passing information from the Gateway Server to NSDL
                     79: 
                     80: =head1 SYNOPSIS
                     81: 
                     82:  use Apache::GATEWAY::ToNSDL;
                     83: 
                     84:  my $arrayref=
                     85:     Apache::GATEWAY::ToNSDL::view_LONCAPAnetwork_results
                     86:       ($result_list_identifier);
                     87: 
                     88: =head1 DESCRIPTION
                     89: 
                     90: This module contains functionality for
                     91: transferring information to NSDL from the Gateway Server.
                     92: 
                     93: In terms of the overall data flow, the
                     94: '=====>' below indicates the role of this
                     95: module.
                     96: 
                     97: NSDL ---------E<gt> Gateway --------E<gt> LON-CAPA
                     98: 
                     99: LON-CAPA -----E<gt> B<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: 
1.2     ! harris41  150: =item B<Apache::GATEWAY::ToNSDL::view_LONCAPAnetwork_results>
1.1       harris41  151: 
                    152: =over 4
                    153: 
                    154: =item B<Input> - Scalar string
                    155: 
                    156: Memory location of Gateway Server results.
                    157: 
                    158: =item B<Output> - Scalar string, Scalar string reference
                    159: 
                    160: An exit code is returned as a scalar string.
                    161: 
                    162: Pass on LON-CAPA result list from the Gateway Server to NSDL for
                    163: viewing.
                    164: 
                    165: =item B<Description>
                    166: 
                    167: This facilitates the viewing of LON-CAPA record lists.
                    168: B<This relates to information that has passed
                    169: from the GATEWAY I<to> NSDL>.
                    170: 
                    171: =item B<Status of Implementation>
                    172: 
                    173: n/a
                    174: 
                    175: =back
                    176: 
1.2     ! harris41  177: =item B<Apache::GATEWAY::ToNSDL::view_LONCAPAnetwork_metadata_record>
1.1       harris41  178: 
                    179: =over 4
                    180: 
                    181: =item B<Input> - Scalar string
                    182: 
                    183: Identifier for a specific LON-CAPA metadata record.
                    184: 
                    185: =item B<Output> - Scalar string, Scalar string reference
                    186: 
                    187: An exit code is returned as a scalar string.
                    188: 
                    189: A pointer to the metadata.
                    190: 
                    191: =item B<Description>
                    192: 
                    193: This provides the content of the resource matching a given request.
                    194: B<The information has passed from the GATEWAY I<to> NSDL>.
                    195: 
                    196: =item B<Status of Implementation>
                    197: 
                    198: n/a
                    199: 
                    200: =back
                    201: 
1.2     ! harris41  202: =item B<Apache::GATEWAY::ToNSDL::access_LONCAPAnetwork_resource>
1.1       harris41  203: 
                    204: =over 4
                    205: 
                    206: =item B<Input> - Scalar string
                    207: 
                    208: Identifier for LON-CAPA resource.
                    209: 
                    210: =item B<Output> - Scalar string, Scalar string reference.
                    211: 
                    212: An exit code is returned as a scalar string.
                    213: 
                    214: Pointer to information about accessing LON-CAPA resource.
                    215: 
                    216: =item B<Description>
                    217: 
                    218: This accepts access to a LON-CAPA resource.
                    219: B<The information has passed from the GATEWAY I<to> NSDL>.
                    220: 
                    221: =item B<Status of Implementation>
                    222: 
                    223: n/a
                    224: 
                    225: =back
                    226: 
1.2     ! harris41  227: =item B<Apache::GATEWAY::ToNSDL::search_against_LONCAPAnetwork>
1.1       harris41  228: 
                    229: =over 4
                    230: 
                    231: =item B<Input> - Scalar string
                    232: 
                    233: Search results to pass from the NSDL-LONCAPA Gateway Server onto the
                    234: NSDL.
                    235: 
                    236: =item B<Output> - Scalar string, Scalar array reference
                    237: 
                    238: An exit code is returned as a scalar string.
                    239: 
                    240: A pointer to the location of search results is returned.
                    241: 
                    242: =item B<Description>
                    243: 
                    244: This models the functionality by which the NSDL-LONCAPA Gateway server will
                    245: pass search results to NSDL.
                    246: This launches the search request and receives a pointer as to
                    247: where the results will be.
                    248: 
                    249: =item B<Status of Implementation>
                    250: 
                    251: n/a
                    252: 
                    253: =back
                    254: 
                    255: =back
                    256: 
                    257: =head1 README
                    258: 
                    259: B<Apache::GATEWAY::ToNSDL>
                    260: is part of the NSDL-LONCAPA Gateway Server system.
                    261: Please see http://nsdl.lon-capa.org/ for more information.
                    262: 
                    263: =head1 AUTHOR
                    264: 
                    265: Scott Harrison, 2002
                    266: 
                    267: =head1 PREREQUISITES
                    268: 
                    269: This module requires the C<strict> module.
                    270: 
                    271: =head1 COREQUISITES
                    272: 
                    273: Apache::NSDL::FromTheGateway
                    274: Apache::NSDL::ToTheGateway
                    275: Apache::GATEWAY::FromNSDL
                    276: Apache::GATEWAY::ToLONCAPA
                    277: Apache::GATEWAY::FromLONCAPA
                    278: Apache::LONCAPA::FromTheGateway
                    279: Apache::LONCAPA::ToTheGateway
                    280: 
                    281: =head1 SEE ALSO
                    282: 
                    283: http://www.lon-capa.org/
                    284: 
                    285: http://www.smete.org/
                    286: 
                    287: Also visit the other Apache::NSDL::*, Apache::LONCAPA::*,
                    288: and Apache::GATEWAY::* manpages.
                    289: 
                    290: =head1 OSNAMES
                    291: 
                    292: linux
                    293: 
                    294: =cut
                    295: 

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