wiki:DespoinaLog/2010/10/28

Version 4 (modified by antonak, 14 years ago) (diff)

--

  • molgenis3_3 is not connected to svn (probably after helios installation) . molgenis4pheno is working.
  • New molgenis project in molgenis4phenotypeWorkspaceHeliosCocoa32 with name molgenis ...and it's working with molgenis4pheno

External Ontology

(see relative message including Pedro Lopes, Richard Cyganiak)

  • How to connect multiple semantic systems, some using D2R and some purely semantic :
    • learn basics of D2RQ mapping language, modify the mapping file that you probably created using generate-
      mapping. This is probably the file that lives in molgenis_distro (generated by d2rq) : WebContent/WEB-INF/molgenis-rdf-mapping.n3
  • For instance how to define mappings that explicitly say that a table column corresponds to an element of the FOAF ontology ?
    • In the mapping file there is a class map corresponding to each table . Find the right class map . below the class map ,there is a property bridge for each column . 
@prefix map: <file:///stdout#> .
@prefix db: <> .
@prefix vocab: <http://localhost:8080/molgenis_distro/vocab/resource/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@prefix jdbc: <http://d2rq.org/terms/jdbc/> .
@prefix d2r: <http://sites.wiwiss.fu-berlin.de/suhl/bizer/d2r-server/config.rdf#> .

<> a d2r:Server;
    rdfs:label "D2R Server";
    d2r:baseURI <http://localhost:8080/pheno/>;
    d2r:port 8080;
    d2r:documentMetadata [
        rdfs:comment "This comment is custom document metadata.";
    ];
	d2r:vocabularyIncludeInstances true;    
    .

# Should be jndi loaded!
map:database a d2rq:Database;
	d2rq:jdbcDriver "com.mysql.jdbc.Driver";
	d2rq:jdbcDSN "jdbc:mysql://localhost/bbmri";
	d2rq:username "molgenis";
	d2rq:password "molgenis";
	jdbc:autoReconnect "true";
	jdbc:zeroDateTimeBehavior "convertToNull";
	.
# Entity Investigation
map:Investigation a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Investigation/@@Investigation.id@@";
	d2rq:class vocab:Investigation;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " Investigation defines self-contained units of study. For example: Framingham study. Optionally a description and an accession to a data source can be provided. Each Investigation has a unique name and a group of subjects of observation (ObservableTarget), traits of observation (ObservableFeature), results (in ObservedValues), and optionally actions (Protocols, ProtoclApplications). Maps to XGAP/FuGE Investigation, MAGE-TAB Experiment and METABASE:Study. ";
	.	
# todo: use the xref labels if they are complete
# label for Investigation using primary key
map:Investigation__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Investigation;
	d2rq:property rdfs:label;
	d2rq:pattern "Investigation #@@Investigation.id@@";
	.
map:Investigation_description a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Investigation;
	d2rq:property vocab:Investigation_description;
	d2rq:propertyDefinitionLabel "description";
	d2rq:propertyDefinitionComment "(Optional) Rudimentary meta data about the Investigation";
	d2rq:column "Investigation.description";
	d2rq:datatype xsd:text;
	.
map:Investigation_accession a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Investigation;
	d2rq:property vocab:Investigation_accession;
	d2rq:propertyDefinitionLabel "accession";
	d2rq:propertyDefinitionComment "(Optional) URI or accession number to indicate source of Investigation. E.g. arrayexpress:M-EXP-2345";
	d2rq:column "Investigation.accession";
	d2rq:datatype xsd:url;
	.
map:Investigation_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Investigation;
	d2rq:property vocab:Investigation_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "Investigation.id";
	d2rq:datatype xsd:int;
	.
# Entity Ontology
map:Ontology a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Ontology/@@Ontology.id@@";
	d2rq:class vocab:Ontology;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " Ontology defines a reference to a an ontology or controlled vocabulary from which well-defined and stable (ontology) terms can be obtained. Each Ontology should have a unique name, for instance: Gene Ontology, Mammalian Phenotype, Human Phenotype Ontology, Unified Medical Language System, Medical Subject Headings, etc. Also a abbreviation is required, for instance: GO, MP, HPO, UMLS, MeSH, etc. Use of existing ontologies/vocabularies is recommended to harmonize phenotypic feature and value descriptions. But one can also create a 'local' Ontology. The Ontology class maps to FuGE::Ontology, MAGE-TAB::TermSourceREF. ";
	.	
# todo: use the xref labels if they are complete
# label for Ontology using primary key
map:Ontology__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Ontology;
	d2rq:property rdfs:label;
	d2rq:pattern "Ontology #@@Ontology.id@@";
	.
map:Ontology_ontologyAccession a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Ontology;
	d2rq:property vocab:Ontology_ontologyAccession;
	d2rq:propertyDefinitionLabel "ontologyAccession";
	d2rq:propertyDefinitionComment "A identifier that uniquely identifies the ontology (typically an acronym). E.g. GO, MeSH, HPO.";
	d2rq:column "Ontology.ontologyAccession";
	d2rq:datatype xsd:string;
	.
map:Ontology_ontologyURI a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Ontology;
	d2rq:property vocab:Ontology_ontologyURI;
	d2rq:propertyDefinitionLabel "ontologyURI";
	d2rq:propertyDefinitionComment "(Optional) A URI that references the location of the ontology.";
	d2rq:column "Ontology.ontologyURI";
	d2rq:datatype xsd:url;
	.
map:Ontology_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Ontology;
	d2rq:property vocab:Ontology_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "Ontology.id";
	d2rq:datatype xsd:int;
	.
# Entity OntologyTerm
map:OntologyTerm a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "OntologyTerm/@@OntologyTerm.id@@";
	d2rq:class vocab:OntologyTerm;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " OntologyTerm defines a single entry (term) from an ontology or a controlled vocabulary (defined by Ontology). The name is the ontology term which is unique within an ontology source, such as [examples here]. Other data entities can reference to this OntologyTerm to harmonize naming of concepts. Each term should have a local, unique label within the Investigation. If no suitable ontology term exists then one can define new terms locally (in which case there is no formal accession for the term limiting its use for cross-Investigation queries). In those cases the local name should be repeated in both term and termAccession. Maps to FuGE::OntologyIndividual; in MAGE-TAB there is no separate entity to model terms. &lt;br/&gt; Optionally a local controlled vocabulary or ontology can be defined, for example to represent 'Codelists' often used in questionaires. Note: this is not a InvestigationElement because of the additional xref_label and unique constraint. ";
	.	
# todo: use the xref labels if they are complete
# label for OntologyTerm using primary key
map:OntologyTerm__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:OntologyTerm;
	d2rq:property rdfs:label;
	d2rq:pattern "OntologyTerm #@@OntologyTerm.id@@";
	.
map:OntologyTerm_term a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:OntologyTerm;
	d2rq:property vocab:OntologyTerm_term;
	d2rq:propertyDefinitionLabel "term";
	d2rq:propertyDefinitionComment "The ontology term. E.g. 'day'";
	d2rq:column "OntologyTerm.term";
	d2rq:datatype xsd:string;
	.
map:OntologyTerm_ontology a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:OntologyTerm;
	d2rq:property vocab:OntologyTerm_ontology;
	d2rq:propertyDefinitionLabel "ontology";
	d2rq:propertyDefinitionComment "(Optional) The source ontology or controlled vocabulary list that ontology terms have been obtained from.";
	d2rq:refersToClassMap map:Ontology;
	d2rq:join "OntologyTerm.ontology => Ontology.id";
	.
map:OntologyTerm_termAccession a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:OntologyTerm;
	d2rq:property vocab:OntologyTerm_termAccession;
	d2rq:propertyDefinitionLabel "termAccession";
	d2rq:propertyDefinitionComment "(Optional) The accession number assigned to the ontology term in its source ontology. If empty it is assumed to be a locally defined term.";
	d2rq:column "OntologyTerm.termAccession";
	d2rq:datatype xsd:string;
	.
map:OntologyTerm_definition a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:OntologyTerm;
	d2rq:property vocab:OntologyTerm_definition;
	d2rq:propertyDefinitionLabel "definition";
	d2rq:propertyDefinitionComment "(Optional) The definition of the term.";
	d2rq:column "OntologyTerm.definition";
	d2rq:datatype xsd:string;
	.
map:OntologyTerm_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:OntologyTerm;
	d2rq:property vocab:OntologyTerm_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "OntologyTerm.id";
	d2rq:datatype xsd:int;
	.
# Entity ObservableFeature
map:ObservableFeature a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "ObservableFeature/@@ObservableFeature.id@@";
	d2rq:class vocab:ObservableFeature;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " ObservableFeature defines anything that can be observed in a phenotypic Investigation. For instance: Height, Systolic blood pressure, Diastolic blood pressure, and Treatment for hypertension are observable features. The name of ObservableFeature is unique within one Investigation. It is recommended that each ObservableFeature is named according to a well-defined ontology term which can be specified via ontologyReference. The ObservableFeature class maps to XGAP:Trait, METABASE:Question, FuGE:DimensionElement, and PaGE:ObservableFeature. Multi-value features can be grouped by Protocol. For instance: high blood pressure can be inferred from observations for features systolic and diastolic blood pressure. There may be many alternative protocols to measure a feature. See Protocol section. ";
	.	
# todo: use the xref labels if they are complete
# label for ObservableFeature using primary key
map:ObservableFeature__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservableFeature;
	d2rq:property rdfs:label;
	d2rq:pattern "ObservableFeature #@@ObservableFeature.id@@";
	.
map:ObservableFeature_description a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservableFeature;
	d2rq:property vocab:ObservableFeature_description;
	d2rq:propertyDefinitionLabel "description";
	d2rq:propertyDefinitionComment "(Optional) Rudimentary meta data about the observeable feature. Use of ontology terms references to establish unambigious descriptions is recommended";
	d2rq:column "ObservableFeature.description";
	d2rq:datatype xsd:text;
	.
map:ObservableFeature_ontologyReference a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservableFeature;
	d2rq:property vocab:ObservableFeature_ontologyReference;
	d2rq:propertyDefinitionLabel "ontologyReference";
	d2rq:propertyDefinitionComment "(Optional) Reference to the formal ontology definition for this feature. E.g. [TODO: add examples]";
	d2rq:refersToClassMap map:OntologyTerm;
	d2rq:join "ObservableFeature.ontologyReference => OntologyTerm.id";
	.
map:ObservableFeature_unit a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservableFeature;
	d2rq:property vocab:ObservableFeature_unit;
	d2rq:propertyDefinitionLabel "unit";
	d2rq:propertyDefinitionComment "(Optional) Reference to the well-defined measurement unit used to observe this features (if feature is that concrete). E.g. mmHg";
	d2rq:refersToClassMap map:OntologyTerm;
	d2rq:join "ObservableFeature.unit => OntologyTerm.id";
	.
map:ObservableFeature_dataType a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservableFeature;
	d2rq:property vocab:ObservableFeature_dataType;
	d2rq:propertyDefinitionLabel "dataType";
	d2rq:propertyDefinitionComment "dataType";
	d2rq:column "ObservableFeature.dataType";
	d2rq:datatype xsd:string;
	.
map:ObservableFeature_focal a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservableFeature;
	d2rq:property vocab:ObservableFeature_focal;
	d2rq:propertyDefinitionLabel "Focal";
	d2rq:propertyDefinitionComment "[DISCUSSION] Whether this feature is time dependent and is measured more than once(e.g. weight) or generally only measured once (e.g. birth date)";
	d2rq:column "ObservableFeature.focal";
	d2rq:datatype xsd:boolean;
	.
map:ObservableFeature_observationtargettype a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservableFeature;
	d2rq:property vocab:ObservableFeature_observationtargettype;
	d2rq:propertyDefinitionLabel "ObservationTarget type";
	d2rq:propertyDefinitionComment "name of class referred to";
	d2rq:column "ObservableFeature.observationtargettype";
	d2rq:datatype xsd:string;
	.
map:ObservableFeature_observationtargetlabel a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservableFeature;
	d2rq:property vocab:ObservableFeature_observationtargetlabel;
	d2rq:propertyDefinitionLabel "ObservationTarget label";
	d2rq:propertyDefinitionComment "[DISCUSSION] label applied to target, for filtering purposes";
	d2rq:column "ObservableFeature.observationtargetlabel";
	d2rq:datatype xsd:string;
	.
map:ObservableFeature_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservableFeature;
	d2rq:property vocab:ObservableFeature_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "ObservableFeature.id";
	d2rq:datatype xsd:int;
	.
# Entity Code
map:Code a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Code/@@Code.id@@";
	d2rq:class vocab:Code;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment "Special kind of OntologyTerm to define codes such as are often used in Questionaires. A list of codes can be attached to an ObservableFeature using reference 'feature'. For example the ObservableFeature 'sex' has {code = 1, name=male} and {code = 2, name=female}. Codes can be linked to well-defined ontology terms via the ontologyReference. Code extends OntologyTerm such that it can be referenced by ObservedValue.value. The Code class maps to METABASE::Code ";
	.	
# todo: use the xref labels if they are complete
# label for Code using primary key
map:Code__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Code;
	d2rq:property rdfs:label;
	d2rq:pattern "Code #@@Code.id@@";
	.
map:Code_feature a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Code;
	d2rq:property vocab:Code_feature;
	d2rq:propertyDefinitionLabel "feature";
	d2rq:propertyDefinitionComment "The feature for which these codes where defined.";
	d2rq:refersToClassMap map:ObservableFeature;
	d2rq:join "Code.id <= Code_feature.Code";
	d2rq:join "Code_feature.feature => ObservableFeature.id";
	.
map:Code_code a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Code;
	d2rq:property vocab:Code_code;
	d2rq:propertyDefinitionLabel "code";
	d2rq:propertyDefinitionComment "The code used to represent this term. For example: { '1'-'male', '2'-'female'}";
	d2rq:column "Code.code";
	d2rq:datatype xsd:string;
	.
map:Code_description a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Code;
	d2rq:property vocab:Code_description;
	d2rq:propertyDefinitionLabel "description";
	d2rq:propertyDefinitionComment "Description of the code.     Use of ontology terms references to establish unambigious descriptions is     recommended";
	d2rq:column "Code.description";
	d2rq:datatype xsd:text;
	.
map:Code_ontologyReference a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Code;
	d2rq:property vocab:Code_ontologyReference;
	d2rq:propertyDefinitionLabel "ontologyReference";
	d2rq:propertyDefinitionComment "(Optional) Reference to the    formal ontology definition for this code.";
	d2rq:refersToClassMap map:OntologyTerm;
	d2rq:join "Code.ontologyReference => OntologyTerm.id";
	.
map:Code_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Code;
	d2rq:property vocab:Code_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "Code.id";
	d2rq:datatype xsd:int;
	.
# Entity ObservationTarget
map:ObservationTarget a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "ObservationTarget/@@ObservationTarget.id@@";
	d2rq:class vocab:ObservationTarget;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " An ObservationTarget class defines the subjects of observation. For instance: individual 1 from Investigation x. The ObservationTarget class maps to XGAP:Subject, METABASE:Patient and maps to Page:Abstract_Observation_Target. The name of observationTargets is unique. ";
	.	
# todo: use the xref labels if they are complete
# label for ObservationTarget using primary key
map:ObservationTarget__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservationTarget;
	d2rq:property rdfs:label;
	d2rq:pattern "ObservationTarget #@@ObservationTarget.id@@";
	.
map:ObservationTarget___Type a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservationTarget;
	d2rq:property vocab:ObservationTarget___Type;
	d2rq:propertyDefinitionLabel "__Type";
	d2rq:propertyDefinitionComment "Subtypes have to be set to allow searching";
	d2rq:column "ObservationTarget.__Type";
	d2rq:datatype xsd:string;
	.
map:ObservationTarget_observationTargetType a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservationTarget;
	d2rq:property vocab:ObservationTarget_observationTargetType;
	d2rq:propertyDefinitionLabel "observationTargetType";
	d2rq:propertyDefinitionComment "[Discussion] (Optional) to distinguish between e.g. Animals, Locations and Actors";
	d2rq:column "ObservationTarget.observationTargetType";
	d2rq:datatype xsd:string;
	.
map:ObservationTarget_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservationTarget;
	d2rq:property vocab:ObservationTarget_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "ObservationTarget.id";
	d2rq:datatype xsd:int;
	.
# Entity Individual
map:Individual a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Individual/@@Individual.id@@";
	d2rq:class vocab:Individual;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " The Individuals class defines human cases that are used as observation target. The Individual class maps to XGAP:Individual and PaGE:Individual. Note that minimal information like 'sex' can be defined as ObservedValue, and that that basic relationships like 'father' and 'mother'can be defined via ObservedRelationship. Groups of individuals can be defined via Panel. ";
	.	
# todo: use the xref labels if they are complete
# label for Individual using primary key
map:Individual__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Individual;
	d2rq:property rdfs:label;
	d2rq:pattern "Individual #@@Individual.id@@";
	.
map:Individual_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Individual;
	d2rq:property vocab:Individual_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "Individual.id";
	d2rq:datatype xsd:int;
	.
# Entity Panel
map:Panel a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Panel/@@Panel.id@@";
	d2rq:class vocab:Panel;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " The Panel class defines groups of individuals based on cohort design, case/controls, families, etc. For instance: LifeLines cohort, 'middle aged man', 'recombinant mouse inbred Line dba x b6' or 'Smith family'.A Panel can act as a single ObservationTarget. For example: average height (ObservedValue) in the LifeLines cohort (Panel) is 174cm. The Panel class maps to XGAP:Strain and PaGE:Panel classes. In METABASE this is assumed there is one panel per study. ";
	.	
# todo: use the xref labels if they are complete
# label for Panel using primary key
map:Panel__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Panel;
	d2rq:property rdfs:label;
	d2rq:pattern "Panel #@@Panel.id@@";
	.
map:Panel_individuals a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Panel;
	d2rq:property vocab:Panel_individuals;
	d2rq:propertyDefinitionLabel "individuals";
	d2rq:propertyDefinitionComment "The list of individuals in this panel";
	d2rq:refersToClassMap map:Individual;
	d2rq:join "Panel.id <= Panel_individuals.Panel";
	d2rq:join "Panel_individuals.individuals => Individual.id";
	.
map:Panel_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Panel;
	d2rq:property vocab:Panel_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "Panel.id";
	d2rq:datatype xsd:int;
	.
# Entity Sample
map:Sample a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Sample/@@Sample.id@@";
	d2rq:class vocab:Sample;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " This extended investigation provides extra fields for saving information of the customer, such as their address, telephone number, etc ";
	.	
# todo: use the xref labels if they are complete
# label for Sample using primary key
map:Sample__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sample;
	d2rq:property rdfs:label;
	d2rq:pattern "Sample #@@Sample.id@@";
	.
map:Sample_sampletype a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sample;
	d2rq:property vocab:Sample_sampletype;
	d2rq:propertyDefinitionLabel "sampletype";
	d2rq:propertyDefinitionComment "Type of sample (dna/rna)";
	d2rq:column "Sample.sampletype";
	d2rq:datatype xsd:string;
	.
map:Sample_origin a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sample;
	d2rq:property vocab:Sample_origin;
	d2rq:propertyDefinitionLabel "origin";
	d2rq:propertyDefinitionComment "Origin of the sample (i.e. duck, pig, human)";
	d2rq:column "Sample.origin";
	d2rq:datatype xsd:string;
	.
map:Sample_fragmentlength a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sample;
	d2rq:property vocab:Sample_fragmentlength;
	d2rq:propertyDefinitionLabel "fragmentlength";
	d2rq:propertyDefinitionComment "Length of the sample fragment";
	d2rq:column "Sample.fragmentlength";
	d2rq:datatype xsd:int;
	.
map:Sample_readlength a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sample;
	d2rq:property vocab:Sample_readlength;
	d2rq:propertyDefinitionLabel "readlength";
	d2rq:propertyDefinitionComment "Length of the read to be executed";
	d2rq:column "Sample.readlength";
	d2rq:datatype xsd:int;
	.
map:Sample_samplecode a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sample;
	d2rq:property vocab:Sample_samplecode;
	d2rq:propertyDefinitionLabel "samplecode";
	d2rq:propertyDefinitionComment "Name of the sample (i.e. ToS-185-I65)";
	d2rq:column "Sample.samplecode";
	d2rq:datatype xsd:string;
	.
map:Sample_description a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sample;
	d2rq:property vocab:Sample_description;
	d2rq:propertyDefinitionLabel "description";
	d2rq:propertyDefinitionComment "Description/Notes about the sample";
	d2rq:column "Sample.description";
	d2rq:datatype xsd:text;
	.
map:Sample_status a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sample;
	d2rq:property vocab:Sample_status;
	d2rq:propertyDefinitionLabel "status";
	d2rq:propertyDefinitionComment "Current status of the sample";
	d2rq:column "Sample.status";
	d2rq:datatype xsd:string;
	.
map:Sample_project a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sample;
	d2rq:property vocab:Sample_project;
	d2rq:propertyDefinitionLabel "project";
	d2rq:propertyDefinitionComment "Project that the sample belongs to";
	d2rq:refersToClassMap map:Project;
	d2rq:join "Sample.project => Project.id";
	.
map:Sample_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sample;
	d2rq:property vocab:Sample_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "Sample.id";
	d2rq:datatype xsd:int;
	.
# Entity Project
map:Project a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Project/@@Project.id@@";
	d2rq:class vocab:Project;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " This extended investigation provides extra fields for saving information of the customer, such as their address, telephone number, etc ";
	.	
# todo: use the xref labels if they are complete
# label for Project using primary key
map:Project__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Project;
	d2rq:property rdfs:label;
	d2rq:pattern "Project #@@Project.id@@";
	.
map:Project_contractcode a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Project;
	d2rq:property vocab:Project_contractcode;
	d2rq:propertyDefinitionLabel "contractcode";
	d2rq:propertyDefinitionComment "Contract code/Declaratie Nr (i.e. ToS-185-I65)";
	d2rq:column "Project.contractcode";
	d2rq:datatype xsd:string;
	.
map:Project_startdate a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Project;
	d2rq:property vocab:Project_startdate;
	d2rq:propertyDefinitionLabel "startdate";
	d2rq:propertyDefinitionComment "Start date of the project (i.e. 2010-20-10 10:34:56)";
	d2rq:column "Project.startdate";
	d2rq:datatype xsd:string;
	.
map:Project_enddate a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Project;
	d2rq:property vocab:Project_enddate;
	d2rq:propertyDefinitionLabel "enddate";
	d2rq:propertyDefinitionComment "Start date of the project (i.e. 2010-30-10 14:42:11)";
	d2rq:column "Project.enddate";
	d2rq:datatype xsd:string;
	.
map:Project_labworker_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Project;
	d2rq:property vocab:Project_labworker_id;
	d2rq:propertyDefinitionLabel "labworker_id";
	d2rq:propertyDefinitionComment "Lab technician in charge of project";
	d2rq:refersToClassMap map:Contact;
	d2rq:join "Project.labworker_id => Contact.id";
	.
map:Project_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Project;
	d2rq:property vocab:Project_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "Project.id";
	d2rq:datatype xsd:int;
	.
map:Project_name a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Project;
	d2rq:property vocab:Project_name;
	d2rq:propertyDefinitionLabel "name";
	d2rq:propertyDefinitionComment "A human-readable and potentially ambiguous common identifier";
	d2rq:column "Project.name";
	d2rq:datatype xsd:string;
	.
# Entity ObservedValue
map:ObservedValue a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "ObservedValue/@@ObservedValue.id@@";
	d2rq:class vocab:ObservedValue;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " DISCUSSION: why does the value need a name???? The ObservableValue class defines one observed value, for a particular observationTarget and a particular observableFeature. For instance: 160 mmHg, 90mmHg, &quot;no treatment&quot;. Optionally, the observation date can be added as well as reference to a protocolApplication and/or an ontologyReference that defines the value. A reference to protocolApplication can be used to describe how the value was actually observed. Note: an Investigation can observe individuals (targets) that were collected as part of another Investigation. The ObservedValue class has no FuGE equivalent because in FuGE the data - protocolapplication association is reversed, i.e. the ProtocolApplication has input/output Data (which could be ObservedValues). Maps to XGAP:DataElement that uses the FuGE approach, so oberved values are grouped into 'Data'; Maps to METABASE:Response, and PaGE:observed value. &lt;br/&gt; Discussion: how to model range values? Are those two separate values? Or should we create a syntax for those like 1:10? Note this is not an InvestigationElement because it doesn't have a name. ";
	.	
# todo: use the xref labels if they are complete
# label for ObservedValue using primary key
map:ObservedValue__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservedValue;
	d2rq:property rdfs:label;
	d2rq:pattern "ObservedValue #@@ObservedValue.id@@";
	.
map:ObservedValue___Type a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservedValue;
	d2rq:property vocab:ObservedValue___Type;
	d2rq:propertyDefinitionLabel "__Type";
	d2rq:propertyDefinitionComment "Subtypes have to be set to allow searching";
	d2rq:column "ObservedValue.__Type";
	d2rq:datatype xsd:string;
	.
map:ObservedValue_investigation a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservedValue;
	d2rq:property vocab:ObservedValue_Investigation;
	d2rq:propertyDefinitionLabel "Investigation";
	d2rq:propertyDefinitionComment "(Optional) Reference to the Investigation this observedValue belongs to.";
	d2rq:refersToClassMap map:Investigation;
	d2rq:join "ObservedValue.Investigation => Investigation.id";
	.
map:ObservedValue_observationTarget a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservedValue;
	d2rq:property vocab:ObservedValue_observationTarget;
	d2rq:propertyDefinitionLabel "observationTarget";
	d2rq:propertyDefinitionComment "Reference to the subject that has been observed";
	d2rq:refersToClassMap map:ObservationTarget;
	d2rq:join "ObservedValue.observationTarget => ObservationTarget.id";
	.
map:ObservedValue_observableFeature a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservedValue;
	d2rq:property vocab:ObservedValue_observableFeature;
	d2rq:propertyDefinitionLabel "observableFeature";
	d2rq:propertyDefinitionComment "Reference to the feature that was observed";
	d2rq:refersToClassMap map:ObservableFeature;
	d2rq:join "ObservedValue.observableFeature => ObservableFeature.id";
	.
map:ObservedValue_value a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservedValue;
	d2rq:property vocab:ObservedValue_value;
	d2rq:propertyDefinitionLabel "value";
	d2rq:propertyDefinitionComment "The value observed";
	d2rq:column "ObservedValue.value";
	d2rq:datatype xsd:string;
	.
map:ObservedValue_relatedObservationTarget a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservedValue;
	d2rq:property vocab:ObservedValue_relatedObservationTarget;
	d2rq:propertyDefinitionLabel "relatedObservationTarget";
	d2rq:propertyDefinitionComment "Reference to other end of the relationship, if any.";
	d2rq:refersToClassMap map:ObservationTarget;
	d2rq:join "ObservedValue.relatedObservationTarget => ObservationTarget.id";
	.
map:ObservedValue_time a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservedValue;
	d2rq:property vocab:ObservedValue_time;
	d2rq:propertyDefinitionLabel "time";
	d2rq:propertyDefinitionComment "(Optional) Time when the value was observed. For example in time series or if feature is time-dependent like 'age'";
	d2rq:column "ObservedValue.time";
	d2rq:datatype xsd:dateTime;
	.
map:ObservedValue_endtime a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservedValue;
	d2rq:property vocab:ObservedValue_endtime;
	d2rq:propertyDefinitionLabel "endtime";
	d2rq:propertyDefinitionComment "(Optional) Time when the value's validity ended";
	d2rq:column "ObservedValue.endtime";
	d2rq:datatype xsd:dateTime;
	.
map:ObservedValue_ontologyReference a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservedValue;
	d2rq:property vocab:ObservedValue_ontologyReference;
	d2rq:propertyDefinitionLabel "ontologyReference";
	d2rq:propertyDefinitionComment "(Optional) Reference to the     ontology definition or 'code' for this value (recommended for non-numeric     values such as codes)";
	d2rq:refersToClassMap map:OntologyTerm;
	d2rq:join "ObservedValue.ontologyReference => OntologyTerm.id";
	.
map:ObservedValue_protocolApplication a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservedValue;
	d2rq:property vocab:ObservedValue_protocolApplication;
	d2rq:propertyDefinitionLabel "protocolApplication";
	d2rq:propertyDefinitionComment "(Optional) Reference to the protocol application that was used to produce this observation. For example a particular patient visit.";
	d2rq:refersToClassMap map:ProtocolApplication;
	d2rq:join "ObservedValue.protocolApplication => ProtocolApplication.id";
	.
map:ObservedValue_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ObservedValue;
	d2rq:property vocab:ObservedValue_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "ObservedValue.id";
	d2rq:datatype xsd:int;
	.
# Entity InferredValue
map:InferredValue a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "InferredValue/@@InferredValue.id@@";
	d2rq:class vocab:InferredValue;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " The InferredValue class defines ObservedValues that are inferred as result of human or computational post-processing of other ObservedValues. For example: hypertensive = yes when mean arterial pressure = 135 AND no hypertension affecting medicine is taken. The optional inferenceType property enables definition of the type of inference. For example 'mean of a lenght': the observable feature is 'lenght' and the inferenceType is 'mean'. Just as with regular ObservedValues, the protocol used for this inference can be defined via the protocolApplication association that is inherited from ObservedValue. The InferredValue class has no direct mapping to other models: XGAP would use input/ouput Data; PaGE would use a self reference on ObservedValue ";
	.	
# todo: use the xref labels if they are complete
# label for InferredValue using primary key
map:InferredValue__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:InferredValue;
	d2rq:property rdfs:label;
	d2rq:pattern "InferredValue #@@InferredValue.id@@";
	.
map:InferredValue_derivedFrom a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:InferredValue;
	d2rq:property vocab:InferredValue_derivedFrom;
	d2rq:propertyDefinitionLabel "derivedFrom";
	d2rq:propertyDefinitionComment "References to one or more observed values that were used to infer this observation. TODO: needs multicolumn lookup";
	d2rq:refersToClassMap map:ObservedValue;
	d2rq:join "InferredValue.id <= InferredValue_derivedFrom.InferredValue";
	d2rq:join "InferredValue_derivedFrom.derivedFrom => ObservedValue.id";
	.
map:InferredValue_inferenceType a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:InferredValue;
	d2rq:property vocab:InferredValue_inferenceType;
	d2rq:propertyDefinitionLabel "inferenceType";
	d2rq:propertyDefinitionComment "(Optional) Reference to the ontology definition for this inference. For example: mean";
	d2rq:refersToClassMap map:OntologyTerm;
	d2rq:join "InferredValue.inferenceType => OntologyTerm.id";
	.
map:InferredValue_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:InferredValue;
	d2rq:property vocab:InferredValue_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "InferredValue.id";
	d2rq:datatype xsd:int;
	.
# Entity Protocol
map:Protocol a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Protocol/@@Protocol.id@@";
	d2rq:class vocab:Protocol;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " The Protocol class defines parameterizable descriptions of methods; each protocol has a unique name within an Investigation. Each ProtocolApplication can define the ObservableFeatures it can observe as well as the optional Parameters. For instance: SOP for blood pressure measurement used by UK biobank. &lt;br/&gt; The Protocol class maps to FuGE/XGAP/MageTab Protocol, but in contrast to FuGE it is not required to extend protocol before use. The Protocol class also maps to METABASE:Form (note that components are solved during METABASE:Visit which can be nested). Has no equivalent in PaGE. ";
	.	
# todo: use the xref labels if they are complete
# label for Protocol using primary key
map:Protocol__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Protocol;
	d2rq:property rdfs:label;
	d2rq:pattern "Protocol #@@Protocol.id@@";
	.
map:Protocol_description a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Protocol;
	d2rq:property vocab:Protocol_description;
	d2rq:propertyDefinitionLabel "description";
	d2rq:propertyDefinitionComment "Description, or reference to a description, of the protocol";
	d2rq:column "Protocol.description";
	d2rq:datatype xsd:text;
	.
map:Protocol_observableFeatures a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Protocol;
	d2rq:property vocab:Protocol_observableFeatures;
	d2rq:propertyDefinitionLabel "observableFeatures";
	d2rq:propertyDefinitionComment "The features that can be observed using this protocol.";
	d2rq:refersToClassMap map:ObservableFeature;
	d2rq:join "Protocol.id <= Protocol_observableFeatures.Protocol";
	d2rq:join "Protocol_observableFeatures.observableFeatures => ObservableFeature.id";
	.
map:Protocol_protocolComponents a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Protocol;
	d2rq:property vocab:Protocol_protocolComponents;
	d2rq:propertyDefinitionLabel "protocolComponents";
	d2rq:propertyDefinitionComment "The component protocols that together to make up this protocol. For instance: a set of questionnaires.";
	d2rq:refersToClassMap map:Protocol;
	d2rq:join "Protocol.id <= Protocol_protocolComponents.Protocol";
	d2rq:join "Protocol_protocolComponents.protocolComponents => Protocol.id";
	.
map:Protocol_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Protocol;
	d2rq:property vocab:Protocol_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "Protocol.id";
	d2rq:datatype xsd:int;
	.
# Entity ProtocolApplication
map:ProtocolApplication a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "ProtocolApplication/@@ProtocolApplication.id@@";
	d2rq:class vocab:ProtocolApplication;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " A ProtocolApplication class defines the actual action of observation by refering to a protocol and optional ParameterValues. The name field can be used to label applications with a human understandeable tag. For example: the action of blood pressure measurement on 1000 individuals, using a particular protocol, resulting in 1000 associated observed values. If desired, protocols can be shared between Investigations; in those cases one should simply refer to a protocol in another Investigation. &lt;br/&gt; The ProtocolApplication class maps to FuGE/XGAP ProtocolApplication, but in FuGE ProtocolApplications can take Material or Data (or both) as input and produce Material or Data (or both) as output. Similar to PaGE.ObservationMethod. Maps to METABASE:Visit (also note that METABASE:PlannedVisit allows for planning of protocol applications; this is outside scope for this model?). ";
	.	
# todo: use the xref labels if they are complete
# label for ProtocolApplication using primary key
map:ProtocolApplication__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ProtocolApplication;
	d2rq:property rdfs:label;
	d2rq:pattern "ProtocolApplication #@@ProtocolApplication.id@@";
	.
map:ProtocolApplication_time a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ProtocolApplication;
	d2rq:property vocab:ProtocolApplication_time;
	d2rq:propertyDefinitionLabel "time";
	d2rq:propertyDefinitionComment "time when the protocol was applied.";
	d2rq:column "ProtocolApplication.time";
	d2rq:datatype xsd:dateTime;
	.
map:ProtocolApplication_protocol a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ProtocolApplication;
	d2rq:property vocab:ProtocolApplication_protocol;
	d2rq:propertyDefinitionLabel "protocol";
	d2rq:propertyDefinitionComment "Reference to the protocol that is being used.";
	d2rq:refersToClassMap map:Protocol;
	d2rq:join "ProtocolApplication.protocol => Protocol.id";
	.
map:ProtocolApplication_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ProtocolApplication;
	d2rq:property vocab:ProtocolApplication_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "ProtocolApplication.id";
	d2rq:datatype xsd:int;
	.
# Entity ProtocolParameter
map:ProtocolParameter a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "ProtocolParameter/@@ProtocolParameter.id@@";
	d2rq:class vocab:ProtocolParameter;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " ProtocolParameter represents a variable of a Protocol that is instantiated as a Parameter Value (see ParameterValue). For instance 'growth temperature' in a protocol where yeast are grown at permissive and non permissive temperatures. &lt;br/&gt; ProtocolParameter maps to FuGE/XGAP::Parameter. Has no equivalents in METABASE and PAGE. This is not an InvestigationElement because it has a different unique constraint ";
	.	
# todo: use the xref labels if they are complete
# label for ProtocolParameter using primary key
map:ProtocolParameter__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ProtocolParameter;
	d2rq:property rdfs:label;
	d2rq:pattern "ProtocolParameter #@@ProtocolParameter.id@@";
	.
map:ProtocolParameter_protocol a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ProtocolParameter;
	d2rq:property vocab:ProtocolParameter_protocol;
	d2rq:propertyDefinitionLabel "protocol";
	d2rq:propertyDefinitionComment "protocol";
	d2rq:refersToClassMap map:Protocol;
	d2rq:join "ProtocolParameter.protocol => Protocol.id";
	.
map:ProtocolParameter_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ProtocolParameter;
	d2rq:property vocab:ProtocolParameter_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "ProtocolParameter.id";
	d2rq:datatype xsd:int;
	.
# Entity ParameterValue
map:ParameterValue a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "ParameterValue/@@ParameterValue.id@@";
	d2rq:class vocab:ParameterValue;
	d2rq:classDefinitionLabel "Parameter Value";
	d2rq:classDefinitionComment " A ParameterValue is instantiated when a ProtocolApplication applies a Protocol with Parameters. The FuGE equivalent to ParameterValue is FuGE/XGAP::ParameterValue. Has no equivalents in METABASE and PAGE. ";
	.	
# todo: use the xref labels if they are complete
# label for ParameterValue using primary key
map:ParameterValue__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ParameterValue;
	d2rq:property rdfs:label;
	d2rq:pattern "ParameterValue #@@ParameterValue.id@@";
	.
map:ParameterValue_protocolApplication a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ParameterValue;
	d2rq:property vocab:ParameterValue_protocolApplication;
	d2rq:propertyDefinitionLabel "protocolApplication";
	d2rq:propertyDefinitionComment "Reference to the protocol application for which this parameter value was chosen for";
	d2rq:refersToClassMap map:ProtocolApplication;
	d2rq:join "ParameterValue.protocolApplication => ProtocolApplication.id";
	.
map:ParameterValue_protocolParameter a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ParameterValue;
	d2rq:property vocab:ParameterValue_protocolParameter;
	d2rq:propertyDefinitionLabel "protocolParameter";
	d2rq:propertyDefinitionComment "Reference to the protocol parameter that is being bound by this value";
	d2rq:refersToClassMap map:ProtocolParameter;
	d2rq:join "ParameterValue.protocolParameter => ProtocolParameter.id";
	.
map:ParameterValue_value a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ParameterValue;
	d2rq:property vocab:ParameterValue_value;
	d2rq:propertyDefinitionLabel "value";
	d2rq:propertyDefinitionComment "The chosen value of the parameter within this protocol application";
	d2rq:column "ParameterValue.value";
	d2rq:datatype xsd:string;
	.
map:ParameterValue_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:ParameterValue;
	d2rq:property vocab:ParameterValue_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "ParameterValue.id";
	d2rq:datatype xsd:int;
	.
# Entity Contact
map:Contact a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Contact/@@Contact.id@@";
	d2rq:class vocab:Contact;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " A contact is either a person or an organization. Copied from FuGE::Contact. ";
	.	
# todo: use the xref labels if they are complete
# label for Contact using primary key
map:Contact__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Contact;
	d2rq:property rdfs:label;
	d2rq:pattern "Contact #@@Contact.id@@";
	.
map:Contact_firstName a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Contact;
	d2rq:property vocab:Contact_FirstName;
	d2rq:propertyDefinitionLabel "First Name";
	d2rq:propertyDefinitionComment "First Name";
	d2rq:column "Contact.FirstName";
	d2rq:datatype xsd:string;
	.
map:Contact_midInitials a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Contact;
	d2rq:property vocab:Contact_MidInitials;
	d2rq:propertyDefinitionLabel "Mid Initials";
	d2rq:propertyDefinitionComment "Mid Initials";
	d2rq:column "Contact.MidInitials";
	d2rq:datatype xsd:string;
	.
map:Contact_lastName a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Contact;
	d2rq:property vocab:Contact_LastName;
	d2rq:propertyDefinitionLabel "Last Name";
	d2rq:propertyDefinitionComment "Last Name";
	d2rq:column "Contact.LastName";
	d2rq:datatype xsd:string;
	.
map:Contact_affiliation a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Contact;
	d2rq:property vocab:Contact_Affiliation;
	d2rq:propertyDefinitionLabel "Affiliation";
	d2rq:propertyDefinitionComment "Affiliation";
	d2rq:refersToClassMap map:Institute;
	d2rq:join "Contact.Affiliation => Institute.id";
	.
map:Contact_roles a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Contact;
	d2rq:property vocab:Contact_Roles;
	d2rq:propertyDefinitionLabel "Roles";
	d2rq:propertyDefinitionComment "Roles";
	d2rq:refersToClassMap map:OntologyTerm;
	d2rq:join "Contact.id <= Contact_Roles.Contact";
	d2rq:join "Contact_Roles.Roles => OntologyTerm.id";
	.
map:Contact_address a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Contact;
	d2rq:property vocab:Contact_Address;
	d2rq:propertyDefinitionLabel "Address";
	d2rq:propertyDefinitionComment "The address of the Contact.";
	d2rq:column "Contact.Address";
	d2rq:datatype xsd:text;
	.
map:Contact_phone a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Contact;
	d2rq:property vocab:Contact_Phone;
	d2rq:propertyDefinitionLabel "Phone";
	d2rq:propertyDefinitionComment "The telephone number of the Contact including the suitable area codes.";
	d2rq:column "Contact.Phone";
	d2rq:datatype xsd:string;
	.
map:Contact_email a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Contact;
	d2rq:property vocab:Contact_Email;
	d2rq:propertyDefinitionLabel "Email";
	d2rq:propertyDefinitionComment "The email address of the Contact.";
	d2rq:column "Contact.Email";
	d2rq:datatype xsd:string;
	.
map:Contact_fax a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Contact;
	d2rq:property vocab:Contact_Fax;
	d2rq:propertyDefinitionLabel "Fax";
	d2rq:propertyDefinitionComment "The fax number of the Contact.";
	d2rq:column "Contact.Fax";
	d2rq:datatype xsd:string;
	.
map:Contact_tollFreePhone a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Contact;
	d2rq:property vocab:Contact_tollFreePhone;
	d2rq:propertyDefinitionLabel "tollFreePhone";
	d2rq:propertyDefinitionComment "A toll free phone number for the Contact, including suitable area codes.";
	d2rq:column "Contact.tollFreePhone";
	d2rq:datatype xsd:string;
	.
map:Contact_labworker a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Contact;
	d2rq:property vocab:Contact_labworker;
	d2rq:propertyDefinitionLabel "labworker";
	d2rq:propertyDefinitionComment "Indicate whether the contact is a labworker";
	d2rq:column "Contact.labworker";
	d2rq:datatype xsd:boolean;
	.
map:Contact_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Contact;
	d2rq:property vocab:Contact_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "Contact.id";
	d2rq:datatype xsd:int;
	.
# Entity Institute
map:Institute a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Institute/@@Institute.id@@";
	d2rq:class vocab:Institute;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " A contact is either a person or an organization. Copied from FuGE::Contact. ";
	.	
# todo: use the xref labels if they are complete
# label for Institute using primary key
map:Institute__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Institute;
	d2rq:property rdfs:label;
	d2rq:pattern "Institute #@@Institute.id@@";
	.
map:Institute_address a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Institute;
	d2rq:property vocab:Institute_Address;
	d2rq:propertyDefinitionLabel "Address";
	d2rq:propertyDefinitionComment "The address of the Contact.";
	d2rq:column "Institute.Address";
	d2rq:datatype xsd:text;
	.
map:Institute_phone a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Institute;
	d2rq:property vocab:Institute_Phone;
	d2rq:propertyDefinitionLabel "Phone";
	d2rq:propertyDefinitionComment "The telephone number of the Contact including the suitable area codes.";
	d2rq:column "Institute.Phone";
	d2rq:datatype xsd:string;
	.
map:Institute_email a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Institute;
	d2rq:property vocab:Institute_Email;
	d2rq:propertyDefinitionLabel "Email";
	d2rq:propertyDefinitionComment "The email address of the Contact.";
	d2rq:column "Institute.Email";
	d2rq:datatype xsd:string;
	.
map:Institute_fax a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Institute;
	d2rq:property vocab:Institute_Fax;
	d2rq:propertyDefinitionLabel "Fax";
	d2rq:propertyDefinitionComment "The fax number of the Contact.";
	d2rq:column "Institute.Fax";
	d2rq:datatype xsd:string;
	.
map:Institute_tollFreePhone a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Institute;
	d2rq:property vocab:Institute_tollFreePhone;
	d2rq:propertyDefinitionLabel "tollFreePhone";
	d2rq:propertyDefinitionComment "A toll free phone number for the Contact, including suitable area codes.";
	d2rq:column "Institute.tollFreePhone";
	d2rq:datatype xsd:string;
	.
map:Institute_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Institute;
	d2rq:property vocab:Institute_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "Institute.id";
	d2rq:datatype xsd:int;
	.
# Entity Biobank
map:Biobank a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Biobank/@@Biobank.id@@";
	d2rq:class vocab:Biobank;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment "Describes one biobank cohort ";
	.	
# todo: use the xref labels if they are complete
# label for Biobank using primary key
map:Biobank__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Biobank;
	d2rq:property rdfs:label;
	d2rq:pattern "Biobank #@@Biobank.id@@";
	.
map:Biobank_acronym a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Biobank;
	d2rq:property vocab:Biobank_Acronym;
	d2rq:propertyDefinitionLabel "Acronym";
	d2rq:propertyDefinitionComment "Acronym for this biobank";
	d2rq:column "Biobank.Acronym";
	d2rq:datatype xsd:string;
	.
map:Biobank_institutes a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Biobank;
	d2rq:property vocab:Biobank_Institutes;
	d2rq:propertyDefinitionLabel "Institutes";
	d2rq:propertyDefinitionComment "Institute that are custodian of this biobank";
	d2rq:refersToClassMap map:Institute;
	d2rq:join "Biobank.id <= BiobankInstitute.Biobank";
	d2rq:join "BiobankInstitute.Institutes => Institute.id";
	.
map:Biobank_publications a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Biobank;
	d2rq:property vocab:Biobank_Publications;
	d2rq:propertyDefinitionLabel "Publications";
	d2rq:propertyDefinitionComment "Publications for this biobank";
	d2rq:refersToClassMap map:Publication;
	d2rq:join "Biobank.id <= Biobank_Publications.Biobank";
	d2rq:join "Biobank_Publications.Publications => Publication.id";
	.
map:Biobank_category a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Biobank;
	d2rq:property vocab:Biobank_Category;
	d2rq:propertyDefinitionLabel "Category";
	d2rq:propertyDefinitionComment "Category";
	d2rq:refersToClassMap map:OntologyTerm;
	d2rq:join "Biobank.Category => OntologyTerm.id";
	.
map:Biobank_type a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Biobank;
	d2rq:property vocab:Biobank_Type;
	d2rq:propertyDefinitionLabel "Type";
	d2rq:propertyDefinitionComment "Type";
	d2rq:column "Biobank.Type";
	d2rq:datatype xsd:string;
	.
map:Biobank_contacts a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Biobank;
	d2rq:property vocab:Biobank_Contacts;
	d2rq:propertyDefinitionLabel "Contacts";
	d2rq:propertyDefinitionComment "Contact for this biobank";
	d2rq:refersToClassMap map:Contact;
	d2rq:join "Biobank.id <= BiobankContact.Biobank";
	d2rq:join "BiobankContact.Contacts => Contact.id";
	.
map:Biobank_topics a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Biobank;
	d2rq:property vocab:Biobank_Topics;
	d2rq:propertyDefinitionLabel "Topics";
	d2rq:propertyDefinitionComment "Topics";
	d2rq:refersToClassMap map:OntologyTerm;
	d2rq:join "Biobank.id <= Biobank_Topics.Biobank";
	d2rq:join "Biobank_Topics.Topics => OntologyTerm.id";
	.
map:Biobank_materials a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Biobank;
	d2rq:property vocab:Biobank_Materials;
	d2rq:propertyDefinitionLabel "Materials";
	d2rq:propertyDefinitionComment "Materials";
	d2rq:refersToClassMap map:OntologyTerm;
	d2rq:join "Biobank.id <= Biobank_Materials.Biobank";
	d2rq:join "Biobank_Materials.Materials => OntologyTerm.id";
	.
map:Biobank_size a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Biobank;
	d2rq:property vocab:Biobank_Size;
	d2rq:propertyDefinitionLabel "Size";
	d2rq:propertyDefinitionComment "Size";
	d2rq:column "Biobank.Size";
	d2rq:datatype xsd:string;
	.
map:Biobank_lastUpdate a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Biobank;
	d2rq:property vocab:Biobank_LastUpdate;
	d2rq:propertyDefinitionLabel "LastUpdate";
	d2rq:propertyDefinitionComment "LastUpdate";
	d2rq:column "Biobank.LastUpdate";
	d2rq:datatype xsd:date;
	.
map:Biobank_description a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Biobank;
	d2rq:property vocab:Biobank_Description;
	d2rq:propertyDefinitionLabel "Description";
	d2rq:propertyDefinitionComment "Description";
	d2rq:column "Biobank.Description";
	d2rq:datatype xsd:text;
	.
map:Biobank_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Biobank;
	d2rq:property vocab:Biobank_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "Biobank.id";
	d2rq:datatype xsd:int;
	.
# Entity Publication
map:Publication a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Publication/@@Publication.id@@";
	d2rq:class vocab:Publication;
	d2rq:classDefinitionLabel "";
	d2rq:classDefinitionComment " Publication is part of the Investigation package and is used to represent information about one or more publications related to an Investigation. The publication need not only be primary publication for an Investigation but may also represent other related information- though this use is less common. Publications have attributes of publications Authors and also DOI and Pubmed identifiers (when these are available). These are represented as OntologyTerms as in the MAGE-TAB model all 'xrefs' (cross references) for ontologies and accession numbers are handled generically. An example of a publication is available in an IDF file from ArrayExpress is experiment E-MTAB-506 &lt;br/&gt; The FuGE equivalent to Publication is FuGE::Bibliographic Reference. ";
	.	
# todo: use the xref labels if they are complete
# label for Publication using primary key
map:Publication__label a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Publication;
	d2rq:property rdfs:label;
	d2rq:pattern "Publication #@@Publication.id@@";
	.
map:Publication_pubmedID a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Publication;
	d2rq:property vocab:Publication_PubmedID;
	d2rq:propertyDefinitionLabel "Pubmed ID";
	d2rq:propertyDefinitionComment "Pubmed ID";
	d2rq:column "Publication.PubmedID";
	d2rq:datatype xsd:string;
	.
map:Publication_dOI a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Publication;
	d2rq:property vocab:Publication_DOI;
	d2rq:propertyDefinitionLabel "Publication DOI";
	d2rq:propertyDefinitionComment "Publication DOI";
	d2rq:column "Publication.DOI";
	d2rq:datatype xsd:string;
	.
map:Publication_authorList a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Publication;
	d2rq:property vocab:Publication_authorList;
	d2rq:propertyDefinitionLabel "authorList";
	d2rq:propertyDefinitionComment "The names of the authors of the publication";
	d2rq:column "Publication.authorList";
	d2rq:datatype xsd:text;
	.
map:Publication_title a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Publication;
	d2rq:property vocab:Publication_Title;
	d2rq:propertyDefinitionLabel "Publication Title";
	d2rq:propertyDefinitionComment "The title of the Publication";
	d2rq:column "Publication.Title";
	d2rq:datatype xsd:string;
	.
map:Publication_status a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Publication;
	d2rq:property vocab:Publication_Status;
	d2rq:propertyDefinitionLabel "Publication Status";
	d2rq:propertyDefinitionComment "The status of the Publication";
	d2rq:refersToClassMap map:OntologyTerm;
	d2rq:join "Publication.Status => OntologyTerm.id";
	.
map:Publication_id a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Publication;
	d2rq:property vocab:Publication_id;
	d2rq:propertyDefinitionLabel "id";
	d2rq:propertyDefinitionComment "Automatically generated id-field";
	d2rq:column "Publication.id";
	d2rq:datatype xsd:int;
	.

Find the right class map. Below the class map, there's a property
bridge for each column. Find the right one. Change its d2rq:property
value to the FOAF term, e.g., foaf:name. You also have to make sure
that the FOAF namespace is declared in the @prefix section at the very
beginning of the file.

> Or that I have a
> table column whose values map elements from the DailyMed D2R database?
Instead of mapping the column to a literal with d2rq:column, use a
d2rq:uriPattern that produces URIs that match the URIs in the other
dataset.