URIType

URIType provides a means to store a URI in the database, rather than the document referenced by the URI. In the same way that the methods of the XMLType object can be used to insert or create XML document objects, methods of URIType objects can be used to insert or query URIs.

Consider the table created by this statement:

CREATE TABLE uri_tab (url sys.uritype)

The following query can be executed to get the document referenced by the URI:

SELECT e.url.getCLOB() FROM uri_tab e

To insert into the table, you must use the createHTTPURI or createDBURI method. It is not possible to do this by creating a type tree for the table and using this tree in an output card. Instead, the INSERT statement must be executed through a DBLOOKUP.

The following is an example of the syntax:

INSERT INTO uri_tab VALUES (sys.httpuritype.createHttpuri
('http://www.oracle.com'))

or

INSERT INTO uri_tab VALUES (sys.dburitype.createDBuri
('/SCOTT/ EMPLOYEE/ROW[ENAME="Jack"]'))