Skip Headers

Oracle® interMedia Reference
10g Release 1 (10.1)

Part Number B10829-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

ORDSource Object Type

The ORDSource object type supports access to a variety of sources of multimedia data. It supports access to data sources locally in a BLOB within the database, externally from a BFILE on a local file system, externally from a URL on an HTTP server, or externally from a user-defined source on another server. This object type is defined as follows:

CREATE OR REPLACE TYPE ORDsource
AS OBJECT
(
  -- ATTRIBUTES
localData           BLOB,
srcType             VARCHAR2(4000),
srcLocation         VARCHAR2(4000),
srcName             VARCHAR2(4000),
updateTime          DATE,
local               NUMBER,
  -- METHODS 
-- Methods associated with the local attribute
MEMBER PROCEDURE setLocal,
MEMBER PROCEDURE clearLocal,
MEMBER FUNCTION isLocal RETURN BOOLEAN,
PRAGMA RESTRICT_REFERENCES(isLocal, WNDS, WNPS, RNDS, RNPS),
-- Methods associated with the updateTime attribute
MEMBER FUNCTION getUpdateTime RETURN DATE,
PRAGMA RESTRICT_REFERENCES(getUpdateTime, WNDS, WNPS, RNDS, RNPS),
MEMBER PROCEDURE setUpdateTime(current_time DATE),
-- Methods associated with the source information 
MEMBER PROCEDURE setSourceInformation(
                                      source_type     IN VARCHAR2,
                                      source_location IN VARCHAR2,
                                      source_name     IN VARCHAR2),
MEMBER FUNCTION getSourceInformation RETURN VARCHAR2,
PRAGMA RESTRICT_REFERENCES(getSourceInformation, WNDS, WNPS, RNDS, RNPS),

MEMBER FUNCTION getSourceType RETURN VARCHAR2,
PRAGMA RESTRICT_REFERENCES(getSourceType, WNDS, WNPS, RNDS, RNPS),

MEMBER FUNCTION getSourceLocation RETURN VARCHAR2,
PRAGMA RESTRICT_REFERENCES(getSourceLocation, WNDS, WNPS, RNDS, RNPS),

MEMBER FUNCTION getSourceName RETURN VARCHAR2,
PRAGMA RESTRICT_REFERENCES(getSourceName, WNDS, WNPS, RNDS, RNPS),

MEMBER FUNCTION getBFile RETURN BFILE,
PRAGMA RESTRICT_REFERENCES(getBFile, WNDS, WNPS, RNDS, RNPS),

-- Methods associated with source import/export operations
MEMBER PROCEDURE import(
                        ctx      IN OUT RAW,
                        mimetype OUT VARCHAR2,
                        format   OUT VARCHAR2),
MEMBER PROCEDURE importFrom(
                             ctx             IN OUT RAW,
                             mimetype        OUT VARCHAR2,
                             format          OUT VARCHAR2,
                             source_type     IN VARCHAR2,
                             source_location IN VARCHAR2,
                             source_name     IN VARCHAR2),
MEMBER PROCEDURE export(
                        ctx             IN OUT RAW,
                        source_type     IN VARCHAR2,
                        source_location IN VARCHAR2,
                        source_name     IN VARCHAR2),
-- Methods associated with source content-related operations
MEMBER FUNCTION getContentLength(ctx IN OUT RAW) RETURN INTEGER,
PRAGMA RESTRICT_REFERENCES(getContentLength, WNDS, WNPS, RNDS, RNPS),

MEMBER FUNCTION getSourceAddress(ctx IN OUT RAW, 
                                 userData IN VARCHAR2)
                RETURN VARCHAR2,
PRAGMA RESTRICT_REFERENCES(getSourceAddress, WNDS, WNPS, RNDS, RNPS),

MEMBER FUNCTION getLocalContent RETURN BLOB,
PRAGMA RESTRICT_REFERENCES(geLocalContent, WNDS, WNPS, RNDS, RNPS),

MEMBER PROCEDURE getContentInTempLob(
                                     ctx      IN OUT RAW, 
                                     tempLob  IN OUT NOCOPY BLOB, 
                                     mimetype OUT VARCHAR2, 
                                     format   OUT VARCHAR2, 
                                     duration IN PLS_INTEGER := 10, 
                                     cache    IN BOOLEAN := TRUE),
MEMBER PROCEDURE deleteLocalContent,

-- Methods associated with source access methods
MEMBER FUNCTION open(userArg IN RAW, ctx OUT RAW) RETURN INTEGER,
MEMBER FUNCTION close(ctx IN OUT RAW) RETURN INTEGER,
MEMBER FUNCTION trim(ctx     IN OUT RAW,
                     newlen  IN INTEGER) RETURN INTEGER,

-- Methods associated with content read/write operations
MEMBER PROCEDURE read(
                      ctx      IN OUT RAW,
                      startPos IN INTEGER,
                      numBytes IN OUT INTEGER,
                      buffer   OUT RAW), 
MEMBER PROCEDURE write(
                       ctx      IN OUT RAW,
                       startPos IN INTEGER,
                       numBytes IN OUT INTEGER,
                       buffer   IN RAW), 
-- Methods associated with any commands to be sent to the external source
MEMBER FUNCTION processCommand(
                               ctx     IN OUT RAW,
                               command IN VARCHAR2,
                               arglist IN VARCHAR2,
                               result  OUT RAW) 
                RETURN RAW
);

where: