SEM_APIS.IS_TRIPLE

Format

SEM_APIS.IS_TRIPLE(
     model_id      IN NUMBER,
     subject       IN VARCHAR2,
     property      IN VARCHAR2,
     object        IN VARCHAR2,
     network_owner IN VARCHAR2 DEFAULT NULL,
     network_name  IN VARCHAR2 DEFAULT NULL
) RETURN VARCHAR2;

or

SEM_APIS.IS_TRIPLE(
     model_name    IN VARCHAR2,
     subject       IN VARCHAR2,
     property      IN VARCHAR2,
     object        IN VARCHAR2,
     network_owner IN VARCHAR2 DEFAULT NULL,
     network_name  IN VARCHAR2 DEFAULT NULL
) RETURN VARCHAR2;

Description

Checks if a statement is an existing triple in the specified model in the database.

Parameters

model_id

ID number of the semantic technology model. Must match a value in the MODEL_ID column of the SEM_MODEL$ view, which is described in Metadata for Models.

model_name

Name of the semantic technology model. Must match a value in the MODEL_NAME column of the SEM_MODEL$ view, which is described in Metadata for Models.

subject

Subject. Must match a value in the VALUE_NAME column of the RDF_VALUE$ table, which is described in Statements.

property

Property. Must match a value in the VALUE_NAME column of the RDF_VALUE$ table, which is described in Statements.

object

Object. Must match a value in the VALUE_NAME column of the RDF_VALUE$ table, which is described in Statements.

network_owner

Owner of the RDF network. (See Table: network_owner and network_name Parameters.)

network_name

Name of the RDF network. (See Table: network_owner and network_name Parameters.)

Usage Notes

This function returns the string value FALSE, TRUE, or TRUE (EXACT):

Examples

The following example checks if a statement is a triple in the database. In this case, there is an exact match. (This example is an excerpt from Example: Using an RDF Graph for Journal Article Information in Example: Journal Article Information.)

SELECT SEM_APIS.IS_TRIPLE(
  'articles',
  'http://nature.example.com/Article2',
  'http://purl.org/dc/terms/references',
  'http://nature.example.com/Article3') AS is_triple FROM DUAL;

IS_TRIPLE
--------------------------------------------------------------------------------
TRUE (EXACT)