Annotation of nsdl/lib/perl/Apache/LONCAPA/FromTheGateway.pm, revision 1.4

1.1       harris41    1: # Apache::LONCAPA::FromTheGateway
                      2: #
                      3: # FromTheGateway.pm
                      4: # API for passing information to LONCAPA from the Gateway Server
                      5: #
                      6: # For more documentation, read the POD documentation
                      7: # of this module with the perldoc command:
                      8: #
                      9: #         perldoc ./FromTheGateway.pm
                     10: #
                     11: # Brief description
                     12: # =================
                     13: #
                     14: # This module contains functionality for
1.2       harris41   15: # transferring information to LON-CAPA from the Gateway Server.
1.1       harris41   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: # LONCAPA->search_or_browse_against_NSDLgateway
                     26: # LONCAPA->view_NSDLgateway_results
                     27: # LONCAPA->view_NSDLgateway_metadata_record
                     28: # LONCAPA->access_NSDLgateway_resource
                     29: 
                     30: # Year 2002
                     31: # Scott Harrison
                     32: # February-May
                     33: #
                     34: ###
                     35: 
                     36: package Apache::LONCAPA::FromTheGateway;
                     37: 
                     38: # ================================================================ DEPENDENCIES
                     39: use strict; # enforce handling of variables, references and subroutines
                     40: 
                     41: # ============================================================ MODULE VARIABLES
1.4     ! harris41   42: my $VERSION = sprintf("%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/);
1.1       harris41   43: 
                     44: # ================================================================= SUBROUTINES
                     45: 
                     46:  
                     47: # ------------------------------- LONCAPA->search_or_browse_against_NSDLgateway
                     48: sub search_or_browse_against_NSDLgateway {
1.3       harris41   49:     my ($eref)=@_;
                     50:     return Apache::GATEWAY::ToLONCAPA::search_NSDLnetwork($eref);
1.1       harris41   51: }
                     52: 
                     53: # ------------------------------------------- LONCAPA->view_NSDLgateway_results
                     54: sub view_NSDLgateway_results {
1.4     ! harris41   55:     my ($eref)=@_;
        !            56:     return Apache::GATEWAY::ToLONCAPA::view_NSDLnetwork_results($eref);
1.1       harris41   57: }
                     58: 
                     59: # ----------------------------------- LONCAPA->view_NSDLgateway_metadata_record
                     60: sub view_NSDLgateway_metadata_record {
1.4     ! harris41   61:     my ($eref)=@_;
        !            62:     return Apache::GATEWAY::ToLONCAPA::view_NSDLnetwork_metadata_record($eref);
1.1       harris41   63: }
                     64: 
                     65: # ---------------------------------------- LONCAPA->access_NSDLgateway_resource
                     66: sub access_NSDLgateway_resource {
1.4     ! harris41   67:     my ($eref)=@_;
        !            68:     return Apache::GATEWAY::ToLONCAPA::access_NSDLnetwork_resource($eref);
1.1       harris41   69: }
                     70: 
                     71: 1;
                     72: 
                     73: __END__
                     74: 
                     75: =pod
                     76: 
                     77: =head1 NAME
                     78: 
                     79: B<Apache::LONCAPA::FromTheGateway> - API for passing information to LONCAPA from the Gateway Server
                     80: 
                     81: =head1 SYNOPSIS
                     82: 
                     83:  use Apache::LONCAPA::FromTheGateway;
                     84: 
                     85:  my $arrayref=
                     86:     Apache::LONCAPA::FromTheGateway::view_NSDLgateway_results
                     87:       ($information_location);
                     88: 
                     89: =head1 DESCRIPTION
                     90: 
                     91: This module contains functionality for
                     92: transferring information to LON-CAPA from the Gateway Server.
                     93: 
                     94: In terms of the overall data flow, the
                     95: '=====>' below indicates the role of this
                     96: module.
                     97: 
                     98: NSDL ---------E<gt> B<Gateway ========E<gt> LON-CAPA>
                     99: 
                    100: LON-CAPA -----E<gt> Gateway --------E<gt> NSDL
                    101: 
                    102: =head2 EXIT CODES
                    103: 
                    104: The subroutines of this module all output an exit code which
                    105: describes the status of function completion.  The exit code
                    106: may be followed by a more descriptive message such as:
                    107: 
                    108:  FORMATERROR:Sun May  5 20:15:16 GMT 2002:missing 'protocol://' pattern
                    109: 
                    110: =over 4
                    111: 
                    112: =item *
                    113: 
                    114: B<'SUCCESS'>, information was found and is being returned
                    115: 
                    116: =item *
                    117: 
                    118: B<'EMPTY'>, everything functioned properly, but no information was present
                    119: 
                    120: =item *
                    121: 
                    122: B<'BADEMPTY'>, everything appeared to function properly, but no information
                    123: was present (which defies expectation); this is useful for detecting phantom
                    124: cases of connectivity when verifying test cases of vertical software partitions
                    125: 
                    126: =item *
                    127: 
                    128: B<'TIMEOUT'>, the request is taking WAY too long
                    129: 
                    130: =item *
                    131: 
                    132: B<'FORMATERROR'>, the input argument is not formatted correctly in a way that
                    133: can be processed by the NSDL server
                    134: 
                    135: =item *
                    136: 
                    137: B<'CONNECTIONFAILURE'>, the NSDL server cannot be contacted
                    138: 
                    139: =back
                    140: 
                    141: =head2 SUBROUTINES
                    142: 
                    143: Note that the subroutines all output an exit code which
                    144: describes the status of function completion.
                    145: 
                    146: In the case of failed function completion, the other
                    147: output argument(s) will typically only be 'NULL' values.
                    148: 
                    149: =over 4
                    150: 
                    151: =item B<Apache::LONCAPA::view_NSDLgateway_results>
                    152: 
                    153: =over 4
                    154: 
                    155: =item B<Input> - Scalar string
                    156: 
                    157: Memory location of Gateway Server results.
                    158: 
                    159: =item B<Output> - Scalar string, Scalar string reference
                    160: 
                    161: An exit code is returned as a scalar string.
                    162: 
                    163: View the Gateway Server results.
                    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: to LON-CAPA I<from the> GATEWAY>.
                    170: 
                    171: =item B<Status of Implementation>
                    172: 
                    173: n/a
                    174: 
                    175: =back
                    176: 
                    177: =item B<Apache::LONCAPA::view_NSDLgateway_metadata_record>
                    178: 
                    179: =over 4
                    180: 
                    181: =item B<Input> - Scalar string
                    182: 
                    183: Identifier for a specific NSDL 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 to LONCAPA I<from the> GATEWAY>.
                    195: 
                    196: =item B<Status of Implementation>
                    197: 
                    198: n/a
                    199: 
                    200: =back
                    201: 
                    202: =item B<Apache::LONCAPA::access_NSDLgateway_resource>
                    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 NSDL resource.
                    215: 
                    216: =item B<Description>
                    217: 
                    218: This accepts access to a NSDL resource.
                    219: B<The information has passed to LON-CAPA I<from the> GATEWAY>.
                    220: 
                    221: =item B<Status of Implementation>
                    222: 
                    223: n/a
                    224: 
                    225: =back
                    226: 
                    227: =item B<Apache::LONCAPA::search_or_browse_against_NSDLgateway>
                    228: 
                    229: =over 4
                    230: 
                    231: =item B<Input> - Scalar string
                    232: 
                    233: Set of search expressions and corresponding fields to pass onto the
                    234: NSDLgateway.  Alternatively, a browse request.
                    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 a LONCAPA server will pass a search
                    245: request to the NSDL-LONCAPA Gateway Server.
                    246: This launches the search or browse 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::LONCAPA::FromTheGateway>
                    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::ToNSDL
                    276: Apache::GATEWAY::FromNSDL
                    277: Apache::GATEWAY::ToLONCAPA
                    278: Apache::GATEWAY::FromLONCAPA
                    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>