Index: openacs-4/packages/acs-content-repository/acs-content-repository.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/acs-content-repository.info,v diff -u -r1.73 -r1.74 --- openacs-4/packages/acs-content-repository/acs-content-repository.info 17 Sep 2007 09:43:56 -0000 1.73 +++ openacs-4/packages/acs-content-repository/acs-content-repository.info 17 Sep 2007 12:58:29 -0000 1.74 @@ -7,7 +7,7 @@ t t - + OpenACS The canonical repository for OpenACS content. 2007-04-22 @@ -20,7 +20,7 @@ GPL 3 - + Index: openacs-4/packages/acs-content-repository/sql/oracle/content-revision.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-revision.sql,v diff -u -r1.14 -r1.15 --- openacs-4/packages/acs-content-repository/sql/oracle/content-revision.sql 18 Jan 2005 16:44:19 -0000 1.14 +++ openacs-4/packages/acs-content-repository/sql/oracle/content-revision.sql 17 Sep 2007 12:58:30 -0000 1.15 @@ -10,7 +10,7 @@ -- License. Full text of the license is available from the GNU Project: -- http://www.fsf.org/copyleft/gpl.html -create or replace package body content_revision +create or replace package content_revision as function new ( @@ -356,63 +356,6 @@ end revision_name; -procedure index_attributes( - revision_id IN cr_revisions.revision_id%TYPE -) is - - clob_loc clob; - v_revision_id cr_revisions.revision_id%TYPE; - -begin - - insert into cr_revision_attributes ( - revision_id, attributes - ) values ( - revision_id, empty_clob() - ) returning attributes into clob_loc; - - v_revision_id := write_xml(revision_id, clob_loc); - -end index_attributes; - -function import_xml ( - item_id IN cr_items.item_id%TYPE, - revision_id IN cr_revisions.revision_id%TYPE, - doc_id IN number -) return cr_revisions.revision_id%TYPE is - - clob_loc clob; - v_revision_id cr_revisions.revision_id%TYPE; - -begin - - select doc into clob_loc from cr_xml_docs where doc_id = import_xml.doc_id; - v_revision_id := read_xml(item_id, revision_id, clob_loc); - - return v_revision_id; - -end import_xml; - -function export_xml ( - revision_id IN cr_revisions.revision_id%TYPE -) return cr_xml_docs.doc_id%TYPE is - - clob_loc clob; - v_doc_id cr_xml_docs.doc_id%TYPE; - v_revision_id cr_revisions.revision_id%TYPE; - -begin - - insert into cr_xml_docs (doc_id, doc) - values (cr_xml_doc_seq.nextval, empty_clob()) - returning doc_id, doc into v_doc_id, clob_loc; - - v_revision_id := write_xml(revision_id, clob_loc); - - return v_doc_id; - -end export_xml; - procedure to_html ( revision_id IN cr_revisions.revision_id%TYPE ) is Index: openacs-4/packages/acs-content-repository/sql/oracle/content-util.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-util.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-content-repository/sql/oracle/content-util.sql 24 Mar 2001 22:00:48 -0000 1.1 +++ openacs-4/packages/acs-content-repository/sql/oracle/content-util.sql 17 Sep 2007 12:58:30 -0000 1.2 @@ -60,69 +60,141 @@ / show errors -create or replace procedure clob_to_blob( - clob_loc clob, blob_loc blob) -as language - java -name - 'com.arsdigita.content.Util.clobToBlob( - oracle.sql.CLOB, oracle.sql.BLOB - )'; -/ -show errors -create or replace procedure blob_to_clob( - blob_loc blob, clob_loc clob) +create or replace procedure string_to_blob_size( + s varchar2, blob_loc blob, blob_size number) as language java name - 'com.arsdigita.content.Util.blobToClob( - oracle.sql.BLOB, oracle.sql.CLOB + 'com.arsdigita.content.Util.stringToBlob( + java.lang.String, oracle.sql.BLOB, int )'; / show errors +create or replace function blob_to_string (blob_loc IN BLOB) +RETURN VARCHAR2 +IS +v_blength number; +v_ret varchar(32767); +v_amount binary_integer:=10000; +v_offset integer:=1; +v_buffer raw(20000); +BEGIN + v_blength:=dbms_lob.getlength(blob_loc); + IF v_blength=0 THEN + return v_ret; + ELSE + if v_blength