@prefix this: <http://purl.org/np/RA57qEHE3UdraW-wcoI4rsidhB0Fbw4rl31LrsKC9AWIU> .
@prefix sub: <http://purl.org/np/RA57qEHE3UdraW-wcoI4rsidhB0Fbw4rl31LrsKC9AWIU#> .
@prefix np: <http://www.nanopub.org/nschema#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix nt: <https://w3id.org/np/o/ntemplate/> .
@prefix npx: <http://purl.org/nanopub/x/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix orcid: <https://orcid.org/> .
@prefix prov: <http://www.w3.org/ns/prov#> .

<http://purl.org/np/RA57qEHE3UdraW-wcoI4rsidhB0Fbw4rl31LrsKC9AWIU> a np:Nanopublication;
  np:hasAssertion sub:assertion;
  np:hasProvenance sub:provenance;
  np:hasPublicationInfo sub:pubinfo;
  dct:created "2023-04-25T13:57:57.316Z"^^xsd:dateTime;
  dct:creator orcid:0000-0002-1267-0234;
  npx:supersedes <http://purl.org/np/RA0dc_S7qxLQ3vt1gDRuQRPbM7MltsfKFWfHUduzswapE>;
  nt:wasCreatedFromProvenanceTemplate <http://purl.org/np/RANwQa4ICWS5SOjw7gp99nBpXBasapwtZF1fIM3H2gYTM>;
  nt:wasCreatedFromPubinfoTemplate <http://purl.org/np/RAA2MfqdBCzmz9yVWjKLXNbyfBNcwsMmOqcNUxkk1maIM>,
    <http://purl.org/np/RAjpBMlw3owYhJUBo3DtsuDlXsNAJ8cnGeWAutDVjuAuI>;
  nt:wasCreatedFromTemplate <http://purl.org/np/RAkONP_jLqAbok3FgtutnKcLs4IHr9KiAuslQNnfEJIwY> .

<http://example.org/lifecyclestage> rdfs:label "refers to the life cycle stage (of organisms of the given taxon)" .

<http://purl.obolibrary.org/obo/RO_0002303> rdfs:label "has habitat" .

sub:assertion a nt:AssertionTemplate;
  dct:description """<p><strong>This just a preliminary template for testing...</strong></p>

<p>It uses Biolink for the overall structure.</p>

<p>The subject is a taxon as extracted from Checklistbank.</p>

<p>The life cyle stage is from Uberon.</p>

<p>The predicate is from the Relation Ontology.</p>

<p>The object is a habitat according to the ENVO ontology.</p>""";
  rdfs:label "Linking a taxon to a habitat (Biolink/nidx/Uberon/RO/Checklistbank version)";
  nt:hasStatement sub:st0, sub:st1, sub:st2, sub:st3, sub:st4;
  nt:hasTag "Biodiversity";
  prov:wasAttributedTo orcid:0000-0002-1267-0234 .

sub:association a nt:IntroducedResource, nt:LocalResource;
  rdfs:label "this association" .

sub:habitat a nt:GuidedChoicePlaceholder;
  rdfs:label "habitat/environment related to taxon";
  nt:possibleValuesFromApi "https://www.ebi.ac.uk/ols/api/select?ontology=envo&fieldList=iri,label,description&q=" .

sub:lifecyclestage a nt:GuidedChoicePlaceholder;
  rdfs:label "identifier of the life cycle stage";
  nt:possibleValuesFromApi "https://www.ebi.ac.uk/ols/api/select?ontology=uberon&fieldList=iri,label,description&childrenOf=http://purl.obolibrary.org/obo/UBERON_0000105&q=" .

sub:relation a nt:GuidedChoicePlaceholder;
  rdfs:label "identifier of relation";
  nt:possibleValue <http://purl.obolibrary.org/obo/RO_0002303>;
  nt:possibleValuesFromApi "https://www.ebi.ac.uk/ols/api/select?ontology=ro&fieldList=iri,label,description&q=" .

sub:st0 rdf:object <https://w3id.org/biolink/vocab/OrganismTaxonToEnvironmentAssociation>;
  rdf:predicate rdf:type;
  rdf:subject sub:association .

sub:st1 rdf:object sub:taxon;
  rdf:predicate <https://w3id.org/biolink/vocab/subject>;
  rdf:subject sub:association .

sub:st2 a nt:OptionalStatement;
  rdf:object sub:lifecyclestage;
  rdf:predicate <http://example.org/lifecyclestage>;
  rdf:subject sub:association .

sub:st3 rdf:object sub:relation;
  rdf:predicate <https://w3id.org/biolink/vocab/predicate>;
  rdf:subject sub:association .

sub:st4 rdf:object sub:habitat;
  rdf:predicate <https://w3id.org/biolink/vocab/object>;
  rdf:subject sub:association .

sub:taxon a nt:GuidedChoicePlaceholder;
  rdfs:label "identifier of taxon";
  nt:possibleValuesFromApi "https://vodex.petapico.org/nidx/query?rows=100&q=label:" .

rdf:type rdfs:label "is a" .

<https://w3id.org/biolink/vocab/OrganismTaxonToEnvironmentAssociation> rdfs:label
    "association of an organism taxon to an environment" .

<https://w3id.org/biolink/vocab/object> rdfs:label "refers to the environment" .

<https://w3id.org/biolink/vocab/predicate> rdfs:label "refers to the relation (between taxon and environment)" .

<https://w3id.org/biolink/vocab/subject> rdfs:label "refers to the organism taxon" .

sub:sig npx:hasAlgorithm "RSA";
  npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCjDGQCS1S+SRnERDuYDXOugdYUP0efEquHJEEHAbU/uLzBVlga89zqrNPCS7fBE6lArBUWEmT8eLKdMapyqvAzI1J3jUWTMhDJF+XFBkUiuiFfNSc4vJJcmi0yujtnuzXsRIG202jyaP4f5ULoskFwaZOSBZJfiE0dsB3D7DTIAQIDAQAB";
  npx:hasSignature "Rws17d/tmXt4X8ETESlHPeQb3ynaE9B+fvcr8qQrPmydPJu0giPopm9V0QEap4dkCZMJXMy03sE7MN5I92/dfA+4T+VUraTNNtwyxeVHEvqHDwri/2gIvsVxRt3kv0h9rqX2mePjAoodk2BvdvNgynEIn0p+OgZEzeReTYfMVx4=";
  npx:hasSignatureTarget <http://purl.org/np/RA57qEHE3UdraW-wcoI4rsidhB0Fbw4rl31LrsKC9AWIU> .

