354: outlob IN OUT NOCOPY clob) IS
355: begin
356: -- Write the metadata fields into output lob
357: if author is not null then
358: dbms_lob.writeappend(outlob, length(author), author);
359: dbms_lob.writeappend(outlob, 1, ' ');
360: end if;
361: if dispname is not null then
362: dbms_lob.writeappend(outlob, length(dispname), dispname);
355: begin
356: -- Write the metadata fields into output lob
357: if author is not null then
358: dbms_lob.writeappend(outlob, length(author), author);
359: dbms_lob.writeappend(outlob, 1, ' ');
360: end if;
361: if dispname is not null then
362: dbms_lob.writeappend(outlob, length(dispname), dispname);
363: dbms_lob.writeappend(outlob, 1, ' ');
358: dbms_lob.writeappend(outlob, length(author), author);
359: dbms_lob.writeappend(outlob, 1, ' ');
360: end if;
361: if dispname is not null then
362: dbms_lob.writeappend(outlob, length(dispname), dispname);
363: dbms_lob.writeappend(outlob, 1, ' ');
364: end if;
365: if rescomment is not null then
366: dbms_lob.writeappend(outlob, length(rescomment), rescomment);
359: dbms_lob.writeappend(outlob, 1, ' ');
360: end if;
361: if dispname is not null then
362: dbms_lob.writeappend(outlob, length(dispname), dispname);
363: dbms_lob.writeappend(outlob, 1, ' ');
364: end if;
365: if rescomment is not null then
366: dbms_lob.writeappend(outlob, length(rescomment), rescomment);
367: dbms_lob.writeappend(outlob, 1, ' ');
362: dbms_lob.writeappend(outlob, length(dispname), dispname);
363: dbms_lob.writeappend(outlob, 1, ' ');
364: end if;
365: if rescomment is not null then
366: dbms_lob.writeappend(outlob, length(rescomment), rescomment);
367: dbms_lob.writeappend(outlob, 1, ' ');
368: end if;
369: if owner is not null then
370: dbms_lob.writeappend(outlob, length(owner), owner);
363: dbms_lob.writeappend(outlob, 1, ' ');
364: end if;
365: if rescomment is not null then
366: dbms_lob.writeappend(outlob, length(rescomment), rescomment);
367: dbms_lob.writeappend(outlob, 1, ' ');
368: end if;
369: if owner is not null then
370: dbms_lob.writeappend(outlob, length(owner), owner);
371: dbms_lob.writeappend(outlob, 1, ' ');
366: dbms_lob.writeappend(outlob, length(rescomment), rescomment);
367: dbms_lob.writeappend(outlob, 1, ' ');
368: end if;
369: if owner is not null then
370: dbms_lob.writeappend(outlob, length(owner), owner);
371: dbms_lob.writeappend(outlob, 1, ' ');
372: end if;
373: if creator is not null then
374: dbms_lob.writeappend(outlob, length(creator), creator);
367: dbms_lob.writeappend(outlob, 1, ' ');
368: end if;
369: if owner is not null then
370: dbms_lob.writeappend(outlob, length(owner), owner);
371: dbms_lob.writeappend(outlob, 1, ' ');
372: end if;
373: if creator is not null then
374: dbms_lob.writeappend(outlob, length(creator), creator);
375: dbms_lob.writeappend(outlob, 1, ' ');
370: dbms_lob.writeappend(outlob, length(owner), owner);
371: dbms_lob.writeappend(outlob, 1, ' ');
372: end if;
373: if creator is not null then
374: dbms_lob.writeappend(outlob, length(creator), creator);
375: dbms_lob.writeappend(outlob, 1, ' ');
376: end if;
377: if lastmod is not null then
378: dbms_lob.writeappend(outlob, length(lastmod), lastmod);
371: dbms_lob.writeappend(outlob, 1, ' ');
372: end if;
373: if creator is not null then
374: dbms_lob.writeappend(outlob, length(creator), creator);
375: dbms_lob.writeappend(outlob, 1, ' ');
376: end if;
377: if lastmod is not null then
378: dbms_lob.writeappend(outlob, length(lastmod), lastmod);
379: dbms_lob.writeappend(outlob, 1, ' ');
374: dbms_lob.writeappend(outlob, length(creator), creator);
375: dbms_lob.writeappend(outlob, 1, ' ');
376: end if;
377: if lastmod is not null then
378: dbms_lob.writeappend(outlob, length(lastmod), lastmod);
379: dbms_lob.writeappend(outlob, 1, ' ');
380: end if;
381:
382: -- check if resextra holds data
375: dbms_lob.writeappend(outlob, 1, ' ');
376: end if;
377: if lastmod is not null then
378: dbms_lob.writeappend(outlob, length(lastmod), lastmod);
379: dbms_lob.writeappend(outlob, 1, ' ');
380: end if;
381:
382: -- check if resextra holds data
383: if resextra is not null and dbms_lob.getlength(resextra) > 0 then
379: dbms_lob.writeappend(outlob, 1, ' ');
380: end if;
381:
382: -- check if resextra holds data
383: if resextra is not null and dbms_lob.getlength(resextra) > 0 then
384: dbms_lob.append(outlob, resextra);
385: dbms_lob.writeappend(outlob, 1, ' ');
386: end if;
387:
380: end if;
381:
382: -- check if resextra holds data
383: if resextra is not null and dbms_lob.getlength(resextra) > 0 then
384: dbms_lob.append(outlob, resextra);
385: dbms_lob.writeappend(outlob, 1, ' ');
386: end if;
387:
388: -- check if xmlref/xmllob holds data
381:
382: -- check if resextra holds data
383: if resextra is not null and dbms_lob.getlength(resextra) > 0 then
384: dbms_lob.append(outlob, resextra);
385: dbms_lob.writeappend(outlob, 1, ' ');
386: end if;
387:
388: -- check if xmlref/xmllob holds data
389: if xmlref_lob is not null and dbms_lob.getlength(xmlref_lob) > 0 then
385: dbms_lob.writeappend(outlob, 1, ' ');
386: end if;
387:
388: -- check if xmlref/xmllob holds data
389: if xmlref_lob is not null and dbms_lob.getlength(xmlref_lob) > 0 then
390: dbms_lob.append(outlob, xmlref_lob);
391: end if;
392: END annotate_doclob;
393:
386: end if;
387:
388: -- check if xmlref/xmllob holds data
389: if xmlref_lob is not null and dbms_lob.getlength(xmlref_lob) > 0 then
390: dbms_lob.append(outlob, xmlref_lob);
391: end if;
392: END annotate_doclob;
393:
394: --
413: creator DBMS_QUOTED_ID; -- creator user name
414: lastmod DBMS_QUOTED_ID; -- last modifier user name
415:
416: begin
417: if (dbms_lob.getlength(outlob) <> 0) then
418: raise_application_error(-20010, 'non-zero lob');
419: end if;
420:
421: -- Get the columns from the resource row
448: xmlref_lob,
449: outlob);
450:
451: -- If resource data is stored in the blob, filter it
452: IF xmllob IS NOT NULL AND dbms_lob.getlength(xmllob) > 0 THEN
453: DECLARE
454: filterOption PLS_INTEGER; -- what kind of filter should I use
455: BEGIN
456: filterOption := getFilterOption(conType);
455: BEGIN
456: filterOption := getFilterOption(conType);
457: IF (filterOption = USE_NULL_FILTER) THEN
458: DECLARE
459: amount number := dbms_lob.getlength(xmllob);
460: dest_offset number := dbms_lob.getlength(outlob) + 1;
461: src_offset number := 1;
462: blob_csid number;
463: lang_context integer := 0;
456: filterOption := getFilterOption(conType);
457: IF (filterOption = USE_NULL_FILTER) THEN
458: DECLARE
459: amount number := dbms_lob.getlength(xmllob);
460: dest_offset number := dbms_lob.getlength(outlob) + 1;
461: src_offset number := 1;
462: blob_csid number;
463: lang_context integer := 0;
464: warning integer := 0;
463: lang_context integer := 0;
464: warning integer := 0;
465: BEGIN
466: blob_csid := getCharsetId(charset);
467: dbms_lob.convertToClob(outlob, xmllob, amount, dest_offset,
468: src_offset, blob_csid, lang_context,
469: warning);
470: END;
471: ELSIF (filterOption = USE_INSO_FILTER) THEN