File:  [LON-CAPA] / nsdl / lib / perl / Apache / GATEWAY / FromNSDL.pm
Revision 1.4: download - view: text, annotated - select for diffs
Sun Jul 14 07:42:13 2002 UTC (22 years, 2 months ago) by harris41
Branches: MAIN
CVS tags: HEAD
filling in some stubs

    1: # Apache::GATEWAY::FromNSDL
    2: #
    3: # FromNSDL.pm
    4: # API for passing information to the Gateway Server from NSDL
    5: #
    6: # For more documentation, read the POD documentation
    7: # of this module with the perldoc command:
    8: #
    9: #         perldoc ./FromNSDL.pm
   10: #
   11: # Brief description
   12: # =================
   13: #
   14: # This module contains functionality for
   15: # transferring information to the Gateway Server from 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_NSDLnetwork
   26: # GATEWAY->view_NSDLnetwork_results
   27: # GATEWAY->view_NSDLnetwork_metadata_record
   28: # GATEWAY->access_NSDLnetwork_resource
   29: 
   30: # Year 2002
   31: # Scott Harrison
   32: # February-May
   33: #
   34: ###
   35: 
   36: package Apache::GATEWAY::FromNSDL;
   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.4 $ =~ /(\d+)\.(\d+)/);
   43: 
   44: # ================================================================= SUBROUTINES
   45: 
   46: # ------------------------------------------------- GATEWAY->search_NSDLnetwork
   47: sub search_NSDLnetwork {
   48:     my ($eref)=@_;
   49:     return Apache::NSDL::ToTheGateway::answer_search_request($eref);
   50: }
   51: 
   52: # ------------------------------------------- GATEWAY->view_NSDLnetwork_results
   53: sub view_NSDLnetwork_results {
   54:     my ($eref)=@_;
   55:     return Apache::NSDL::ToTheGateway::answer_search_request($eref);
   56: }
   57: 
   58: # ----------------------------------- GATEWAY->view_NSDLnetwork_metadata_record
   59: sub view_NSDLnetwork_metadata_record {
   60:     my ($eref)=@_;
   61:     return Apache::NSDL::ToTheGateway::answer_metadata_record_request($eref);
   62: }
   63: 
   64: # ---------------------------------------- GATEWAY->access_NSDLnetwork_resource
   65: sub access_NSDLnetwork_resource {
   66:     my ($eref)=@_;
   67:     return Apache::NSDL::ToTheGateway::answer_resource_request($eref);
   68: }
   69: 
   70: 1;
   71: 
   72: __END__
   73: 
   74: =pod
   75: 
   76: =head1 NAME
   77: 
   78: B<Apache::GATEWAY::FromNSDL> - API for passing information to the Gateway Server from NSDL
   79: 
   80: =head1 SYNOPSIS
   81: 
   82:  use Apache::GATEWAY::FromNSDL;
   83: 
   84:  my $accessref=
   85:     Apache::GATEWAY::FromNSDL::access_NSDLnetwork_resource
   86:       ($resource_identifier);
   87: 
   88: =head1 DESCRIPTION
   89: 
   90: This module contains functionality for
   91: transferring information to the Gateway Server from NSDL.
   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::GATEWAY::FromNSDL::view_NSDLnetwork_results>
  151: 
  152: =over 4
  153: 
  154: =item B<Input> - Scalar string
  155: 
  156: Memory location of NSDL results.
  157: 
  158: =item B<Output> - Scalar string, Scalar string reference
  159: 
  160: An exit code is returned as a scalar string.
  161: 
  162: View the NSDL results.
  163: 
  164: =item B<Description>
  165: 
  166: This facilitates the viewing of NSDL record lists.
  167: B<This relates to information that has passed
  168: to the GATEWAY I<from> NSDL>.
  169: 
  170: =item B<Status of Implementation>
  171: 
  172: n/a
  173: 
  174: =back
  175: 
  176: =item B<Apache::GATEWAY::FromNSDL::view_NSDLnetwork_metadata_record>
  177: 
  178: =over 4
  179: 
  180: =item B<Input> - Scalar string
  181: 
  182: Identifier for a specific NSDL metadata record.
  183: 
  184: =item B<Output> - Scalar string, Scalar string reference
  185: 
  186: An exit code is returned as a scalar string.
  187: 
  188: A pointer to the metadata.
  189: 
  190: =item B<Description>
  191: 
  192: This provides the content of the resource matching a given request.
  193: B<The information has passed to the GATEWAY I<from> NSDL>.
  194: 
  195: =item B<Status of Implementation>
  196: 
  197: n/a
  198: 
  199: =back
  200: 
  201: =item B<Apache::GATEWAY::FromNSDL::access_NSDLnetwork_resource>
  202: 
  203: =over 4
  204: 
  205: =item B<Input> - Scalar string
  206: 
  207: Identifier for NSDL resource.
  208: 
  209: =item B<Output> - Scalar string, Scalar string reference.
  210: 
  211: An exit code is returned as a scalar string.
  212: 
  213: Pointer to information about accessing NSDL resource.
  214: 
  215: =item B<Description>
  216: 
  217: This accepts access to a NSDL resource.
  218: B<The information has passed to the GATEWAY I<from> NSDL>.
  219: 
  220: =item B<Status of Implementation>
  221: 
  222: n/a
  223: 
  224: =back
  225: 
  226: =item B<Apache::GATEWAY::FromNSDL::search_NSDLnetwork>
  227: 
  228: =over 4
  229: 
  230: =item B<Input> - Scalar string
  231: 
  232: Set of search expressions and corresponding fields to pass onto
  233: NSDL.
  234: 
  235: =item B<Output> - Scalar string, Scalar array reference
  236: 
  237: An exit code is returned as a scalar string.
  238: 
  239: A pointer to the location of search results is returned.
  240: 
  241: =item B<Description>
  242: 
  243: This models the functionality by which the NSDL-LONCAPA Gateway Server will
  244: receive search results from a NSDL server.
  245: This launches the search request and receives a pointer as to
  246: where the results will be.
  247: 
  248: =item B<Status of Implementation>
  249: 
  250: n/a
  251: 
  252: =back
  253: 
  254: =back
  255: 
  256: =head1 README
  257: 
  258: B<Apache::GATEWAY::FromNSDL>
  259: is part of the NSDL-LONCAPA Gateway Server system.
  260: Please see http://nsdl.lon-capa.org/ for more information.
  261: 
  262: =head1 AUTHOR
  263: 
  264: Scott Harrison, 2002
  265: 
  266: =head1 PREREQUISITES
  267: 
  268: This module requires the C<strict> module.
  269: 
  270: =head1 COREQUISITES
  271: 
  272: Apache::NSDL::FromTheGateway
  273: Apache::NSDL::ToTheGateway
  274: Apache::GATEWAY::ToNSDL
  275: Apache::GATEWAY::ToLONCAPA
  276: Apache::GATEWAY::FromLONCAPA
  277: Apache::LONCAPA::FromTheGateway
  278: Apache::LONCAPA::ToTheGateway
  279: 
  280: =head1 SEE ALSO
  281: 
  282: http://www.lon-capa.org/
  283: 
  284: http://www.smete.org/
  285: 
  286: Also visit the other Apache::NSDL::*, Apache::LONCAPA::*,
  287: and Apache::GATEWAY::* manpages.
  288: 
  289: =head1 OSNAMES
  290: 
  291: linux
  292: 
  293: =cut
  294: 

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