master/ldif/examples/life-science/linkSpecs/genes.xml

User picture

Commiter: Andrea Matteini

Author: Andrea Matteini

Revision: 67000aced3


File Size: 2.33 KB

(December 21, 2011 14:12 UTC) 5 months ago

Minor fixes (fix #76)

 
Show/hide line numbers
<?xml version="1.0" encoding="utf-8" ?>
<Silk>
  <Prefixes>
    <Prefix id="rdf" namespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />
    <Prefix id="rdfs" namespace="http://www.w3.org/2000/01/rdf-schema#" />
    <Prefix id="owl" namespace="http://www.w3.org/2002/07/owl#" />
    <Prefix id="genes" namespace="http://wiking.vulcan.com/neurobase/kegg_genes/resource/vocab/" />
    <Prefix id="smwprop" namespace="http://mywiki/resource/property/" />
    <Prefix id="smwcat" namespace="http://mywiki/resource/category/" />
    <Prefix id="wiki" namespace="http://www.example.com/smw#" />
  </Prefixes>

  <DataSources>
    <DataSource id="Wiki" type="sparqlEndpoint">
      <Param name="endpointURI" value="http://localhost:2020/sparql/read" />
    </DataSource>

    <DataSource id="ABA" type="sparqlEndpoint">
      <Param name="endpointURI" value="http://localhost:2020/sparql/read" />
      <Param name="graph" value="REPLACED_BY_ENGINE" />
    </DataSource>
  </DataSources>

  <Interlinks>
    <Interlink id="genes">
      <LinkType>owl:sameAs</LinkType>

      <!-- a dummy dataset, the real dataset is defined at runtime -->
      <SourceDataset dataSource="ABA" var="b">
        <RestrictTo>?b rdf:type smwcat:Gene</RestrictTo>
      </SourceDataset>

      <TargetDataset dataSource="Wiki" var="a">
        <RestrictTo>?a rdf:type smwcat:Gene</RestrictTo>
      </TargetDataset>

      <LinkageRule>
        <Aggregate type="max">
          <Compare metric="equality">
            <Input path="?a/smwprop:EntrezGeneId" />
            <Input path="?b/smwprop:EntrezGeneId" />
          </Compare>
          <Compare metric="equality">
            <Input path="?a/smwprop:MgiMarkerAccessionId" />
            <Input path="?b/smwprop:MgiMarkerAccessionId" />
          </Compare>
          <Compare metric="equality">
            <Input path="?a/smwprop:UniprotId" />
            <Input path="?b/smwprop:UniprotId" />
          </Compare>
          <Compare metric="equality">
            <Input path="?a/smwprop:EnsemblId" />
            <Input path="?b/smwprop:EnsemblId" />
          </Compare>
          <Compare metric="equality">
            <Input path="?a/smwprop:PharmGKBId" />
            <Input path="?b/smwprop:PharmGKBId" />
          </Compare>
        </Aggregate>
      </LinkageRule>

      <Filter threshold="1.0" />

    </Interlink>

  </Interlinks>
</Silk>