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