MINI MINI MANI MO

Path : /opt/oracle/product/18c/dbhomeXE/ord/im/admin/
File Upload :
Current File : //opt/oracle/product/18c/dbhomeXE/ord/im/admin/orddrpsp.sql

Rem
Rem $Header: ordim/src/server/sql/doc/orddrpsp.sql /main/1 2013/11/08 09:53:34 alexguti Exp $
Rem
Rem orddrpsp.sql
Rem
Rem Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
Rem
Rem    NAME
Rem      orddrpsp.sql - PL/SQL relational interface for ORD_DOC specs
Rem
Rem    DESCRIPTION
Rem      This script creates the specs for the ORD_DOC PL/SQL relational interface
Rem
Rem    NOTES
Rem      This script contains the specs for each of the functions/procedures of 
Rem	 ORD_DOC
Rem
Rem    MODIFIED   (MM/DD/YY)
Rem    alexguti    07/18/13 - Plsql package for relational interface - dicom
Rem    alexguti    07/18/13 - Created
Rem
Rem    BEGIN SQL_FILE_METADATA 
Rem    SQL_SOURCE_FILE: $SRCHOME/ordim/src/server/sql/doc/orddrpsp.sql 
Rem    SQL_SHIPPED_FILE: $ORACLE_HOME/ord/im/admin/orddrpsp.sql
Rem    SQL_PHASE: impbs.sql
Rem    SQL_STARTUP_MODE: NORMAL 
Rem    SQL_IGNORABLE_ERRORS: NONE 
Rem    SQL_CALLING_FILE:  $SRCHOME/ord/admin/impbs.sql
Rem    END SQL_FILE_METADATA

@@?/rdbms/admin/sqlsessstart.sql


-- THE FUNCTIONS, PACKAGES AND TYPES SUPPLIED BY THIS PACKAGE AND ITS EXTERNAL
-- INTERFACE ARE RESERVED BY ORACLE AND ARE SUBJECT TO CHANGE IN FUTURE
-- RELEASES.
-- THIS PACKAGE MUST NOT BE MODIFIED BY THE CUSTOMER.  DOING SO
-- COULD CAUSE INTERNAL ERRORS AND SECURITY VIOLATIONS IN THE DBMS.

CREATE OR REPLACE PACKAGE ORDSYS.ORD_DOC AUTHID CURRENT_USER AS

-------------------------------------
--FUNCTIONS AND PROCEDURES
-------------------------------------

--Description: Copies multimedia data from BLOBs within the database to an external
--data source.
--Input:
--src: The BLOB location of the data to be exported (or copied) to the destination
--location 
--dest_location: The location to which the source data is to be exported. 
--(File directory object)
--dest_name: The name of the destination file.
--Exceptions: ORDSourceExceptions.INCOMPLETE_SOURCE_INFORMATION
--            ORDSourceExceptions.IO_ERROR

  PROCEDURE  export (
      src IN BLOB,
      dest_location IN VARCHAR2,
      dest_name IN VARCHAR2
      );
      
-- Description: Import data from the specified external data source to the BLOB
-- specified by the dest parameter.
-- Input:
-- dest: The BLOB location to receive the data
-- source_type: The type of the source data.  (FILE or URL)
-- source_location: The location from which the source data is to be imported.
-- source_name: The name of the source data.
-- Exceptions:ORDSourceExceptions.NULL_SOURCE     

  PROCEDURE  importFrom (
      dest IN OUT NOCOPY BLOB,
      source_type IN VARCHAR2,
      source_location IN VARCHAR2,
      source_name IN VARCHAR2
      );
      
-- Description: Import data from the specified external data source to the BLOB
-- specified by the dest parameter.
-- Input:
-- dest: The BLOB location to receive the data
-- source_type: The type of the source data.  (FILE or URL)
-- source_location: The location from which the source data is to be imported.
-- source_name: The name of the source data.
-- format: The format of the data.
-- mime_type: The MIME type of the data. 
-- Exceptions:ORDSourceExceptions.NULL_SOURCE     

PROCEDURE  importFrom (
    dest IN OUT NOCOPY BLOB,
    source_type IN VARCHAR2,
    source_location IN VARCHAR2,
    source_name IN VARCHAR2,
    format OUT VARCHAR2,
    mime_type OUT VARCHAR2
    );

   
-- Description: Reads the document BFILE data to get the values of the media 
-- attributes for supported formats and then stores them in the input CLOB.  
-- This procedure populates the CLOB with a set of format and application
-- properties in XML form.
-- Input:
-- docBfile: The document data represented as BFILE.
-- attributes: The CLOB to hold the XML attribute information extracted by
-- the getProperties procedure.
-- This CLOB is populated with a set of format and application
-- properties of the document
-- BFILE data in XML form.
-- Exceptions: ORDSourceExceptions.EMPTY_SOURCE   

PROCEDURE  getProperties (
    docBfile IN OUT NOCOPY BFILE,
    attributes IN OUT NOCOPY CLOB
    );

-- Description: Reads the document BFILE data to get the values of the media
-- attributes for supported formats and then  
-- returns them as explicit parameters.  This procedure gets the properties for
-- these attributes of the document data: MIME types, content length,and format. 
-- It also populates the CLOB with a set of format and application properties 
-- in XML form.
-- Input:
-- docBfile: The document data represented as BFILE.
-- mimeType: The MIME type of the document data.
-- format: The format of the document data.
-- contentLength: The length of the content, in bytes.
-- Exceptions: ORDSourceExceptions.EMPTY_SOURCE

PROCEDURE  getProperties (
    docBfile IN OUT NOCOPY BFILE,
    mimeType OUT VARCHAR2,
    format OUT VARCHAR2,
    contentLength OUT INTEGER
    );

-- Description: Reads the document BLOB data to get the values of the media 
-- attributes for supported formats and then stores them in the input CLOB.
-- This procedure populates the CLOB with a set of format and application 
-- properties in XML form.
-- Input:
-- docBlob: The document data represented as BLOB.
-- attributes: The CLOB to hold the XML attribute information extracted by
-- the getProperties procedure.
-- This CLOB is populated with a set of format and application properties 
-- of the document BFILE data in XML form.
-- Exceptions: ORDSourceExceptions.EMPTY_SOURCE

PROCEDURE  getProperties (
    docBlob IN BLOB,
    attributes IN OUT NOCOPY CLOB
    );
    
-- Description: Reads the document BLOB data to get the values of the media
-- attributes for supported formats and then  
-- returns them as explicit parameters.  This procedure gets the properties
-- for these attributes of the document data: MIME types, content length, and
-- format.  
-- Input:
-- docBLOB: The document data represented as BLOB.
-- mimeType: The MIME type of the document data.
-- format: The format of the document data.
-- contentLength: The length of the content, in bytes.
-- Exceptions: ORDSourceExceptions.EMPTY_SOURCE    

PROCEDURE  getProperties (
    docBlob IN BLOB,
    mimeType OUT VARCHAR2,
    format OUT VARCHAR2,
    contentLength OUT INTEGER
    );

END;
/
show errors;

@?/rdbms/admin/sqlsessend.sql


OHA YOOOO