science-periodicals / ontology

:mortar_board: sci.pe (science periodicals) extension of schema:ScholarlyArticle to describe the production process, content, distribution and preservation of scholarly articles (and similar artifacts).
http://ns.sci.pe
Apache License 2.0
4 stars 0 forks source link

cleanup selector terms #28

Closed sballesteros closed 6 years ago

sballesteros commented 6 years ago
const role = {
  '@type': 'TargetRole',
  hasSelector: {
    '@type': ['Selector', 'NodeSelector', 'HtmlSelector'],

    // NodeSelector
    node: 'nodeId',
    selectedProperty: 'property',
    nodeChecksum: { // the checksum of the full node (not only the selection)
      '@type': 'Checksum',
      checksumAlgorithm: 'algorithm',
      checksumValue: 'value'
    }

    // HtmlSelector
    cssSelector: '.class',
    xpath: 'xpath',
    htmlId: 'id',
    webVerseId: 'NOPXRS',
    startOffset: 0,
    endOffset: 10,
    documentChecksum: { // the checksum of the full HTML document (not only the selection)
      '@type': 'Checksum',
      checksumAlgorithm: 'algorithm',
      checksumValue: 'value'
    }

    // Common to NodeSelector and HtmlSelector (selection)
    selectedValue: 'value', // Note: the is used for NodeSelector when the selectedProperty is a list (will typically be set to the @id of the selected value) 
    selectedValueChecksum: { // the checksum of the selection
      '@type': 'Checksum',
      checksumAlgorithm: 'algorithm',
      checksumValue: 'value'
    }
  }
};