@prefix display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> .
<https://litvinovg.pro/text_structures#compilation> display:hasDeleteQuery """
        PREFIX ts:  <https://litvinovg.pro/text_structures#>
        DESCRIBE ?individualURI ?tocElement ?tocItem ?toc
        WHERE {
          OPTIONAL { 
            ?individualURI ts:hasTOC ?toc .
            ?toc (ts:hasTOCItem/ts:pointsTo)* ?tocElement .
            OPTIONAL {
              ?tocElement ts:hasTOCItem ?tocItem .
            }
          }
        }
        """ .
<https://litvinovg.pro/text_structures#elenphArticle> display:hasDeleteQuery """
        PREFIX ts:  <https://litvinovg.pro/text_structures#>
        DESCRIBE ?individualURI ?tocElement ?tocItem ?toc ?excerpt ?author ?organization
        WHERE {
          OPTIONAL {
            ?individualURI ts:hasTOC ?toc .
            ?toc (ts:hasTOCItem/ts:pointsTo)* ?tocElement .
            OPTIONAL {
              ?tocElement ts:hasTOCItem ?tocItem .
            }
            OPTIONAL { 
              ?tocElement ts:hasText ?excerpt .
              OPTIONAL {
                ?excerpt ts:hasAuthor ?author .
                OPTIONAL {
                  ?author ts:affiliatedWith ?organization .
                } 
              }
            }
          }
        }
        """ .

<https://litvinovg.pro/text_structures#elenphExcerpt> display:hasDeleteQuery """
        PREFIX ts:  <https://litvinovg.pro/text_structures#>
        DESCRIBE ?individualURI ?tocElement 
        WHERE
        {
          ?tocElement ts:hasText ?individualURI .
          FILTER NOT EXISTS {?tocElement ts:hasTOCItem ?tocItem }
        }
        """ .
