1 Reply Latest reply on Feb 25, 2019 5:06 PM by Jpaiva-Oracle

    VALUES-query executed differently by SQLDeveloper and Jena-Adapter

    3886494

      Hi,

       

      I'm seeing some weird results with the following query:

       

      PREFIX ex:  <http://ex/>

      SELECT  ?x ?y

      WHERE {

        VALUES (?x ?y ) { ( ex:A ex:B1 )  ( ex:A ex:B3 ) ( ex:A ex:B2 ) }

      } ORDER BY ?x ?y

       

      If run on SQLDeveloper, the result is as I'd expect :(ex:A ex:B1)(ex:A ex:B2) (ex:A ex:B3).

      However, if run using the Jena Adapter the ResultSet contains three empty QuerySolutions .

      According to the debug output, ?x and ?y are null in each solution.

       

      Here is the debug output for reference.

       

      14:49:16.419 [main] DEBUG oracle.spatial.rdf.client.jena.QueryEngineSem - accept: start

      14:49:16.419 [main] DEBUG oracle.spatial.rdf.client.jena.QueryEngineSem - accept: is DatasetGraphOracleSem

      14:49:16.501 [main] DEBUG oracle.spatial.rdf.client.jena.QueryEngineSem - modifyOp: starts

      14:49:16.501 [main] DEBUG oracle.spatial.rdf.client.jena.QueryEngineSem - modifyOp: modify

      14:49:16.512 [main] DEBUG oracle.spatial.rdf.client.jena.QueryEngineSem - modifyOp: pre-modification (project (?x ?y)

        (order (?x ?y)

          (table (vars ?x ?y)

            (row [?y <http://ex/B1>] [?x <http://ex/A>])

            (row [?y <http://ex/B3>] [?x <http://ex/A>])

            (row [?y <http://ex/B2>] [?x <http://ex/A>])

          )))

       

       

      14:49:16.512 [main] DEBUG oracle.spatial.rdf.client.jena.OptimizeSem - optimize: set false opFilterPlacement

      14:49:16.512 [main] DEBUG oracle.spatial.rdf.client.jena.OptimizeSem - rewrite: starts

      14:49:16.512 [main] DEBUG oracle.spatial.rdf.client.jena.OptimizeSem - rewrite: started with op (project (?x ?y)

        (order (?x ?y)

          (table (vars ?x ?y)

            (row [?y <http://ex/B1>] [?x <http://ex/A>])

            (row [?y <http://ex/B3>] [?x <http://ex/A>])

            (row [?y <http://ex/B2>] [?x <http://ex/A>])

          )))

       

       

      14:49:16.513 [main] DEBUG oracle.spatial.rdf.client.jena.OptimizeSem - applyTransform: start with Property Functions

      14:49:16.514 [main] DEBUG oracle.spatial.rdf.client.jena.OptimizeSem - applyTransform: start with Join strategy

      14:49:16.514 [main] DEBUG oracle.spatial.rdf.client.jena.OptimizeSem - rewrite: skip TransformFilterEquality

      14:49:16.514 [main] DEBUG oracle.spatial.rdf.client.jena.OptimizeSem - rewrite: skip TransformFilterDisjunction

      14:49:16.514 [main] DEBUG oracle.spatial.rdf.client.jena.OptimizeSem - rewrite: skip filter placement

      14:49:16.514 [main] DEBUG oracle.spatial.rdf.client.jena.OptimizeSem - rewrite: skip Path flattening

      14:49:16.514 [main] DEBUG oracle.spatial.rdf.client.jena.OptimizeSem - applyTransform: start with Apply DISTINCT prior to ORDER BY where possible

      14:49:16.514 [main] DEBUG oracle.spatial.rdf.client.jena.OptimizeSem - rewrite: renaming subquery variables

      14:49:16.516 [main] DEBUG oracle.spatial.rdf.client.jena.OptimizeSem - rewrite: operation after rewrite (project (?x ?y)

        (order (?x ?y)

          (table (vars ?x ?y)

            (row [?y <http://ex/B1>] [?x <http://ex/A>])

            (row [?y <http://ex/B3>] [?x <http://ex/A>])

            (row [?y <http://ex/B2>] [?x <http://ex/A>])

          )))

       

       

      14:49:16.518 [main] DEBUG oracle.spatial.rdf.client.jena.QueryEngineSem - eval: starts

      14:49:16.518 [main] DEBUG oracle.spatial.rdf.client.jena.DatasetGraphOracleSem - getDefaultGraph: start

      14:49:16.519 [main] DEBUG oracle.spatial.rdf.client.jena.DatasetGraphOracleSem - getGraph: start with Node null

      14:49:16.519 [main] DEBUG oracle.spatial.rdf.client.jena.DatasetGraphOracleSem - getGraph: graph not in cache, creating from scratch

      14:49:16.519 [main] DEBUG oracle.spatial.rdf.client.jena.OracleNamedGraph - OracleNamedGraph: constructor

      14:49:16.519 [main] DEBUG oracle.spatial.rdf.client.jena.OracleModelBase - isValidModel: start

      14:49:16.521 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSemIterator - quietlyCloseResultSetAndStmt: close result set

      14:49:16.521 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSemIterator - quietlyCloseResultSetAndStmt: done closing statement in final block

      14:49:16.521 [main] DEBUG oracle.spatial.rdf.client.jena.OracleModelBase - isValidModel: model 'VSOTEST' is VALID modelID 14

      14:49:16.521 [main] DEBUG oracle.spatial.rdf.client.jena.OracleNamedGraph - OracleNamedGraph: constructor. running count 1

      14:49:16.525 [main] DEBUG oracle.spatial.rdf.client.jena.QueryOptionsParser - parseOrgQuery: pm = pm:{ex=http://ex/}

      14:49:16.525 [main] DEBUG oracle.spatial.rdf.client.jena.QueryOptionsParser - parseOrgQuery: split then decode

      14:49:16.525 [main] DEBUG oracle.spatial.rdf.client.jena.QueryOptionsParser - parseOrgQuery: pass on skip clob to the context false

      14:49:16.525 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - executeOp: constructor: entry point to query

      14:49:16.525 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - executeOp: constructor: start time 1549892956525

      14:49:16.526 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - execute: OpProject

      14:49:16.526 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - buildQueryIterUsingSemMatchVisitor: input class org.apache.jena.sparql.engine.iterator.QueryIterRoot

      14:49:16.526 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - buildQueryIterUsingSemMatchVisitor: hit top level QueryIterRoot

      14:49:16.527 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - buildQueryIterUsingSemMatchVisitor: get iterator using DB routing strategy

      14:49:16.527 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - buildQueryIterUsingSemMatchVisitor: class oracle.spatial.rdf.client.jena.DatasetGraphOracleSem

      14:49:16.527 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - buildQueryIterUsingDB: start

      14:49:16.527 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - buildQueryIterUsingDB: now trying visit OP for translation org.apache.jena.sparql.algebra.op.OpProject

      14:49:16.527 [main] DEBUG oracle.spatial.rdf.client.jena.OracleNestedOpCheckVisitor - visit: opUnit

      14:49:16.527 [main] DEBUG oracle.spatial.rdf.client.jena.OracleNestedOpCheckVisitor - visit: opOrder

      14:49:16.528 [main] DEBUG oracle.spatial.rdf.client.jena.OracleNestedOpCheckVisitor - visit: opProject (project (?x ?y)

        (order (?x ?y)

          (table (vars ?x ?y)

            (row [?y <http://ex/B1>] [?x <http://ex/A>])

            (row [?y <http://ex/B3>] [?x <http://ex/A>])

            (row [?y <http://ex/B2>] [?x <http://ex/A>])

          )))

       

       

      14:49:16.528 [main] DEBUG oracle.spatial.rdf.client.jena.OracleNestedOpCheckVisitor - isStructureSemMatchable: op class is org.apache.jena.sparql.algebra.op.OpProject

      14:49:16.528 [main] DEBUG oracle.spatial.rdf.client.jena.OracleNestedOpCheckVisitor - isStructureSemMatchable: true. case 4

      14:49:16.530 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: constructor. new visit...............................

      14:49:16.530 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: m_bNoNeedForOuterSelect true

      14:49:16.530 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: opProject m_iVisitCount 1 , m_iVisitDepth 1 , m_iProjectCount 1

      14:49:16.530 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: opProject (project (?x ?y)

        (order (?x ?y)

          (table (vars ?x ?y)

            (row [?y <http://ex/B1>] [?x <http://ex/A>])

            (row [?y <http://ex/B3>] [?x <http://ex/A>])

            (row [?y <http://ex/B2>] [?x <http://ex/A>])

          )))

       

       

      14:49:16.530 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: opProject var x

      14:49:16.530 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: opProject var y

      14:49:16.530 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: opOrder

      14:49:16.530 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: opOrder depth 1

      14:49:16.530 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: opUnit

      14:49:16.530 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - semMatchVisit: opTable (table (vars ?x ?y)

        (row [?y <http://ex/B1>] [?x <http://ex/A>])

        (row [?y <http://ex/B3>] [?x <http://ex/A>])

        (row [?y <http://ex/B2>] [?x <http://ex/A>])

      )

       

       

      14:49:16.531 [main] DEBUG oracle.spatial.rdf.client.jena.QueryOptionsParser - parseOrgQuery: pm = pm:{ex=http://ex/}

      14:49:16.531 [main] DEBUG oracle.spatial.rdf.client.jena.QueryOptionsParser - parseOrgQuery: split then decode

      14:49:16.531 [main] DEBUG oracle.spatial.rdf.client.jena.QueryOptionsParser - parseOrgQuery: pass on skip clob to the context false

      14:49:16.531 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - buildQueryIterUsingDB: no distinct

      14:49:16.531 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - buildQueryIter: iterator org.apache.jena.sparql.engine.iterator.QueryIterRoot

      14:49:16.537 [main] DEBUG oracle.spatial.rdf.client.jena.DatasetGraphOracleSem - getDefaultGraph: start

      14:49:16.537 [main] DEBUG oracle.spatial.rdf.client.jena.DatasetGraphOracleSem - getGraph: start with Node null

      14:49:16.537 [main] DEBUG oracle.spatial.rdf.client.jena.DatasetGraphOracleSem - getGraph: graph retrieved from cache

      14:49:16.537 [main] DEBUG oracle.spatial.rdf.client.jena.OracleGraphBase - getPrefixMapping: start

      14:49:16.538 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage:  outerBinding is [Root] , size = 0

      14:49:16.538 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: op (after substitute if needed) is (project (?x ?y)

        (order (?x ?y)

          (table (vars ?x ?y)

            (row [?y <http://ex/B1>] [?x <http://ex/A>])

            (row [?y <http://ex/B3>] [?x <http://ex/A>])

            (row [?y <http://ex/B2>] [?x <http://ex/A>])

          )))

       

       

      14:49:16.541 [main] DEBUG oracle.spatial.rdf.client.jena.ReservedKeywordHandler - loadReservedKeywords: no keywords file specified. Use the default one in the jar file

      14:49:16.541 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: start renaming

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: done  renaming

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: has to revisit

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: constructor. new visit...............................

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: m_bNoNeedForOuterSelect true

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: opProject m_iVisitCount 1 , m_iVisitDepth 1 , m_iProjectCount 1

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: opProject (project (?x ?y)

        (order (?x ?y)

          (table (vars ?x ?y)

            (row [?y <http://ex/B1>] [?x <http://ex/A>])

            (row [?y <http://ex/B3>] [?x <http://ex/A>])

            (row [?y <http://ex/B2>] [?x <http://ex/A>])

          )))

       

       

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: opProject var x

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: opProject var y

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: opOrder

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: opOrder depth 1

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - visit: opUnit

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - semMatchVisit: opTable (table (vars ?x ?y)

        (row [?y <http://ex/B1>] [?x <http://ex/A>])

        (row [?y <http://ex/B3>] [?x <http://ex/A>])

        (row [?y <http://ex/B2>] [?x <http://ex/A>])

      )

       

       

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.QueryOptionsParser - parseOrgQuery: pm = pm:{ex=http://ex/}

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.QueryOptionsParser - parseOrgQuery: split then decode

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.QueryOptionsParser - parseOrgQuery: pass on skip clob to the context false

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - buildSemMatchQueryPrefix: start

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - convertToVarArray: start set typejava.util.LinkedHashSet

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - convertToVarArray: done

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - buildSemMatchQueryPrefix: size 2

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - buildSemMatchQueryPrefix: - get var name x

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - buildSemMatchQueryPrefix: var not used in triple

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - setGuidAndOuterSelProj: szVarName x

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - buildSemMatchQueryPrefix: - get var name y

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - appendTrailingCommaIfNeeded: append a comma

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - appendTrailingCommaIfNeeded: append a comma

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - buildSemMatchQueryPrefix: var not used in triple

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - setGuidAndOuterSelProj: szVarName y

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - setGuide: starts

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - setGuide: size =2

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OpToSemMatchVisitor - getSPARQLString is  SELECT  ?x ?y WHERE {  VALUES( ?x ?y ) {( <http://ex/A> <http://ex/B1> ) ( <http://ex/A> <http://ex/B3> ) ( <http://ex/A> <http://ex/B2> ) }  }  ORDER BY  ?x ?y

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: active graph is DatasetGraphOracleSem

      14:49:16.544 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: S2SQP replace '' with '

      14:49:16.545 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: S2SPV [    ]

      14:49:16.545 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: S2SQP  SELECT  ?x ?y WHERE {  VALUES( ?x ?y ) {( <http://ex/A> <http://ex/B1> ) ( <http://ex/A> <http://ex/B3> ) ( <http://ex/A> <http://ex/B2> ) }  }  ORDER BY  ?x ?y

      14:49:16.545 [main] DEBUG oracle.spatial.rdf.client.jena.QueryOptionsParser - getUseS2S: true

      14:49:16.545 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: try s2s: projection =    

      14:49:16.545 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: entailment name null

      14:49:16.545 [main] DEBUG oracle.spatial.rdf.client.jena.OracleModelBase - hasVirtualModel: false

      14:49:16.545 [main] DEBUG oracle.spatial.rdf.client.jena.OracleQueryCache - OracleQueryCache: constructor cache size 1024

      14:49:16.546 [main] DEBUG oracle.spatial.rdf.client.jena.OracleModelBase - flushAdd: starts. but no action needed.

      14:49:16.546 [main] DEBUG oracle.spatial.rdf.client.jena.OracleModelBase - flushDelete: starts but no action required

      14:49:16.546 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: szSelectPortionForNamedGraph :=  select 

       

       

      14:49:16.546 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - buildExtraHint:

      14:49:16.546 [main] DEBUG oracle.spatial.rdf.client.jena.OracleQueryCache - add: use cache # 56

      14:49:16.546 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: S2S cache miss

      14:49:16.546 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: saModelNames 1

      14:49:16.551 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: built SQLarray

      14:49:16.551 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: szVMName null

      14:49:16.551 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - buildExtraHint:

      14:49:16.551 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSqlGenerator - leaveOnePairCurlyBrackets: started with string  SELECT  ?x ?y WHERE {  VALUES( ?x ?y ) {( <http://ex/A> <http://ex/B1> ) ( <http://ex/A> <http://ex/B3> ) ( <http://ex/A> <http://ex/B2> ) }  }  ORDER BY  ?x ?y

      14:49:16.551 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSqlGenerator - leaveOnePairCurlyBrackets: query contains FROM/FROM NAMED, return

      14:49:16.551 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSqlGenerator - convert: starts with sem_match patterns  SELECT  ?x ?y WHERE {  VALUES( ?x ?y ) {( <http://ex/A> <http://ex/B1> ) ( <http://ex/A> <http://ex/B3> ) ( <http://ex/A> <http://ex/B2> ) }  }  ORDER BY  ?x ?y, szProjVars     , szVmViewName null, szIdxStatus COMPLETE

      14:49:16.551 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSqlGenerator - convert: sem_match patterns  SELECT  ?x ?y WHERE {  VALUES( ?x ?y ) {( <http://ex/A> <http://ex/B1> ) ( <http://ex/A> <http://ex/B3> ) ( <http://ex/A> <http://ex/B2> ) }  }  ORDER BY  ?x ?y

      |||| options , NULL,' '

      14:49:16.551 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSqlGenerator - convert: sizes szSemMatchPatterns 160, szProjVars 0, szPrecompIdx 0, szOptions 10, szVmViewName 0, szIdxStatus 8, iFlag 4

      14:49:16.551 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSqlGenerator - convert: 1     

       

      14:49:16.551 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSqlGenerator - convert: sem_match patterns SELECT  ?x ?y WHERE {  VALUES( ?x ?y ) {( <http://ex/A> <http://ex/B1> ) ( <http://ex/A> <http://ex/B3> ) ( <http://ex/A> <http://ex/B2> ) }  }  ORDER BY  ?x ?y

      |||| options , NULL,' '

      14:49:16.551 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSqlGenerator - convert: sem_match patterns within longSparqlThreshold setting

      14:49:16.636 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSqlGenerator - convert: query after ORACLE_ORARDF_S2SUSRNG procedure SELECT /*+ NO_MERGE(R) NO_SWAP_JOIN_INPUTS(R) */ NULL AS X, R.X$RDFVID, NULL AS X$_PREFIX, NULL AS X$_SUFFIX, NULL AS X$RDFVTYP, TO_CLOB(NULL) AS X$RDFCLOB, NULL AS X$RDFLTYP, NULL AS X$RDFLANG,

      NULL AS Y, R.Y$RDFVID, NULL AS Y$_PREFIX, NULL AS Y$_SUFFIX, NULL AS Y$RDFVTYP, TO_CLOB(NULL) AS Y$RDFCLOB, NULL AS Y$RDFLTYP, NULL AS Y$RDFLANG,

      R.SEM$ROWNUM AS SEM$ROWNUM

      FROM (SELECT /*+ NO_MERGE(R) NO_SWAP_JOIN_INPUTS(R) */ R.X$RDFVID, R.X, R.X$RDFVTYP, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFLTYP, R.X$RDFLANG, R.X$RDFCLOB, R.X$RDFTERM, R.Y$RDFVID, R.Y, R.Y$RDFVTYP, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFLTYP, R.Y$RDFLANG, R.Y$RDFCLOB, R.Y$RDFTERM, ROWNUM AS SEM$ROWNUM

      FROM (

      SELECT R.X, R.X$RDFVID, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFVTYP, R.X$RDFCLOB, R.X$RDFLTYP, R.X$RDFLANG,

      R.X$RDFTERM,

      R.Y, R.Y$RDFVID, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFVTYP, R.Y$RDFCLOB, R.Y$RDFLTYP, R.Y$RDFLANG,

      R.Y$RDFTERM

      FROM (

      SELECT R.X$RDFVID, R.X, R.X$RDFVTYP, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFLTYP, R.X$RDFLANG, R.X$RDFCLOB, R.X$RDFTERM,

      R.Y$RDFVID, R.Y, R.Y$RDFVTYP, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFLTYP, R.Y$RDFLANG, R.Y$RDFCLOB, R.Y$RDFTERM

      FROM ((SELECT R.X$RDFVID, R.X, R.X$RDFVTYP, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFLTYP, R.X$RDFLANG, R.X$RDFCLOB, R.X$RDFTERM,

      R.Y$RDFVID, R.Y, R.Y$RDFVTYP, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFLTYP, R.Y$RDFLANG, R.Y$RDFCLOB, R.Y$RDFTERM

      FROM (SELECT  R.X, R.X$RDFVID, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFVTYP, R.X$RDFCLOB, R.X$RDFLTYP, R.X$RDFLANG,

      R.X$RDFTERM,

      R.Y, R.Y$RDFVID, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFVTYP, R.Y$RDFCLOB, R.Y$RDFLTYP, R.Y$RDFLANG,

      R.Y$RDFTERM

      FROM (SELECT /*+ NO_MERGE(R) */

      REPLACE(sem_apis.value_name_prefix(R.X$SRT,'URI') || sem_apis.value_name_suffix(R.X$SRT,'URI'),CHR(0)) AS X, R.X$RDFVID, REPLACE(sem_apis.value_name_prefix(R.X$SRT,'URI'),CHR(0)) AS X$_PREFIX, REPLACE(sem_apis.value_name_suffix(R.X$SRT,'URI'),CHR(0)) AS X$_SUFFIX, (CASE WHEN NVL2(R.X$SRT,'URI',NULL) IS NULL THEN NULL

      WHEN NVL2(R.X$SRT,'URI',NULL) IN ('UR','URI') THEN 'URI'

      WHEN NVL2(R.X$SRT,'URI',NULL) IN ('BN','BLN') THEN 'BLN'

      ELSE 'LIT'

      END) AS X$RDFVTYP, TO_CLOB(NULL) AS X$RDFCLOB, '' AS X$RDFLTYP, '' AS X$RDFLANG, sem_apis.compose_rdf_term(NVL2(TO_CLOB(NULL),to_char(TO_CHAR(DBMS_LOB.SUBSTR(TO_CLOB(TO_CLOB(NULL)),(4000-(NVL(length('')+4,0)+NVL(length('')+1,0)+2)),1))),sem_apis.value_name_prefix(R.X$SRT,'URI') || sem_apis.value_name_suffix(R.X$SRT,'URI')), NVL2(R.X$SRT,'URI',NULL), '', '') AS X$RDFTERM

      , REPLACE(sem_apis.value_name_prefix(R.Y$SRT,'URI') || sem_apis.value_name_suffix(R.Y$SRT,'URI'),CHR(0)) AS Y, R.Y$RDFVID, REPLACE(sem_apis.value_name_prefix(R.Y$SRT,'URI'),CHR(0)) AS Y$_PREFIX, REPLACE(sem_apis.value_name_suffix(R.Y$SRT,'URI'),CHR(0)) AS Y$_SUFFIX, (CASE WHEN NVL2(R.Y$SRT,'URI',NULL) IS NULL THEN NULL

      WHEN NVL2(R.Y$SRT,'URI',NULL) IN ('UR','URI') THEN 'URI'

      WHEN NVL2(R.Y$SRT,'URI',NULL) IN ('BN','BLN') THEN 'BLN'

      ELSE 'LIT'

      END) AS Y$RDFVTYP, TO_CLOB(NULL) AS Y$RDFCLOB, '' AS Y$RDFLTYP, '' AS Y$RDFLANG, sem_apis.compose_rdf_term(NVL2(TO_CLOB(NULL),to_char(TO_CHAR(DBMS_LOB.SUBSTR(TO_CLOB(TO_CLOB(NULL)),(4000-(NVL(length('')+4,0)+NVL(length('')+1,0)+2)),1))),sem_apis.value_name_prefix(R.Y$SRT,'URI') || sem_apis.value_name_suffix(R.Y$SRT,'URI')), NVL2(R.Y$SRT,'URI',NULL), '', '') AS Y$RDFTERM

      FROM (

      SELECT /*+ NO_MERGE(R) */

      R.X$RDFVID, R.X$SRT

      , R.Y$RDFVID, R.Y$SRT

      FROM (

      SELECT 

      TO_NUMBER(NULL) AS X$RDFVID, 'http://ex/A' AS X$SRT

      , TO_NUMBER(NULL) AS Y$RDFVID, 'http://ex/B1' AS Y$SRT

      FROM (

      SELECT NULL FROM DUAL

      ) R

      WHERE (1=1)

      ) R

      WHERE (1=1)

      ) R

      WHERE (1=1)) R

      WHERE (1=1) ) R)

      UNION ALL

      (SELECT R.X$RDFVID, R.X, R.X$RDFVTYP, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFLTYP, R.X$RDFLANG, R.X$RDFCLOB, R.X$RDFTERM,

      R.Y$RDFVID, R.Y, R.Y$RDFVTYP, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFLTYP, R.Y$RDFLANG, R.Y$RDFCLOB, R.Y$RDFTERM

      FROM (SELECT  R.X, R.X$RDFVID, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFVTYP, R.X$RDFCLOB, R.X$RDFLTYP, R.X$RDFLANG,

      R.X$RDFTERM,

      R.Y, R.Y$RDFVID, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFVTYP, R.Y$RDFCLOB, R.Y$RDFLTYP, R.Y$RDFLANG,

      R.Y$RDFTERM

      FROM (SELECT /*+ NO_MERGE(R) */

      REPLACE(sem_apis.value_name_prefix(R.X$SRT,'URI') || sem_apis.value_name_suffix(R.X$SRT,'URI'),CHR(0)) AS X, R.X$RDFVID, REPLACE(sem_apis.value_name_prefix(R.X$SRT,'URI'),CHR(0)) AS X$_PREFIX, REPLACE(sem_apis.value_name_suffix(R.X$SRT,'URI'),CHR(0)) AS X$_SUFFIX, (CASE WHEN NVL2(R.X$SRT,'URI',NULL) IS NULL THEN NULL

      WHEN NVL2(R.X$SRT,'URI',NULL) IN ('UR','URI') THEN 'URI'

      WHEN NVL2(R.X$SRT,'URI',NULL) IN ('BN','BLN') THEN 'BLN'

      ELSE 'LIT'

      END) AS X$RDFVTYP, TO_CLOB(NULL) AS X$RDFCLOB, '' AS X$RDFLTYP, '' AS X$RDFLANG, sem_apis.compose_rdf_term(NVL2(TO_CLOB(NULL),to_char(TO_CHAR(DBMS_LOB.SUBSTR(TO_CLOB(TO_CLOB(NULL)),(4000-(NVL(length('')+4,0)+NVL(length('')+1,0)+2)),1))),sem_apis.value_name_prefix(R.X$SRT,'URI') || sem_apis.value_name_suffix(R.X$SRT,'URI')), NVL2(R.X$SRT,'URI',NULL), '', '') AS X$RDFTERM

      , REPLACE(sem_apis.value_name_prefix(R.Y$SRT,'URI') || sem_apis.value_name_suffix(R.Y$SRT,'URI'),CHR(0)) AS Y, R.Y$RDFVID, REPLACE(sem_apis.value_name_prefix(R.Y$SRT,'URI'),CHR(0)) AS Y$_PREFIX, REPLACE(sem_apis.value_name_suffix(R.Y$SRT,'URI'),CHR(0)) AS Y$_SUFFIX, (CASE WHEN NVL2(R.Y$SRT,'URI',NULL) IS NULL THEN NULL

      WHEN NVL2(R.Y$SRT,'URI',NULL) IN ('UR','URI') THEN 'URI'

      WHEN NVL2(R.Y$SRT,'URI',NULL) IN ('BN','BLN') THEN 'BLN'

      ELSE 'LIT'

      END) AS Y$RDFVTYP, TO_CLOB(NULL) AS Y$RDFCLOB, '' AS Y$RDFLTYP, '' AS Y$RDFLANG, sem_apis.compose_rdf_term(NVL2(TO_CLOB(NULL),to_char(TO_CHAR(DBMS_LOB.SUBSTR(TO_CLOB(TO_CLOB(NULL)),(4000-(NVL(length('')+4,0)+NVL(length('')+1,0)+2)),1))),sem_apis.value_name_prefix(R.Y$SRT,'URI') || sem_apis.value_name_suffix(R.Y$SRT,'URI')), NVL2(R.Y$SRT,'URI',NULL), '', '') AS Y$RDFTERM

      FROM (

      SELECT /*+ NO_MERGE(R) */

      R.X$RDFVID, R.X$SRT

      , R.Y$RDFVID, R.Y$SRT

      FROM (

      SELECT 

      TO_NUMBER(NULL) AS X$RDFVID, 'http://ex/A' AS X$SRT

      , TO_NUMBER(NULL) AS Y$RDFVID, 'http://ex/B3' AS Y$SRT

      FROM (

      SELECT NULL FROM DUAL

      ) R

      WHERE (1=1)

      ) R

      WHERE (1=1)

      ) R

      WHERE (1=1)) R

      WHERE (1=1) ) R)

      UNION ALL

      (SELECT R.X$RDFVID, R.X, R.X$RDFVTYP, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFLTYP, R.X$RDFLANG, R.X$RDFCLOB, R.X$RDFTERM,

      R.Y$RDFVID, R.Y, R.Y$RDFVTYP, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFLTYP, R.Y$RDFLANG, R.Y$RDFCLOB, R.Y$RDFTERM

      FROM (SELECT  R.X, R.X$RDFVID, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFVTYP, R.X$RDFCLOB, R.X$RDFLTYP, R.X$RDFLANG,

      R.X$RDFTERM,

      R.Y, R.Y$RDFVID, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFVTYP, R.Y$RDFCLOB, R.Y$RDFLTYP, R.Y$RDFLANG,

      R.Y$RDFTERM

      FROM (SELECT /*+ NO_MERGE(R) */

      REPLACE(sem_apis.value_name_prefix(R.X$SRT,'URI') || sem_apis.value_name_suffix(R.X$SRT,'URI'),CHR(0)) AS X, R.X$RDFVID, REPLACE(sem_apis.value_name_prefix(R.X$SRT,'URI'),CHR(0)) AS X$_PREFIX, REPLACE(sem_apis.value_name_suffix(R.X$SRT,'URI'),CHR(0)) AS X$_SUFFIX, (CASE WHEN NVL2(R.X$SRT,'URI',NULL) IS NULL THEN NULL

      WHEN NVL2(R.X$SRT,'URI',NULL) IN ('UR','URI') THEN 'URI'

      WHEN NVL2(R.X$SRT,'URI',NULL) IN ('BN','BLN') THEN 'BLN'

      ELSE 'LIT'

      END) AS X$RDFVTYP, TO_CLOB(NULL) AS X$RDFCLOB, '' AS X$RDFLTYP, '' AS X$RDFLANG, sem_apis.compose_rdf_term(NVL2(TO_CLOB(NULL),to_char(TO_CHAR(DBMS_LOB.SUBSTR(TO_CLOB(TO_CLOB(NULL)),(4000-(NVL(length('')+4,0)+NVL(length('')+1,0)+2)),1))),sem_apis.value_name_prefix(R.X$SRT,'URI') || sem_apis.value_name_suffix(R.X$SRT,'URI')), NVL2(R.X$SRT,'URI',NULL), '', '') AS X$RDFTERM

      , REPLACE(sem_apis.value_name_prefix(R.Y$SRT,'URI') || sem_apis.value_name_suffix(R.Y$SRT,'URI'),CHR(0)) AS Y, R.Y$RDFVID, REPLACE(sem_apis.value_name_prefix(R.Y$SRT,'URI'),CHR(0)) AS Y$_PREFIX, REPLACE(sem_apis.value_name_suffix(R.Y$SRT,'URI'),CHR(0)) AS Y$_SUFFIX, (CASE WHEN NVL2(R.Y$SRT,'URI',NULL) IS NULL THEN NULL

      WHEN NVL2(R.Y$SRT,'URI',NULL) IN ('UR','URI') THEN 'URI'

      WHEN NVL2(R.Y$SRT,'URI',NULL) IN ('BN','BLN') THEN 'BLN'

      ELSE 'LIT'

      END) AS Y$RDFVTYP, TO_CLOB(NULL) AS Y$RDFCLOB, '' AS Y$RDFLTYP, '' AS Y$RDFLANG, sem_apis.compose_rdf_term(NVL2(TO_CLOB(NULL),to_char(TO_CHAR(DBMS_LOB.SUBSTR(TO_CLOB(TO_CLOB(NULL)),(4000-(NVL(length('')+4,0)+NVL(length('')+1,0)+2)),1))),sem_apis.value_name_prefix(R.Y$SRT,'URI') || sem_apis.value_name_suffix(R.Y$SRT,'URI')), NVL2(R.Y$SRT,'URI',NULL), '', '') AS Y$RDFTERM

      FROM (

      SELECT /*+ NO_MERGE(R) */

      R.X$RDFVID, R.X$SRT

      , R.Y$RDFVID, R.Y$SRT

      FROM (

      SELECT 

      TO_NUMBER(NULL) AS X$RDFVID, 'http://ex/A' AS X$SRT

      , TO_NUMBER(NULL) AS Y$RDFVID, 'http://ex/B2' AS Y$SRT

      FROM (

      SELECT NULL FROM DUAL

      ) R

      WHERE (1=1)

      ) R

      WHERE (1=1)

      ) R

      WHERE (1=1)) R

      WHERE (1=1) ) R)) R

      WHERE (1=1)

      ) R

       

       

      WHERE (1=1)

      ORDER BY CASE WHEN (R.X$RDFVTYP IS NULL) THEN 0

      WHEN (R.X$RDFVTYP IN ('BLN','BN')) THEN 1

      WHEN (R.X$RDFVTYP IN ('URI','UR')) THEN 2

      WHEN (R.X$RDFVTYP IN ('PL', 'PLL', 'CPLL', 'PL@', 'PLL@', 'CPLL@', 'TL', 'TLL', 'CTLL', 'LIT'))

      THEN (CASE WHEN (R.X$RDFLANG IS NOT NULL) THEN 5

      WHEN (R.X$RDFLTYP IS NOT NULL) THEN 4

      ELSE 3 END)

      ELSE NULL END  ASC NULLS FIRST,

      CASE WHEN (R.X$RDFLTYP IN ('http://www.w3.org/2001/XMLSchema#decimal','http://www.w3.org/2001/XMLSchema#double','http://www.w3.org/2001/XMLSchema#integer','http://www.w3.org/2001/XMLSchema#float','http://www.w3.org/2001/XMLSchema#int','http://www.w3.org/2001/XMLSchema#nonPositiveInteger','http://www.w3.org/2001/XMLSchema#negativeInteger','http://www.w3.org/2001/XMLSchema#long','http://www.w3.org/2001/XMLSchema#short','http://www.w3.org/2001/XMLSchema#byte','http://www.w3.org/2001/XMLSchema#nonNegativeInteger','http://www.w3.org/2001/XMLSchema#unsignedLong','http://www.w3.org/2001/XMLSchema#unsignedInt','http://www.w3.org/2001/XMLSchema#unsignedShort','http://www.w3.org/2001/XMLSchema#unsignedByte','http://www.w3.org/2001/XMLSchema#positiveInteger'))

      THEN TO_NUMBER(R.X$_PREFIX)

      ELSE NULL END  ASC NULLS FIRST,

      CASE WHEN (R.X$RDFLTYP IN ('http://www.w3.org/2001/XMLSchema#date','http://www.w3.org/2001/XMLSchema#time','http://www.w3.org/2001/XMLSchema#dateTime'))

      THEN DECODE (R.X$RDFLTYP,

      'http://www.w3.org/2001/XMLSchema#dateTime',

      TO_TIMESTAMP_TZ(R.X$_PREFIX || (CASE WHEN ((SUBSTRB(R.X$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.X$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.X$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM'),

      'http://www.w3.org/2001/XMLSchema#date',

      TO_TIMESTAMP_TZ(R.X$_PREFIX || (CASE WHEN ((SUBSTRB(R.X$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.X$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.X$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DDTZH:TZM'),

      'http://www.w3.org/2001/XMLSchema#time',

      DECODE (SUBSTRB(R.X$_PREFIX,1,1),

      '+',TO_TIMESTAMP_TZ('2009-06-26T' || SUBSTRB(REPLACE(R.X$_PREFIX,'T'),2) || (CASE WHEN ((SUBSTRB(R.X$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.X$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.X$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM') + INTERVAL '1' DAY,

      '-',TO_TIMESTAMP_TZ('2009-06-26T' || SUBSTRB(REPLACE(R.X$_PREFIX,'T'),2) || (CASE WHEN ((SUBSTRB(R.X$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.X$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.X$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM') - INTERVAL '1' DAY,

      '@',TO_TIMESTAMP_TZ('2009-06-26T' || SUBSTRB(REPLACE(R.X$_PREFIX,'T'),2) || (CASE WHEN ((SUBSTRB(R.X$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.X$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.X$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM'),

      TO_TIMESTAMP_TZ('2009-06-26T' || REPLACE(R.X$_PREFIX,'T') || (CASE WHEN ((SUBSTRB(R.X$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.X$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.X$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')),

      NULL

      )

       

       

      ELSE NULL END  ASC NULLS FIRST,

      SEM_APIS.unescape_rdf_value(R.X$_PREFIX || R.X$_SUFFIX)  ASC NULLS FIRST,

      CASE WHEN (R.Y$RDFVTYP IS NULL) THEN 0

      WHEN (R.Y$RDFVTYP IN ('BLN','BN')) THEN 1

      WHEN (R.Y$RDFVTYP IN ('URI','UR')) THEN 2

      WHEN (R.Y$RDFVTYP IN ('PL', 'PLL', 'CPLL', 'PL@', 'PLL@', 'CPLL@', 'TL', 'TLL', 'CTLL', 'LIT'))

      THEN (CASE WHEN (R.Y$RDFLANG IS NOT NULL) THEN 5

      WHEN (R.Y$RDFLTYP IS NOT NULL) THEN 4

      ELSE 3 END)

      ELSE NULL END  ASC NULLS FIRST,

      CASE WHEN (R.Y$RDFLTYP IN ('http://www.w3.org/2001/XMLSchema#decimal','http://www.w3.org/2001/XMLSchema#double','http://www.w3.org/2001/XMLSchema#integer','http://www.w3.org/2001/XMLSchema#float','http://www.w3.org/2001/XMLSchema#int','http://www.w3.org/2001/XMLSchema#nonPositiveInteger','http://www.w3.org/2001/XMLSchema#negativeInteger','http://www.w3.org/2001/XMLSchema#long','http://www.w3.org/2001/XMLSchema#short','http://www.w3.org/2001/XMLSchema#byte','http://www.w3.org/2001/XMLSchema#nonNegativeInteger','http://www.w3.org/2001/XMLSchema#unsignedLong','http://www.w3.org/2001/XMLSchema#unsignedInt','http://www.w3.org/2001/XMLSchema#unsignedShort','http://www.w3.org/2001/XMLSchema#unsignedByte','http://www.w3.org/2001/XMLSchema#positiveInteger'))

      THEN TO_NUMBER(R.Y$_PREFIX)

      ELSE NULL END  ASC NULLS FIRST,

      CASE WHEN (R.Y$RDFLTYP IN ('http://www.w3.org/2001/XMLSchema#date','http://www.w3.org/2001/XMLSchema#time','http://www.w3.org/2001/XMLSchema#dateTime'))

      THEN DECODE (R.Y$RDFLTYP,

      'http://www.w3.org/2001/XMLSchema#dateTime',

      TO_TIMESTAMP_TZ(R.Y$_PREFIX || (CASE WHEN ((SUBSTRB(R.Y$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.Y$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.Y$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM'),

      'http://www.w3.org/2001/XMLSchema#date',

      TO_TIMESTAMP_TZ(R.Y$_PREFIX || (CASE WHEN ((SUBSTRB(R.Y$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.Y$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.Y$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DDTZH:TZM'),

      'http://www.w3.org/2001/XMLSchema#time',

      DECODE (SUBSTRB(R.Y$_PREFIX,1,1),

      '+',TO_TIMESTAMP_TZ('2009-06-26T' || SUBSTRB(REPLACE(R.Y$_PREFIX,'T'),2) || (CASE WHEN ((SUBSTRB(R.Y$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.Y$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.Y$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM') + INTERVAL '1' DAY,

      '-',TO_TIMESTAMP_TZ('2009-06-26T' || SUBSTRB(REPLACE(R.Y$_PREFIX,'T'),2) || (CASE WHEN ((SUBSTRB(R.Y$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.Y$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.Y$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM') - INTERVAL '1' DAY,

      '@',TO_TIMESTAMP_TZ('2009-06-26T' || SUBSTRB(REPLACE(R.Y$_PREFIX,'T'),2) || (CASE WHEN ((SUBSTRB(R.Y$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.Y$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.Y$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM'),

      TO_TIMESTAMP_TZ('2009-06-26T' || REPLACE(R.Y$_PREFIX,'T') || (CASE WHEN ((SUBSTRB(R.Y$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.Y$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.Y$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')),

      NULL

      )

       

       

      ELSE NULL END  ASC NULLS FIRST,

      SEM_APIS.unescape_rdf_value(R.Y$_PREFIX || R.Y$_SUFFIX)  ASC NULLS FIRST

      ) R

      WHERE (1=1)) R

      WHERE (1=1)

      14:49:16.637 [main] DEBUG oracle.spatial.rdf.client.jena.OracleQueryCache - add: use cache # 56

      14:49:16.637 [main] DEBUG oracle.spatial.rdf.client.jena.OracleRepeatApply - nextStage: no valid AP

      14:49:16.638 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - buildSemIterator: start

      14:49:16.638 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - buildSemIterator: list bind values size 0

      14:49:16.638 [main] DEBUG oracle.spatial.rdf.client.jena.OracleModelBase - flushAdd: starts. but no action needed.

      14:49:16.638 [main] DEBUG oracle.spatial.rdf.client.jena.OracleModelBase - flushDelete: starts but no action required

      14:49:16.638 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - nextStage: no additional binding values

      14:49:16.638 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - buildSemIterator: before exec. list bind values size 0

      14:49:16.638 [main] DEBUG oracle.spatial.rdf.client.jena.Oracle - executeQuery: in [0] seconds, qid 0, dop [1], ods 2 select  x$RDFVTYP,x , y$RDFVTYP,y  from ( select  inner.* from ( select

      NULL x$RDFVTYP, NULL x , NULL y$RDFVTYP, NULL y , SEM$ROWNUM

      from ( SELECT /*+ NO_MERGE(R) NO_SWAP_JOIN_INPUTS(R) */ NULL AS X, R.X$RDFVID, NULL AS X$_PREFIX, NULL AS X$_SUFFIX, NULL AS X$RDFVTYP, TO_CLOB(NULL) AS X$RDFCLOB, NULL AS X$RDFLTYP, NULL AS X$RDFLANG,

      NULL AS Y, R.Y$RDFVID, NULL AS Y$_PREFIX, NULL AS Y$_SUFFIX, NULL AS Y$RDFVTYP, TO_CLOB(NULL) AS Y$RDFCLOB, NULL AS Y$RDFLTYP, NULL AS Y$RDFLANG,

      R.SEM$ROWNUM AS SEM$ROWNUM

      FROM (SELECT /*+ NO_MERGE(R) NO_SWAP_JOIN_INPUTS(R) */ R.X$RDFVID, R.X, R.X$RDFVTYP, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFLTYP, R.X$RDFLANG, R.X$RDFCLOB, R.X$RDFTERM, R.Y$RDFVID, R.Y, R.Y$RDFVTYP, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFLTYP, R.Y$RDFLANG, R.Y$RDFCLOB, R.Y$RDFTERM, ROWNUM AS SEM$ROWNUM

      FROM (

      SELECT R.X, R.X$RDFVID, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFVTYP, R.X$RDFCLOB, R.X$RDFLTYP, R.X$RDFLANG,

      R.X$RDFTERM,

      R.Y, R.Y$RDFVID, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFVTYP, R.Y$RDFCLOB, R.Y$RDFLTYP, R.Y$RDFLANG,

      R.Y$RDFTERM

      FROM (

      SELECT R.X$RDFVID, R.X, R.X$RDFVTYP, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFLTYP, R.X$RDFLANG, R.X$RDFCLOB, R.X$RDFTERM,

      R.Y$RDFVID, R.Y, R.Y$RDFVTYP, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFLTYP, R.Y$RDFLANG, R.Y$RDFCLOB, R.Y$RDFTERM

      FROM ((SELECT R.X$RDFVID, R.X, R.X$RDFVTYP, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFLTYP, R.X$RDFLANG, R.X$RDFCLOB, R.X$RDFTERM,

      R.Y$RDFVID, R.Y, R.Y$RDFVTYP, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFLTYP, R.Y$RDFLANG, R.Y$RDFCLOB, R.Y$RDFTERM

      FROM (SELECT  R.X, R.X$RDFVID, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFVTYP, R.X$RDFCLOB, R.X$RDFLTYP, R.X$RDFLANG,

      R.X$RDFTERM,

      R.Y, R.Y$RDFVID, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFVTYP, R.Y$RDFCLOB, R.Y$RDFLTYP, R.Y$RDFLANG,

      R.Y$RDFTERM

      FROM (SELECT /*+ NO_MERGE(R) */

      REPLACE(sem_apis.value_name_prefix(R.X$SRT,'URI') || sem_apis.value_name_suffix(R.X$SRT,'URI'),CHR(0)) AS X, R.X$RDFVID, REPLACE(sem_apis.value_name_prefix(R.X$SRT,'URI'),CHR(0)) AS X$_PREFIX, REPLACE(sem_apis.value_name_suffix(R.X$SRT,'URI'),CHR(0)) AS X$_SUFFIX, (CASE WHEN NVL2(R.X$SRT,'URI',NULL) IS NULL THEN NULL

      WHEN NVL2(R.X$SRT,'URI',NULL) IN ('UR','URI') THEN 'URI'

      WHEN NVL2(R.X$SRT,'URI',NULL) IN ('BN','BLN') THEN 'BLN'

      ELSE 'LIT'

      END) AS X$RDFVTYP, TO_CLOB(NULL) AS X$RDFCLOB, '' AS X$RDFLTYP, '' AS X$RDFLANG, sem_apis.compose_rdf_term(NVL2(TO_CLOB(NULL),to_char(TO_CHAR(DBMS_LOB.SUBSTR(TO_CLOB(TO_CLOB(NULL)),(4000-(NVL(length('')+4,0)+NVL(length('')+1,0)+2)),1))),sem_apis.value_name_prefix(R.X$SRT,'URI') || sem_apis.value_name_suffix(R.X$SRT,'URI')), NVL2(R.X$SRT,'URI',NULL), '', '') AS X$RDFTERM

      , REPLACE(sem_apis.value_name_prefix(R.Y$SRT,'URI') || sem_apis.value_name_suffix(R.Y$SRT,'URI'),CHR(0)) AS Y, R.Y$RDFVID, REPLACE(sem_apis.value_name_prefix(R.Y$SRT,'URI'),CHR(0)) AS Y$_PREFIX, REPLACE(sem_apis.value_name_suffix(R.Y$SRT,'URI'),CHR(0)) AS Y$_SUFFIX, (CASE WHEN NVL2(R.Y$SRT,'URI',NULL) IS NULL THEN NULL

      WHEN NVL2(R.Y$SRT,'URI',NULL) IN ('UR','URI') THEN 'URI'

      WHEN NVL2(R.Y$SRT,'URI',NULL) IN ('BN','BLN') THEN 'BLN'

      ELSE 'LIT'

      END) AS Y$RDFVTYP, TO_CLOB(NULL) AS Y$RDFCLOB, '' AS Y$RDFLTYP, '' AS Y$RDFLANG, sem_apis.compose_rdf_term(NVL2(TO_CLOB(NULL),to_char(TO_CHAR(DBMS_LOB.SUBSTR(TO_CLOB(TO_CLOB(NULL)),(4000-(NVL(length('')+4,0)+NVL(length('')+1,0)+2)),1))),sem_apis.value_name_prefix(R.Y$SRT,'URI') || sem_apis.value_name_suffix(R.Y$SRT,'URI')), NVL2(R.Y$SRT,'URI',NULL), '', '') AS Y$RDFTERM

      FROM (

      SELECT /*+ NO_MERGE(R) */

      R.X$RDFVID, R.X$SRT

      , R.Y$RDFVID, R.Y$SRT

      FROM (

      SELECT 

      TO_NUMBER(NULL) AS X$RDFVID, 'http://ex/A' AS X$SRT

      , TO_NUMBER(NULL) AS Y$RDFVID, 'http://ex/B1' AS Y$SRT

      FROM (

      SELECT NULL FROM DUAL

      ) R

      WHERE (1=1)

      ) R

      WHERE (1=1)

      ) R

      WHERE (1=1)) R

      WHERE (1=1) ) R)

      UNION ALL

      (SELECT R.X$RDFVID, R.X, R.X$RDFVTYP, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFLTYP, R.X$RDFLANG, R.X$RDFCLOB, R.X$RDFTERM,

      R.Y$RDFVID, R.Y, R.Y$RDFVTYP, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFLTYP, R.Y$RDFLANG, R.Y$RDFCLOB, R.Y$RDFTERM

      FROM (SELECT  R.X, R.X$RDFVID, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFVTYP, R.X$RDFCLOB, R.X$RDFLTYP, R.X$RDFLANG,

      R.X$RDFTERM,

      R.Y, R.Y$RDFVID, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFVTYP, R.Y$RDFCLOB, R.Y$RDFLTYP, R.Y$RDFLANG,

      R.Y$RDFTERM

      FROM (SELECT /*+ NO_MERGE(R) */

      REPLACE(sem_apis.value_name_prefix(R.X$SRT,'URI') || sem_apis.value_name_suffix(R.X$SRT,'URI'),CHR(0)) AS X, R.X$RDFVID, REPLACE(sem_apis.value_name_prefix(R.X$SRT,'URI'),CHR(0)) AS X$_PREFIX, REPLACE(sem_apis.value_name_suffix(R.X$SRT,'URI'),CHR(0)) AS X$_SUFFIX, (CASE WHEN NVL2(R.X$SRT,'URI',NULL) IS NULL THEN NULL

      WHEN NVL2(R.X$SRT,'URI',NULL) IN ('UR','URI') THEN 'URI'

      WHEN NVL2(R.X$SRT,'URI',NULL) IN ('BN','BLN') THEN 'BLN'

      ELSE 'LIT'

      END) AS X$RDFVTYP, TO_CLOB(NULL) AS X$RDFCLOB, '' AS X$RDFLTYP, '' AS X$RDFLANG, sem_apis.compose_rdf_term(NVL2(TO_CLOB(NULL),to_char(TO_CHAR(DBMS_LOB.SUBSTR(TO_CLOB(TO_CLOB(NULL)),(4000-(NVL(length('')+4,0)+NVL(length('')+1,0)+2)),1))),sem_apis.value_name_prefix(R.X$SRT,'URI') || sem_apis.value_name_suffix(R.X$SRT,'URI')), NVL2(R.X$SRT,'URI',NULL), '', '') AS X$RDFTERM

      , REPLACE(sem_apis.value_name_prefix(R.Y$SRT,'URI') || sem_apis.value_name_suffix(R.Y$SRT,'URI'),CHR(0)) AS Y, R.Y$RDFVID, REPLACE(sem_apis.value_name_prefix(R.Y$SRT,'URI'),CHR(0)) AS Y$_PREFIX, REPLACE(sem_apis.value_name_suffix(R.Y$SRT,'URI'),CHR(0)) AS Y$_SUFFIX, (CASE WHEN NVL2(R.Y$SRT,'URI',NULL) IS NULL THEN NULL

      WHEN NVL2(R.Y$SRT,'URI',NULL) IN ('UR','URI') THEN 'URI'

      WHEN NVL2(R.Y$SRT,'URI',NULL) IN ('BN','BLN') THEN 'BLN'

      ELSE 'LIT'

      END) AS Y$RDFVTYP, TO_CLOB(NULL) AS Y$RDFCLOB, '' AS Y$RDFLTYP, '' AS Y$RDFLANG, sem_apis.compose_rdf_term(NVL2(TO_CLOB(NULL),to_char(TO_CHAR(DBMS_LOB.SUBSTR(TO_CLOB(TO_CLOB(NULL)),(4000-(NVL(length('')+4,0)+NVL(length('')+1,0)+2)),1))),sem_apis.value_name_prefix(R.Y$SRT,'URI') || sem_apis.value_name_suffix(R.Y$SRT,'URI')), NVL2(R.Y$SRT,'URI',NULL), '', '') AS Y$RDFTERM

      FROM (

      SELECT /*+ NO_MERGE(R) */

      R.X$RDFVID, R.X$SRT

      , R.Y$RDFVID, R.Y$SRT

      FROM (

      SELECT 

      TO_NUMBER(NULL) AS X$RDFVID, 'http://ex/A' AS X$SRT

      , TO_NUMBER(NULL) AS Y$RDFVID, 'http://ex/B3' AS Y$SRT

      FROM (

      SELECT NULL FROM DUAL

      ) R

      WHERE (1=1)

      ) R

      WHERE (1=1)

      ) R

      WHERE (1=1)) R

      WHERE (1=1) ) R)

      UNION ALL

      (SELECT R.X$RDFVID, R.X, R.X$RDFVTYP, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFLTYP, R.X$RDFLANG, R.X$RDFCLOB, R.X$RDFTERM,

      R.Y$RDFVID, R.Y, R.Y$RDFVTYP, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFLTYP, R.Y$RDFLANG, R.Y$RDFCLOB, R.Y$RDFTERM

      FROM (SELECT  R.X, R.X$RDFVID, R.X$_PREFIX, R.X$_SUFFIX, R.X$RDFVTYP, R.X$RDFCLOB, R.X$RDFLTYP, R.X$RDFLANG,

      R.X$RDFTERM,

      R.Y, R.Y$RDFVID, R.Y$_PREFIX, R.Y$_SUFFIX, R.Y$RDFVTYP, R.Y$RDFCLOB, R.Y$RDFLTYP, R.Y$RDFLANG,

      R.Y$RDFTERM

      FROM (SELECT /*+ NO_MERGE(R) */

      REPLACE(sem_apis.value_name_prefix(R.X$SRT,'URI') || sem_apis.value_name_suffix(R.X$SRT,'URI'),CHR(0)) AS X, R.X$RDFVID, REPLACE(sem_apis.value_name_prefix(R.X$SRT,'URI'),CHR(0)) AS X$_PREFIX, REPLACE(sem_apis.value_name_suffix(R.X$SRT,'URI'),CHR(0)) AS X$_SUFFIX, (CASE WHEN NVL2(R.X$SRT,'URI',NULL) IS NULL THEN NULL

      WHEN NVL2(R.X$SRT,'URI',NULL) IN ('UR','URI') THEN 'URI'

      WHEN NVL2(R.X$SRT,'URI',NULL) IN ('BN','BLN') THEN 'BLN'

      ELSE 'LIT'

      END) AS X$RDFVTYP, TO_CLOB(NULL) AS X$RDFCLOB, '' AS X$RDFLTYP, '' AS X$RDFLANG, sem_apis.compose_rdf_term(NVL2(TO_CLOB(NULL),to_char(TO_CHAR(DBMS_LOB.SUBSTR(TO_CLOB(TO_CLOB(NULL)),(4000-(NVL(length('')+4,0)+NVL(length('')+1,0)+2)),1))),sem_apis.value_name_prefix(R.X$SRT,'URI') || sem_apis.value_name_suffix(R.X$SRT,'URI')), NVL2(R.X$SRT,'URI',NULL), '', '') AS X$RDFTERM

      , REPLACE(sem_apis.value_name_prefix(R.Y$SRT,'URI') || sem_apis.value_name_suffix(R.Y$SRT,'URI'),CHR(0)) AS Y, R.Y$RDFVID, REPLACE(sem_apis.value_name_prefix(R.Y$SRT,'URI'),CHR(0)) AS Y$_PREFIX, REPLACE(sem_apis.value_name_suffix(R.Y$SRT,'URI'),CHR(0)) AS Y$_SUFFIX, (CASE WHEN NVL2(R.Y$SRT,'URI',NULL) IS NULL THEN NULL

      WHEN NVL2(R.Y$SRT,'URI',NULL) IN ('UR','URI') THEN 'URI'

      WHEN NVL2(R.Y$SRT,'URI',NULL) IN ('BN','BLN') THEN 'BLN'

      ELSE 'LIT'

      END) AS Y$RDFVTYP, TO_CLOB(NULL) AS Y$RDFCLOB, '' AS Y$RDFLTYP, '' AS Y$RDFLANG, sem_apis.compose_rdf_term(NVL2(TO_CLOB(NULL),to_char(TO_CHAR(DBMS_LOB.SUBSTR(TO_CLOB(TO_CLOB(NULL)),(4000-(NVL(length('')+4,0)+NVL(length('')+1,0)+2)),1))),sem_apis.value_name_prefix(R.Y$SRT,'URI') || sem_apis.value_name_suffix(R.Y$SRT,'URI')), NVL2(R.Y$SRT,'URI',NULL), '', '') AS Y$RDFTERM

      FROM (

      SELECT /*+ NO_MERGE(R) */

      R.X$RDFVID, R.X$SRT

      , R.Y$RDFVID, R.Y$SRT

      FROM (

      SELECT 

      TO_NUMBER(NULL) AS X$RDFVID, 'http://ex/A' AS X$SRT

      , TO_NUMBER(NULL) AS Y$RDFVID, 'http://ex/B2' AS Y$SRT

      FROM (

      SELECT NULL FROM DUAL

      ) R

      WHERE (1=1)

      ) R

      WHERE (1=1)

      ) R

      WHERE (1=1)) R

      WHERE (1=1) ) R)) R

      WHERE (1=1)

      ) R

       

       

      WHERE (1=1)

      ORDER BY CASE WHEN (R.X$RDFVTYP IS NULL) THEN 0

      WHEN (R.X$RDFVTYP IN ('BLN','BN')) THEN 1

      WHEN (R.X$RDFVTYP IN ('URI','UR')) THEN 2

      WHEN (R.X$RDFVTYP IN ('PL', 'PLL', 'CPLL', 'PL@', 'PLL@', 'CPLL@', 'TL', 'TLL', 'CTLL', 'LIT'))

      THEN (CASE WHEN (R.X$RDFLANG IS NOT NULL) THEN 5

      WHEN (R.X$RDFLTYP IS NOT NULL) THEN 4

      ELSE 3 END)

      ELSE NULL END  ASC NULLS FIRST,

      CASE WHEN (R.X$RDFLTYP IN ('http://www.w3.org/2001/XMLSchema#decimal','http://www.w3.org/2001/XMLSchema#double','http://www.w3.org/2001/XMLSchema#integer','http://www.w3.org/2001/XMLSchema#float','http://www.w3.org/2001/XMLSchema#int','http://www.w3.org/2001/XMLSchema#nonPositiveInteger','http://www.w3.org/2001/XMLSchema#negativeInteger','http://www.w3.org/2001/XMLSchema#long','http://www.w3.org/2001/XMLSchema#short','http://www.w3.org/2001/XMLSchema#byte','http://www.w3.org/2001/XMLSchema#nonNegativeInteger','http://www.w3.org/2001/XMLSchema#unsignedLong','http://www.w3.org/2001/XMLSchema#unsignedInt','http://www.w3.org/2001/XMLSchema#unsignedShort','http://www.w3.org/2001/XMLSchema#unsignedByte','http://www.w3.org/2001/XMLSchema#positiveInteger'))

      THEN TO_NUMBER(R.X$_PREFIX)

      ELSE NULL END  ASC NULLS FIRST,

      CASE WHEN (R.X$RDFLTYP IN ('http://www.w3.org/2001/XMLSchema#date','http://www.w3.org/2001/XMLSchema#time','http://www.w3.org/2001/XMLSchema#dateTime'))

      THEN DECODE (R.X$RDFLTYP,

      'http://www.w3.org/2001/XMLSchema#dateTime',

      TO_TIMESTAMP_TZ(R.X$_PREFIX || (CASE WHEN ((SUBSTRB(R.X$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.X$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.X$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM'),

      'http://www.w3.org/2001/XMLSchema#date',

      TO_TIMESTAMP_TZ(R.X$_PREFIX || (CASE WHEN ((SUBSTRB(R.X$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.X$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.X$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DDTZH:TZM'),

      'http://www.w3.org/2001/XMLSchema#time',

      DECODE (SUBSTRB(R.X$_PREFIX,1,1),

      '+',TO_TIMESTAMP_TZ('2009-06-26T' || SUBSTRB(REPLACE(R.X$_PREFIX,'T'),2) || (CASE WHEN ((SUBSTRB(R.X$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.X$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.X$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM') + INTERVAL '1' DAY,

      '-',TO_TIMESTAMP_TZ('2009-06-26T' || SUBSTRB(REPLACE(R.X$_PREFIX,'T'),2) || (CASE WHEN ((SUBSTRB(R.X$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.X$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.X$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM') - INTERVAL '1' DAY,

      '@',TO_TIMESTAMP_TZ('2009-06-26T' || SUBSTRB(REPLACE(R.X$_PREFIX,'T'),2) || (CASE WHEN ((SUBSTRB(R.X$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.X$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.X$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM'),

      TO_TIMESTAMP_TZ('2009-06-26T' || REPLACE(R.X$_PREFIX,'T') || (CASE WHEN ((SUBSTRB(R.X$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.X$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.X$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')),

      NULL

      )

       

       

      ELSE NULL END  ASC NULLS FIRST,

      SEM_APIS.unescape_rdf_value(R.X$_PREFIX || R.X$_SUFFIX)  ASC NULLS FIRST,

      CASE WHEN (R.Y$RDFVTYP IS NULL) THEN 0

      WHEN (R.Y$RDFVTYP IN ('BLN','BN')) THEN 1

      WHEN (R.Y$RDFVTYP IN ('URI','UR')) THEN 2

      WHEN (R.Y$RDFVTYP IN ('PL', 'PLL', 'CPLL', 'PL@', 'PLL@', 'CPLL@', 'TL', 'TLL', 'CTLL', 'LIT'))

      THEN (CASE WHEN (R.Y$RDFLANG IS NOT NULL) THEN 5

      WHEN (R.Y$RDFLTYP IS NOT NULL) THEN 4

      ELSE 3 END)

      ELSE NULL END  ASC NULLS FIRST,

      CASE WHEN (R.Y$RDFLTYP IN ('http://www.w3.org/2001/XMLSchema#decimal','http://www.w3.org/2001/XMLSchema#double','http://www.w3.org/2001/XMLSchema#integer','http://www.w3.org/2001/XMLSchema#float','http://www.w3.org/2001/XMLSchema#int','http://www.w3.org/2001/XMLSchema#nonPositiveInteger','http://www.w3.org/2001/XMLSchema#negativeInteger','http://www.w3.org/2001/XMLSchema#long','http://www.w3.org/2001/XMLSchema#short','http://www.w3.org/2001/XMLSchema#byte','http://www.w3.org/2001/XMLSchema#nonNegativeInteger','http://www.w3.org/2001/XMLSchema#unsignedLong','http://www.w3.org/2001/XMLSchema#unsignedInt','http://www.w3.org/2001/XMLSchema#unsignedShort','http://www.w3.org/2001/XMLSchema#unsignedByte','http://www.w3.org/2001/XMLSchema#positiveInteger'))

      THEN TO_NUMBER(R.Y$_PREFIX)

      ELSE NULL END  ASC NULLS FIRST,

      CASE WHEN (R.Y$RDFLTYP IN ('http://www.w3.org/2001/XMLSchema#date','http://www.w3.org/2001/XMLSchema#time','http://www.w3.org/2001/XMLSchema#dateTime'))

      THEN DECODE (R.Y$RDFLTYP,

      'http://www.w3.org/2001/XMLSchema#dateTime',

      TO_TIMESTAMP_TZ(R.Y$_PREFIX || (CASE WHEN ((SUBSTRB(R.Y$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.Y$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.Y$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM'),

      'http://www.w3.org/2001/XMLSchema#date',

      TO_TIMESTAMP_TZ(R.Y$_PREFIX || (CASE WHEN ((SUBSTRB(R.Y$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.Y$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.Y$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DDTZH:TZM'),

      'http://www.w3.org/2001/XMLSchema#time',

      DECODE (SUBSTRB(R.Y$_PREFIX,1,1),

      '+',TO_TIMESTAMP_TZ('2009-06-26T' || SUBSTRB(REPLACE(R.Y$_PREFIX,'T'),2) || (CASE WHEN ((SUBSTRB(R.Y$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.Y$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.Y$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM') + INTERVAL '1' DAY,

      '-',TO_TIMESTAMP_TZ('2009-06-26T' || SUBSTRB(REPLACE(R.Y$_PREFIX,'T'),2) || (CASE WHEN ((SUBSTRB(R.Y$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.Y$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.Y$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM') - INTERVAL '1' DAY,

      '@',TO_TIMESTAMP_TZ('2009-06-26T' || SUBSTRB(REPLACE(R.Y$_PREFIX,'T'),2) || (CASE WHEN ((SUBSTRB(R.Y$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.Y$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.Y$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM'),

      TO_TIMESTAMP_TZ('2009-06-26T' || REPLACE(R.Y$_PREFIX,'T') || (CASE WHEN ((SUBSTRB(R.Y$_PREFIX,-1,1) != 'Z') AND

      ((SUBSTRB(R.Y$_PREFIX,-6,1) NOT IN ('-','+')) OR (SUBSTRB(R.Y$_PREFIX,-3,1) != ':')))

      THEN 'Z'

      ELSE NULL

      END)

      ,'SYYYY-MM-DD"T"HH24:MI:SS.FF9TZH:TZM')),

      NULL

      )

       

       

      ELSE NULL END  ASC NULLS FIRST,

      SEM_APIS.unescape_rdf_value(R.Y$_PREFIX || R.Y$_SUFFIX)  ASC NULLS FIRST

      ) R

      WHERE (1=1)) R

      WHERE (1=1) )

        ) inner

      ORDER BY SEM$ROWNUM  )

      14:49:16.639 [main] DEBUG oracle.spatial.rdf.client.jena.Oracle - executeQuery: prepare statement

      14:49:16.639 [main] DEBUG oracle.spatial.rdf.client.jena.Oracle - executeQuery: no statement holder,prepare statement

      14:49:16.640 [main] DEBUG oracle.spatial.rdf.client.jena.Oracle - executeQuery: execute prepared statement query

      14:49:16.646 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - buildSemIterator: elapsed time to get rs is : 8

      14:49:16.646 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSemIterator - OracleSemIterator: constructor

      14:49:16.648 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSemIterator - OracleSemIterator: numberOfColumns 4

      14:49:16.648 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSemIterator - setQueryFetchSize: size 1000

      14:49:16.648 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSemIterator - setGuide: size of list 2

      14:49:16.649 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - convertToVarArray: start set typejava.util.LinkedHashSet

      14:49:16.649 [main] DEBUG oracle.spatial.rdf.client.jena.OracleOpExecutor - convertToVarArray: done

      14:49:16.649 [main] DEBUG oracle.spatial.rdf.client.jena.OracleLeanQueryIter - OracleLeanQueryIter: m_methodCreateWithArg public static org.apache.jena.sparql.engine.binding.BindingMap org.apache.jena.sparql.engine.binding.BindingFactory.create(org.apache.jena.sparql.engine.binding.Binding)

      14:49:16.650 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSemIterator - nextWithTimeout: start

      14:49:16.651 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSemIterator - safeCloseAndDeregisterIfNeeded: start

      14:49:16.651 [main] DEBUG oracle.spatial.rdf.client.jena.FetchingTimeout - closeTimer: closing timer

      14:49:16.651 [main] DEBUG oracle.spatial.rdf.client.jena.FetchingTimeout - closeTimer: closing timer done

      14:49:16.651 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSemIterator - safeCloseAndDeregisterIfNeeded: no need to deregister. Just close rs and statement

      14:49:16.651 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSemIterator - quietlyCloseResultSetAndStmt: close result set

      14:49:16.651 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSemIterator - quietlyCloseResultSetAndStmt: done closing statement in final block

      14:49:16.651 [main] DEBUG oracle.spatial.rdf.client.jena.OracleBatchSemIterator - retrieveNodes: exhausted RS at i:3

      14:49:16.652 [main] DEBUG oracle.spatial.rdf.client.jena.OracleLeanQueryIter - moveToNextBinding: map to null for var ?x

      14:49:16.652 [main] DEBUG oracle.spatial.rdf.client.jena.OracleLeanQueryIter - moveToNextBinding: map to null for var ?y

      14:49:16.652 [main] DEBUG oracle.spatial.rdf.client.jena.OracleLeanQueryIter - moveToNextBinding: map to null for var ?x

      14:49:16.652 [main] DEBUG oracle.spatial.rdf.client.jena.OracleLeanQueryIter - moveToNextBinding: map to null for var ?y

      14:49:16.652 [main] DEBUG oracle.spatial.rdf.client.jena.OracleLeanQueryIter - moveToNextBinding: map to null for var ?x

      14:49:16.652 [main] DEBUG oracle.spatial.rdf.client.jena.OracleLeanQueryIter - moveToNextBinding: map to null for var ?y

      14:49:16.652 [main] DEBUG oracle.spatial.rdf.client.jena.OracleBatchSemIterator - hasNextInternal: rs is null

      14:49:16.652 [main] DEBUG oracle.spatial.rdf.client.jena.OracleSemIterator - hasNext: query marker = QueryMarker=size_15067 , lMatches 3

      14:49:16.652 [main] DEBUG oracle.spatial.rdf.client.jena.OracleBatchSemIterator - close: start