Changes between Version 4 and Version 5 of DespoinaLog/2010/10/28


Ignore:
Timestamp:
2010-10-28T14:16:44+02:00 (14 years ago)
Author:
antonak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DespoinaLog/2010/10/28

    v4 v5  
    55(see relative message including Pedro Lopes, '''Richard Cyganiak) '''
    66
    7  * How  to connect multiple semantic systems, some using [http://www4.wiwiss.fu-berlin.de/bizer/D2RQ/spec/#specification D2R] and some purely semantic :
     7 * How  to connect multiple semantic systems, some using [http://www4.wiwiss.fu-berlin.de/bizer/D2RQ/spec/#specification D2R] and some purely semantic :
    88   * learn basics of D2RQ mapping language, modify the mapping file that you probably created using generate-[[BR]]mapping.  This is probably the file that lives in molgenis_distro (generated by d2rq) : WebContent/WEB-INF/molgenis-rdf-mapping.n3
    99 * For instance how to define mappings that explicitly say that a table column corresponds to an element of the FOAF ontology ?
    10    * 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 . 
    11 
     10   * 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 .
    1211
    1312{{{
     
    3029    ];
    3130        d2r:vocabularyIncludeInstances true;   
    32     .
    33 
    34 # Should be jndi loaded!
     31    .# Should be jndi loaded!
    3532map:database a d2rq:Database;
    3633        d2rq:jdbcDriver "com.mysql.jdbc.Driver";
     
    4845        d2rq:classDefinitionLabel "";
    4946        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. ";
    50         .       
    51 # todo: use the xref labels if they are complete
    52 # label for Investigation using primary key
    53 map:Investigation__label a d2rq:PropertyBridge;
    54         d2rq:belongsToClassMap map:Investigation;
    55         d2rq:property rdfs:label;
    56         d2rq:pattern "Investigation #@@Investigation.id@@";
    57         .
     47        .       .................................................................................................................................................
     48        .       .................................................................................................................................................
     49        .       .................................................................................................................................................
    5850map:Investigation_description a d2rq:PropertyBridge;
    5951        d2rq:belongsToClassMap map:Investigation;
     
    6456        d2rq:datatype xsd:text;
    6557        .
    66 map:Investigation_accession a d2rq:PropertyBridge;
    67         d2rq:belongsToClassMap map:Investigation;
    68         d2rq:property vocab:Investigation_accession;
    69         d2rq:propertyDefinitionLabel "accession";
    70         d2rq:propertyDefinitionComment "(Optional) URI or accession number to indicate source of Investigation. E.g. arrayexpress:M-EXP-2345";
    71         d2rq:column "Investigation.accession";
    72         d2rq:datatype xsd:url;
    73         .
    74 map:Investigation_id a d2rq:PropertyBridge;
    75         d2rq:belongsToClassMap map:Investigation;
    76         d2rq:property vocab:Investigation_id;
    77         d2rq:propertyDefinitionLabel "id";
    78         d2rq:propertyDefinitionComment "Automatically generated id-field";
    79         d2rq:column "Investigation.id";
    80         d2rq:datatype xsd:int;
    81         .
    82 # Entity Ontology
    83 map:Ontology a d2rq:ClassMap;
    84         d2rq:dataStorage map:database;
    85         d2rq:uriPattern "Ontology/@@Ontology.id@@";
    86         d2rq:class vocab:Ontology;
    87         d2rq:classDefinitionLabel "";
    88         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. ";
    89         .       
    90 # todo: use the xref labels if they are complete
    91 # label for Ontology using primary key
    92 map:Ontology__label a d2rq:PropertyBridge;
    93         d2rq:belongsToClassMap map:Ontology;
    94         d2rq:property rdfs:label;
    95         d2rq:pattern "Ontology #@@Ontology.id@@";
    96         .
    97 map:Ontology_ontologyAccession a d2rq:PropertyBridge;
    98         d2rq:belongsToClassMap map:Ontology;
    99         d2rq:property vocab:Ontology_ontologyAccession;
    100         d2rq:propertyDefinitionLabel "ontologyAccession";
    101         d2rq:propertyDefinitionComment "A identifier that uniquely identifies the ontology (typically an acronym). E.g. GO, MeSH, HPO.";
    102         d2rq:column "Ontology.ontologyAccession";
    103         d2rq:datatype xsd:string;
    104         .
    105 map:Ontology_ontologyURI a d2rq:PropertyBridge;
    106         d2rq:belongsToClassMap map:Ontology;
    107         d2rq:property vocab:Ontology_ontologyURI;
    108         d2rq:propertyDefinitionLabel "ontologyURI";
    109         d2rq:propertyDefinitionComment "(Optional) A URI that references the location of the ontology.";
    110         d2rq:column "Ontology.ontologyURI";
    111         d2rq:datatype xsd:url;
    112         .
    113 map:Ontology_id a d2rq:PropertyBridge;
    114         d2rq:belongsToClassMap map:Ontology;
    115         d2rq:property vocab:Ontology_id;
    116         d2rq:propertyDefinitionLabel "id";
    117         d2rq:propertyDefinitionComment "Automatically generated id-field";
    118         d2rq:column "Ontology.id";
    119         d2rq:datatype xsd:int;
    120         .
    121 # Entity OntologyTerm
    122 map:OntologyTerm a d2rq:ClassMap;
    123         d2rq:dataStorage map:database;
    124         d2rq:uriPattern "OntologyTerm/@@OntologyTerm.id@@";
    125         d2rq:class vocab:OntologyTerm;
    126         d2rq:classDefinitionLabel "";
    127         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. <br/> 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. ";
    128         .       
    129 # todo: use the xref labels if they are complete
    130 # label for OntologyTerm using primary key
    131 map:OntologyTerm__label a d2rq:PropertyBridge;
    132         d2rq:belongsToClassMap map:OntologyTerm;
    133         d2rq:property rdfs:label;
    134         d2rq:pattern "OntologyTerm #@@OntologyTerm.id@@";
    135         .
    136 map:OntologyTerm_term a d2rq:PropertyBridge;
    137         d2rq:belongsToClassMap map:OntologyTerm;
    138         d2rq:property vocab:OntologyTerm_term;
    139         d2rq:propertyDefinitionLabel "term";
    140         d2rq:propertyDefinitionComment "The ontology term. E.g. 'day'";
    141         d2rq:column "OntologyTerm.term";
    142         d2rq:datatype xsd:string;
    143         .
    144 map:OntologyTerm_ontology a d2rq:PropertyBridge;
    145         d2rq:belongsToClassMap map:OntologyTerm;
    146         d2rq:property vocab:OntologyTerm_ontology;
    147         d2rq:propertyDefinitionLabel "ontology";
    148         d2rq:propertyDefinitionComment "(Optional) The source ontology or controlled vocabulary list that ontology terms have been obtained from.";
    149         d2rq:refersToClassMap map:Ontology;
    150         d2rq:join "OntologyTerm.ontology => Ontology.id";
    151         .
    152 map:OntologyTerm_termAccession a d2rq:PropertyBridge;
    153         d2rq:belongsToClassMap map:OntologyTerm;
    154         d2rq:property vocab:OntologyTerm_termAccession;
    155         d2rq:propertyDefinitionLabel "termAccession";
    156         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.";
    157         d2rq:column "OntologyTerm.termAccession";
    158         d2rq:datatype xsd:string;
    159         .
    160 map:OntologyTerm_definition a d2rq:PropertyBridge;
    161         d2rq:belongsToClassMap map:OntologyTerm;
    162         d2rq:property vocab:OntologyTerm_definition;
    163         d2rq:propertyDefinitionLabel "definition";
    164         d2rq:propertyDefinitionComment "(Optional) The definition of the term.";
    165         d2rq:column "OntologyTerm.definition";
    166         d2rq:datatype xsd:string;
    167         .
    168 map:OntologyTerm_id a d2rq:PropertyBridge;
    169         d2rq:belongsToClassMap map:OntologyTerm;
    170         d2rq:property vocab:OntologyTerm_id;
    171         d2rq:propertyDefinitionLabel "id";
    172         d2rq:propertyDefinitionComment "Automatically generated id-field";
    173         d2rq:column "OntologyTerm.id";
    174         d2rq:datatype xsd:int;
    175         .
    176 # Entity ObservableFeature
    177 map:ObservableFeature a d2rq:ClassMap;
    178         d2rq:dataStorage map:database;
    179         d2rq:uriPattern "ObservableFeature/@@ObservableFeature.id@@";
    180         d2rq:class vocab:ObservableFeature;
    181         d2rq:classDefinitionLabel "";
    182         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. ";
    183         .       
    184 # todo: use the xref labels if they are complete
    185 # label for ObservableFeature using primary key
    186 map:ObservableFeature__label a d2rq:PropertyBridge;
    187         d2rq:belongsToClassMap map:ObservableFeature;
    188         d2rq:property rdfs:label;
    189         d2rq:pattern "ObservableFeature #@@ObservableFeature.id@@";
    190         .
    191 map:ObservableFeature_description a d2rq:PropertyBridge;
    192         d2rq:belongsToClassMap map:ObservableFeature;
    193         d2rq:property vocab:ObservableFeature_description;
    194         d2rq:propertyDefinitionLabel "description";
    195         d2rq:propertyDefinitionComment "(Optional) Rudimentary meta data about the observeable feature. Use of ontology terms references to establish unambigious descriptions is recommended";
    196         d2rq:column "ObservableFeature.description";
    197         d2rq:datatype xsd:text;
    198         .
    199 map:ObservableFeature_ontologyReference a d2rq:PropertyBridge;
    200         d2rq:belongsToClassMap map:ObservableFeature;
    201         d2rq:property vocab:ObservableFeature_ontologyReference;
    202         d2rq:propertyDefinitionLabel "ontologyReference";
    203         d2rq:propertyDefinitionComment "(Optional) Reference to the formal ontology definition for this feature. E.g. [TODO: add examples]";
    204         d2rq:refersToClassMap map:OntologyTerm;
    205         d2rq:join "ObservableFeature.ontologyReference => OntologyTerm.id";
    206         .
    207 map:ObservableFeature_unit a d2rq:PropertyBridge;
    208         d2rq:belongsToClassMap map:ObservableFeature;
    209         d2rq:property vocab:ObservableFeature_unit;
    210         d2rq:propertyDefinitionLabel "unit";
    211         d2rq:propertyDefinitionComment "(Optional) Reference to the well-defined measurement unit used to observe this features (if feature is that concrete). E.g. mmHg";
    212         d2rq:refersToClassMap map:OntologyTerm;
    213         d2rq:join "ObservableFeature.unit => OntologyTerm.id";
    214         .
    215 map:ObservableFeature_dataType a d2rq:PropertyBridge;
    216         d2rq:belongsToClassMap map:ObservableFeature;
    217         d2rq:property vocab:ObservableFeature_dataType;
    218         d2rq:propertyDefinitionLabel "dataType";
    219         d2rq:propertyDefinitionComment "dataType";
    220         d2rq:column "ObservableFeature.dataType";
    221         d2rq:datatype xsd:string;
    222         .
    223 map:ObservableFeature_focal a d2rq:PropertyBridge;
    224         d2rq:belongsToClassMap map:ObservableFeature;
    225         d2rq:property vocab:ObservableFeature_focal;
    226         d2rq:propertyDefinitionLabel "Focal";
    227         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)";
    228         d2rq:column "ObservableFeature.focal";
    229         d2rq:datatype xsd:boolean;
    230         .
    231 map:ObservableFeature_observationtargettype a d2rq:PropertyBridge;
    232         d2rq:belongsToClassMap map:ObservableFeature;
    233         d2rq:property vocab:ObservableFeature_observationtargettype;
    234         d2rq:propertyDefinitionLabel "ObservationTarget type";
    235         d2rq:propertyDefinitionComment "name of class referred to";
    236         d2rq:column "ObservableFeature.observationtargettype";
    237         d2rq:datatype xsd:string;
    238         .
    239 map:ObservableFeature_observationtargetlabel a d2rq:PropertyBridge;
    240         d2rq:belongsToClassMap map:ObservableFeature;
    241         d2rq:property vocab:ObservableFeature_observationtargetlabel;
    242         d2rq:propertyDefinitionLabel "ObservationTarget label";
    243         d2rq:propertyDefinitionComment "[DISCUSSION] label applied to target, for filtering purposes";
    244         d2rq:column "ObservableFeature.observationtargetlabel";
    245         d2rq:datatype xsd:string;
    246         .
    247 map:ObservableFeature_id a d2rq:PropertyBridge;
    248         d2rq:belongsToClassMap map:ObservableFeature;
    249         d2rq:property vocab:ObservableFeature_id;
    250         d2rq:propertyDefinitionLabel "id";
    251         d2rq:propertyDefinitionComment "Automatically generated id-field";
    252         d2rq:column "ObservableFeature.id";
    253         d2rq:datatype xsd:int;
    254         .
    255 # Entity Code
    256 map:Code a d2rq:ClassMap;
    257         d2rq:dataStorage map:database;
    258         d2rq:uriPattern "Code/@@Code.id@@";
    259         d2rq:class vocab:Code;
    260         d2rq:classDefinitionLabel "";
    261         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 ";
    262         .       
    263 # todo: use the xref labels if they are complete
    264 # label for Code using primary key
    265 map:Code__label a d2rq:PropertyBridge;
    266         d2rq:belongsToClassMap map:Code;
    267         d2rq:property rdfs:label;
    268         d2rq:pattern "Code #@@Code.id@@";
    269         .
    270 map:Code_feature a d2rq:PropertyBridge;
    271         d2rq:belongsToClassMap map:Code;
    272         d2rq:property vocab:Code_feature;
    273         d2rq:propertyDefinitionLabel "feature";
    274         d2rq:propertyDefinitionComment "The feature for which these codes where defined.";
    275         d2rq:refersToClassMap map:ObservableFeature;
    276         d2rq:join "Code.id <= Code_feature.Code";
    277         d2rq:join "Code_feature.feature => ObservableFeature.id";
    278         .
    279 map:Code_code a d2rq:PropertyBridge;
    280         d2rq:belongsToClassMap map:Code;
    281         d2rq:property vocab:Code_code;
    282         d2rq:propertyDefinitionLabel "code";
    283         d2rq:propertyDefinitionComment "The code used to represent this term. For example: { '1'-'male', '2'-'female'}";
    284         d2rq:column "Code.code";
    285         d2rq:datatype xsd:string;
    286         .
    287 map:Code_description a d2rq:PropertyBridge;
    288         d2rq:belongsToClassMap map:Code;
    289         d2rq:property vocab:Code_description;
    290         d2rq:propertyDefinitionLabel "description";
    291         d2rq:propertyDefinitionComment "Description of the code.     Use of ontology terms references to establish unambigious descriptions is     recommended";
    292         d2rq:column "Code.description";
    293         d2rq:datatype xsd:text;
    294         .
    295 map:Code_ontologyReference a d2rq:PropertyBridge;
    296         d2rq:belongsToClassMap map:Code;
    297         d2rq:property vocab:Code_ontologyReference;
    298         d2rq:propertyDefinitionLabel "ontologyReference";
    299         d2rq:propertyDefinitionComment "(Optional) Reference to the    formal ontology definition for this code.";
    300         d2rq:refersToClassMap map:OntologyTerm;
    301         d2rq:join "Code.ontologyReference => OntologyTerm.id";
    302         .
    303 map:Code_id a d2rq:PropertyBridge;
    304         d2rq:belongsToClassMap map:Code;
    305         d2rq:property vocab:Code_id;
    306         d2rq:propertyDefinitionLabel "id";
    307         d2rq:propertyDefinitionComment "Automatically generated id-field";
    308         d2rq:column "Code.id";
    309         d2rq:datatype xsd:int;
    310         .
    311 # Entity ObservationTarget
    312 map:ObservationTarget a d2rq:ClassMap;
    313         d2rq:dataStorage map:database;
    314         d2rq:uriPattern "ObservationTarget/@@ObservationTarget.id@@";
    315         d2rq:class vocab:ObservationTarget;
    316         d2rq:classDefinitionLabel "";
    317         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. ";
    318         .       
    319 # todo: use the xref labels if they are complete
    320 # label for ObservationTarget using primary key
    321 map:ObservationTarget__label a d2rq:PropertyBridge;
    322         d2rq:belongsToClassMap map:ObservationTarget;
    323         d2rq:property rdfs:label;
    324         d2rq:pattern "ObservationTarget #@@ObservationTarget.id@@";
    325         .
    326 map:ObservationTarget___Type a d2rq:PropertyBridge;
    327         d2rq:belongsToClassMap map:ObservationTarget;
    328         d2rq:property vocab:ObservationTarget___Type;
    329         d2rq:propertyDefinitionLabel "__Type";
    330         d2rq:propertyDefinitionComment "Subtypes have to be set to allow searching";
    331         d2rq:column "ObservationTarget.__Type";
    332         d2rq:datatype xsd:string;
    333         .
    334 map:ObservationTarget_observationTargetType a d2rq:PropertyBridge;
    335         d2rq:belongsToClassMap map:ObservationTarget;
    336         d2rq:property vocab:ObservationTarget_observationTargetType;
    337         d2rq:propertyDefinitionLabel "observationTargetType";
    338         d2rq:propertyDefinitionComment "[Discussion] (Optional) to distinguish between e.g. Animals, Locations and Actors";
    339         d2rq:column "ObservationTarget.observationTargetType";
    340         d2rq:datatype xsd:string;
    341         .
    342 map:ObservationTarget_id a d2rq:PropertyBridge;
    343         d2rq:belongsToClassMap map:ObservationTarget;
    344         d2rq:property vocab:ObservationTarget_id;
    345         d2rq:propertyDefinitionLabel "id";
    346         d2rq:propertyDefinitionComment "Automatically generated id-field";
    347         d2rq:column "ObservationTarget.id";
    348         d2rq:datatype xsd:int;
    349         .
    350 # Entity Individual
    351 map:Individual a d2rq:ClassMap;
    352         d2rq:dataStorage map:database;
    353         d2rq:uriPattern "Individual/@@Individual.id@@";
    354         d2rq:class vocab:Individual;
    355         d2rq:classDefinitionLabel "";
    356         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. ";
    357         .       
    358 # todo: use the xref labels if they are complete
    359 # label for Individual using primary key
    360 map:Individual__label a d2rq:PropertyBridge;
    361         d2rq:belongsToClassMap map:Individual;
    362         d2rq:property rdfs:label;
    363         d2rq:pattern "Individual #@@Individual.id@@";
    364         .
    365 map:Individual_id a d2rq:PropertyBridge;
    366         d2rq:belongsToClassMap map:Individual;
    367         d2rq:property vocab:Individual_id;
    368         d2rq:propertyDefinitionLabel "id";
    369         d2rq:propertyDefinitionComment "Automatically generated id-field";
    370         d2rq:column "Individual.id";
    371         d2rq:datatype xsd:int;
    372         .
    373 # Entity Panel
    374 map:Panel a d2rq:ClassMap;
    375         d2rq:dataStorage map:database;
    376         d2rq:uriPattern "Panel/@@Panel.id@@";
    377         d2rq:class vocab:Panel;
    378         d2rq:classDefinitionLabel "";
    379         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. ";
    380         .       
    381 # todo: use the xref labels if they are complete
    382 # label for Panel using primary key
    383 map:Panel__label a d2rq:PropertyBridge;
    384         d2rq:belongsToClassMap map:Panel;
    385         d2rq:property rdfs:label;
    386         d2rq:pattern "Panel #@@Panel.id@@";
    387         .
    388 map:Panel_individuals a d2rq:PropertyBridge;
    389         d2rq:belongsToClassMap map:Panel;
    390         d2rq:property vocab:Panel_individuals;
    391         d2rq:propertyDefinitionLabel "individuals";
    392         d2rq:propertyDefinitionComment "The list of individuals in this panel";
    393         d2rq:refersToClassMap map:Individual;
    394         d2rq:join "Panel.id <= Panel_individuals.Panel";
    395         d2rq:join "Panel_individuals.individuals => Individual.id";
    396         .
    397 map:Panel_id a d2rq:PropertyBridge;
    398         d2rq:belongsToClassMap map:Panel;
    399         d2rq:property vocab:Panel_id;
    400         d2rq:propertyDefinitionLabel "id";
    401         d2rq:propertyDefinitionComment "Automatically generated id-field";
    402         d2rq:column "Panel.id";
    403         d2rq:datatype xsd:int;
    404         .
    405 # Entity Sample
    406 map:Sample a d2rq:ClassMap;
    407         d2rq:dataStorage map:database;
    408         d2rq:uriPattern "Sample/@@Sample.id@@";
    409         d2rq:class vocab:Sample;
    410         d2rq:classDefinitionLabel "";
    411         d2rq:classDefinitionComment " This extended investigation provides extra fields for saving information of the customer, such as their address, telephone number, etc ";
    412         .       
    413 # todo: use the xref labels if they are complete
    414 # label for Sample using primary key
    415 map:Sample__label a d2rq:PropertyBridge;
    416         d2rq:belongsToClassMap map:Sample;
    417         d2rq:property rdfs:label;
    418         d2rq:pattern "Sample #@@Sample.id@@";
    419         .
    420 map:Sample_sampletype a d2rq:PropertyBridge;
    421         d2rq:belongsToClassMap map:Sample;
    422         d2rq:property vocab:Sample_sampletype;
    423         d2rq:propertyDefinitionLabel "sampletype";
    424         d2rq:propertyDefinitionComment "Type of sample (dna/rna)";
    425         d2rq:column "Sample.sampletype";
    426         d2rq:datatype xsd:string;
    427         .
    428 map:Sample_origin a d2rq:PropertyBridge;
    429         d2rq:belongsToClassMap map:Sample;
    430         d2rq:property vocab:Sample_origin;
    431         d2rq:propertyDefinitionLabel "origin";
    432         d2rq:propertyDefinitionComment "Origin of the sample (i.e. duck, pig, human)";
    433         d2rq:column "Sample.origin";
    434         d2rq:datatype xsd:string;
    435         .
    436 map:Sample_fragmentlength a d2rq:PropertyBridge;
    437         d2rq:belongsToClassMap map:Sample;
    438         d2rq:property vocab:Sample_fragmentlength;
    439         d2rq:propertyDefinitionLabel "fragmentlength";
    440         d2rq:propertyDefinitionComment "Length of the sample fragment";
    441         d2rq:column "Sample.fragmentlength";
    442         d2rq:datatype xsd:int;
    443         .
    444 map:Sample_readlength a d2rq:PropertyBridge;
    445         d2rq:belongsToClassMap map:Sample;
    446         d2rq:property vocab:Sample_readlength;
    447         d2rq:propertyDefinitionLabel "readlength";
    448         d2rq:propertyDefinitionComment "Length of the read to be executed";
    449         d2rq:column "Sample.readlength";
    450         d2rq:datatype xsd:int;
    451         .
    452 map:Sample_samplecode a d2rq:PropertyBridge;
    453         d2rq:belongsToClassMap map:Sample;
    454         d2rq:property vocab:Sample_samplecode;
    455         d2rq:propertyDefinitionLabel "samplecode";
    456         d2rq:propertyDefinitionComment "Name of the sample (i.e. ToS-185-I65)";
    457         d2rq:column "Sample.samplecode";
    458         d2rq:datatype xsd:string;
    459         .
    460 map:Sample_description a d2rq:PropertyBridge;
    461         d2rq:belongsToClassMap map:Sample;
    462         d2rq:property vocab:Sample_description;
    463         d2rq:propertyDefinitionLabel "description";
    464         d2rq:propertyDefinitionComment "Description/Notes about the sample";
    465         d2rq:column "Sample.description";
    466         d2rq:datatype xsd:text;
    467         .
    468 map:Sample_status a d2rq:PropertyBridge;
    469         d2rq:belongsToClassMap map:Sample;
    470         d2rq:property vocab:Sample_status;
    471         d2rq:propertyDefinitionLabel "status";
    472         d2rq:propertyDefinitionComment "Current status of the sample";
    473         d2rq:column "Sample.status";
    474         d2rq:datatype xsd:string;
    475         .
    476 map:Sample_project a d2rq:PropertyBridge;
    477         d2rq:belongsToClassMap map:Sample;
    478         d2rq:property vocab:Sample_project;
    479         d2rq:propertyDefinitionLabel "project";
    480         d2rq:propertyDefinitionComment "Project that the sample belongs to";
    481         d2rq:refersToClassMap map:Project;
    482         d2rq:join "Sample.project => Project.id";
    483         .
    484 map:Sample_id a d2rq:PropertyBridge;
    485         d2rq:belongsToClassMap map:Sample;
    486         d2rq:property vocab:Sample_id;
    487         d2rq:propertyDefinitionLabel "id";
    488         d2rq:propertyDefinitionComment "Automatically generated id-field";
    489         d2rq:column "Sample.id";
    490         d2rq:datatype xsd:int;
    491         .
    492 # Entity Project
    493 map:Project a d2rq:ClassMap;
    494         d2rq:dataStorage map:database;
    495         d2rq:uriPattern "Project/@@Project.id@@";
    496         d2rq:class vocab:Project;
    497         d2rq:classDefinitionLabel "";
    498         d2rq:classDefinitionComment " This extended investigation provides extra fields for saving information of the customer, such as their address, telephone number, etc ";
    499         .       
    500 # todo: use the xref labels if they are complete
    501 # label for Project using primary key
    502 map:Project__label a d2rq:PropertyBridge;
    503         d2rq:belongsToClassMap map:Project;
    504         d2rq:property rdfs:label;
    505         d2rq:pattern "Project #@@Project.id@@";
    506         .
    507 map:Project_contractcode a d2rq:PropertyBridge;
    508         d2rq:belongsToClassMap map:Project;
    509         d2rq:property vocab:Project_contractcode;
    510         d2rq:propertyDefinitionLabel "contractcode";
    511         d2rq:propertyDefinitionComment "Contract code/Declaratie Nr (i.e. ToS-185-I65)";
    512         d2rq:column "Project.contractcode";
    513         d2rq:datatype xsd:string;
    514         .
    515 map:Project_startdate a d2rq:PropertyBridge;
    516         d2rq:belongsToClassMap map:Project;
    517         d2rq:property vocab:Project_startdate;
    518         d2rq:propertyDefinitionLabel "startdate";
    519         d2rq:propertyDefinitionComment "Start date of the project (i.e. 2010-20-10 10:34:56)";
    520         d2rq:column "Project.startdate";
    521         d2rq:datatype xsd:string;
    522         .
    523 map:Project_enddate a d2rq:PropertyBridge;
    524         d2rq:belongsToClassMap map:Project;
    525         d2rq:property vocab:Project_enddate;
    526         d2rq:propertyDefinitionLabel "enddate";
    527         d2rq:propertyDefinitionComment "Start date of the project (i.e. 2010-30-10 14:42:11)";
    528         d2rq:column "Project.enddate";
    529         d2rq:datatype xsd:string;
    530         .
    531 map:Project_labworker_id a d2rq:PropertyBridge;
    532         d2rq:belongsToClassMap map:Project;
    533         d2rq:property vocab:Project_labworker_id;
    534         d2rq:propertyDefinitionLabel "labworker_id";
    535         d2rq:propertyDefinitionComment "Lab technician in charge of project";
    536         d2rq:refersToClassMap map:Contact;
    537         d2rq:join "Project.labworker_id => Contact.id";
    538         .
    539 map:Project_id a d2rq:PropertyBridge;
    540         d2rq:belongsToClassMap map:Project;
    541         d2rq:property vocab:Project_id;
    542         d2rq:propertyDefinitionLabel "id";
    543         d2rq:propertyDefinitionComment "Automatically generated id-field";
    544         d2rq:column "Project.id";
    545         d2rq:datatype xsd:int;
    546         .
    547 map:Project_name a d2rq:PropertyBridge;
    548         d2rq:belongsToClassMap map:Project;
    549         d2rq:property vocab:Project_name;
    550         d2rq:propertyDefinitionLabel "name";
    551         d2rq:propertyDefinitionComment "A human-readable and potentially ambiguous common identifier";
    552         d2rq:column "Project.name";
    553         d2rq:datatype xsd:string;
    554         .
    555 # Entity ObservedValue
    556 map:ObservedValue a d2rq:ClassMap;
    557         d2rq:dataStorage map:database;
    558         d2rq:uriPattern "ObservedValue/@@ObservedValue.id@@";
    559         d2rq:class vocab:ObservedValue;
    560         d2rq:classDefinitionLabel "";
    561         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. ";
    562         .       
    563 # todo: use the xref labels if they are complete
    564 # label for ObservedValue using primary key
    565 map:ObservedValue__label a d2rq:PropertyBridge;
    566         d2rq:belongsToClassMap map:ObservedValue;
    567         d2rq:property rdfs:label;
    568         d2rq:pattern "ObservedValue #@@ObservedValue.id@@";
    569         .
    570 map:ObservedValue___Type a d2rq:PropertyBridge;
    571         d2rq:belongsToClassMap map:ObservedValue;
    572         d2rq:property vocab:ObservedValue___Type;
    573         d2rq:propertyDefinitionLabel "__Type";
    574         d2rq:propertyDefinitionComment "Subtypes have to be set to allow searching";
    575         d2rq:column "ObservedValue.__Type";
    576         d2rq:datatype xsd:string;
    577         .
    578 map:ObservedValue_investigation a d2rq:PropertyBridge;
    579         d2rq:belongsToClassMap map:ObservedValue;
    580         d2rq:property vocab:ObservedValue_Investigation;
    581         d2rq:propertyDefinitionLabel "Investigation";
    582         d2rq:propertyDefinitionComment "(Optional) Reference to the Investigation this observedValue belongs to.";
    583         d2rq:refersToClassMap map:Investigation;
    584         d2rq:join "ObservedValue.Investigation => Investigation.id";
    585         .
    586 map:ObservedValue_observationTarget a d2rq:PropertyBridge;
    587         d2rq:belongsToClassMap map:ObservedValue;
    588         d2rq:property vocab:ObservedValue_observationTarget;
    589         d2rq:propertyDefinitionLabel "observationTarget";
    590         d2rq:propertyDefinitionComment "Reference to the subject that has been observed";
    591         d2rq:refersToClassMap map:ObservationTarget;
    592         d2rq:join "ObservedValue.observationTarget => ObservationTarget.id";
    593         .
    594 map:ObservedValue_observableFeature a d2rq:PropertyBridge;
    595         d2rq:belongsToClassMap map:ObservedValue;
    596         d2rq:property vocab:ObservedValue_observableFeature;
    597         d2rq:propertyDefinitionLabel "observableFeature";
    598         d2rq:propertyDefinitionComment "Reference to the feature that was observed";
    599         d2rq:refersToClassMap map:ObservableFeature;
    600         d2rq:join "ObservedValue.observableFeature => ObservableFeature.id";
    601         .
    602 map:ObservedValue_value a d2rq:PropertyBridge;
    603         d2rq:belongsToClassMap map:ObservedValue;
    604         d2rq:property vocab:ObservedValue_value;
    605         d2rq:propertyDefinitionLabel "value";
    606         d2rq:propertyDefinitionComment "The value observed";
    607         d2rq:column "ObservedValue.value";
    608         d2rq:datatype xsd:string;
    609         .
    610 map:ObservedValue_relatedObservationTarget a d2rq:PropertyBridge;
    611         d2rq:belongsToClassMap map:ObservedValue;
    612         d2rq:property vocab:ObservedValue_relatedObservationTarget;
    613         d2rq:propertyDefinitionLabel "relatedObservationTarget";
    614         d2rq:propertyDefinitionComment "Reference to other end of the relationship, if any.";
    615         d2rq:refersToClassMap map:ObservationTarget;
    616         d2rq:join "ObservedValue.relatedObservationTarget => ObservationTarget.id";
    617         .
    618 map:ObservedValue_time a d2rq:PropertyBridge;
    619         d2rq:belongsToClassMap map:ObservedValue;
    620         d2rq:property vocab:ObservedValue_time;
    621         d2rq:propertyDefinitionLabel "time";
    622         d2rq:propertyDefinitionComment "(Optional) Time when the value was observed. For example in time series or if feature is time-dependent like 'age'";
    623         d2rq:column "ObservedValue.time";
    624         d2rq:datatype xsd:dateTime;
    625         .
    626 map:ObservedValue_endtime a d2rq:PropertyBridge;
    627         d2rq:belongsToClassMap map:ObservedValue;
    628         d2rq:property vocab:ObservedValue_endtime;
    629         d2rq:propertyDefinitionLabel "endtime";
    630         d2rq:propertyDefinitionComment "(Optional) Time when the value's validity ended";
    631         d2rq:column "ObservedValue.endtime";
    632         d2rq:datatype xsd:dateTime;
    633         .
    634 map:ObservedValue_ontologyReference a d2rq:PropertyBridge;
    635         d2rq:belongsToClassMap map:ObservedValue;
    636         d2rq:property vocab:ObservedValue_ontologyReference;
    637         d2rq:propertyDefinitionLabel "ontologyReference";
    638         d2rq:propertyDefinitionComment "(Optional) Reference to the     ontology definition or 'code' for this value (recommended for non-numeric     values such as codes)";
    639         d2rq:refersToClassMap map:OntologyTerm;
    640         d2rq:join "ObservedValue.ontologyReference => OntologyTerm.id";
    641         .
    642 map:ObservedValue_protocolApplication a d2rq:PropertyBridge;
    643         d2rq:belongsToClassMap map:ObservedValue;
    644         d2rq:property vocab:ObservedValue_protocolApplication;
    645         d2rq:propertyDefinitionLabel "protocolApplication";
    646         d2rq:propertyDefinitionComment "(Optional) Reference to the protocol application that was used to produce this observation. For example a particular patient visit.";
    647         d2rq:refersToClassMap map:ProtocolApplication;
    648         d2rq:join "ObservedValue.protocolApplication => ProtocolApplication.id";
    649         .
    650 map:ObservedValue_id a d2rq:PropertyBridge;
    651         d2rq:belongsToClassMap map:ObservedValue;
    652         d2rq:property vocab:ObservedValue_id;
    653         d2rq:propertyDefinitionLabel "id";
    654         d2rq:propertyDefinitionComment "Automatically generated id-field";
    655         d2rq:column "ObservedValue.id";
    656         d2rq:datatype xsd:int;
    657         .
    658 # Entity InferredValue
    659 map:InferredValue a d2rq:ClassMap;
    660         d2rq:dataStorage map:database;
    661         d2rq:uriPattern "InferredValue/@@InferredValue.id@@";
    662         d2rq:class vocab:InferredValue;
    663         d2rq:classDefinitionLabel "";
    664         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 ";
    665         .       
    666 # todo: use the xref labels if they are complete
    667 # label for InferredValue using primary key
    668 map:InferredValue__label a d2rq:PropertyBridge;
    669         d2rq:belongsToClassMap map:InferredValue;
    670         d2rq:property rdfs:label;
    671         d2rq:pattern "InferredValue #@@InferredValue.id@@";
    672         .
    673 map:InferredValue_derivedFrom a d2rq:PropertyBridge;
    674         d2rq:belongsToClassMap map:InferredValue;
    675         d2rq:property vocab:InferredValue_derivedFrom;
    676         d2rq:propertyDefinitionLabel "derivedFrom";
    677         d2rq:propertyDefinitionComment "References to one or more observed values that were used to infer this observation. TODO: needs multicolumn lookup";
    678         d2rq:refersToClassMap map:ObservedValue;
    679         d2rq:join "InferredValue.id <= InferredValue_derivedFrom.InferredValue";
    680         d2rq:join "InferredValue_derivedFrom.derivedFrom => ObservedValue.id";
    681         .
    682 map:InferredValue_inferenceType a d2rq:PropertyBridge;
    683         d2rq:belongsToClassMap map:InferredValue;
    684         d2rq:property vocab:InferredValue_inferenceType;
    685         d2rq:propertyDefinitionLabel "inferenceType";
    686         d2rq:propertyDefinitionComment "(Optional) Reference to the ontology definition for this inference. For example: mean";
    687         d2rq:refersToClassMap map:OntologyTerm;
    688         d2rq:join "InferredValue.inferenceType => OntologyTerm.id";
    689         .
    690 map:InferredValue_id a d2rq:PropertyBridge;
    691         d2rq:belongsToClassMap map:InferredValue;
    692         d2rq:property vocab:InferredValue_id;
    693         d2rq:propertyDefinitionLabel "id";
    694         d2rq:propertyDefinitionComment "Automatically generated id-field";
    695         d2rq:column "InferredValue.id";
    696         d2rq:datatype xsd:int;
    697         .
    698 # Entity Protocol
    699 map:Protocol a d2rq:ClassMap;
    700         d2rq:dataStorage map:database;
    701         d2rq:uriPattern "Protocol/@@Protocol.id@@";
    702         d2rq:class vocab:Protocol;
    703         d2rq:classDefinitionLabel "";
    704         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. ";
    705         .       
    706 # todo: use the xref labels if they are complete
    707 # label for Protocol using primary key
    708 map:Protocol__label a d2rq:PropertyBridge;
    709         d2rq:belongsToClassMap map:Protocol;
    710         d2rq:property rdfs:label;
    711         d2rq:pattern "Protocol #@@Protocol.id@@";
    712         .
    713 map:Protocol_description a d2rq:PropertyBridge;
    714         d2rq:belongsToClassMap map:Protocol;
    715         d2rq:property vocab:Protocol_description;
    716         d2rq:propertyDefinitionLabel "description";
    717         d2rq:propertyDefinitionComment "Description, or reference to a description, of the protocol";
    718         d2rq:column "Protocol.description";
    719         d2rq:datatype xsd:text;
    720         .
    721 map:Protocol_observableFeatures a d2rq:PropertyBridge;
    722         d2rq:belongsToClassMap map:Protocol;
    723         d2rq:property vocab:Protocol_observableFeatures;
    724         d2rq:propertyDefinitionLabel "observableFeatures";
    725         d2rq:propertyDefinitionComment "The features that can be observed using this protocol.";
    726         d2rq:refersToClassMap map:ObservableFeature;
    727         d2rq:join "Protocol.id <= Protocol_observableFeatures.Protocol";
    728         d2rq:join "Protocol_observableFeatures.observableFeatures => ObservableFeature.id";
    729         .
    730 map:Protocol_protocolComponents a d2rq:PropertyBridge;
    731         d2rq:belongsToClassMap map:Protocol;
    732         d2rq:property vocab:Protocol_protocolComponents;
    733         d2rq:propertyDefinitionLabel "protocolComponents";
    734         d2rq:propertyDefinitionComment "The component protocols that together to make up this protocol. For instance: a set of questionnaires.";
    735         d2rq:refersToClassMap map:Protocol;
    736         d2rq:join "Protocol.id <= Protocol_protocolComponents.Protocol";
    737         d2rq:join "Protocol_protocolComponents.protocolComponents => Protocol.id";
    738         .
    739 map:Protocol_id a d2rq:PropertyBridge;
    740         d2rq:belongsToClassMap map:Protocol;
    741         d2rq:property vocab:Protocol_id;
    742         d2rq:propertyDefinitionLabel "id";
    743         d2rq:propertyDefinitionComment "Automatically generated id-field";
    744         d2rq:column "Protocol.id";
    745         d2rq:datatype xsd:int;
    746         .
    747 # Entity ProtocolApplication
    748 map:ProtocolApplication a d2rq:ClassMap;
    749         d2rq:dataStorage map:database;
    750         d2rq:uriPattern "ProtocolApplication/@@ProtocolApplication.id@@";
    751         d2rq:class vocab:ProtocolApplication;
    752         d2rq:classDefinitionLabel "";
    753         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?). ";
    754         .       
    755 # todo: use the xref labels if they are complete
    756 # label for ProtocolApplication using primary key
    757 map:ProtocolApplication__label a d2rq:PropertyBridge;
    758         d2rq:belongsToClassMap map:ProtocolApplication;
    759         d2rq:property rdfs:label;
    760         d2rq:pattern "ProtocolApplication #@@ProtocolApplication.id@@";
    761         .
    762 map:ProtocolApplication_time a d2rq:PropertyBridge;
    763         d2rq:belongsToClassMap map:ProtocolApplication;
    764         d2rq:property vocab:ProtocolApplication_time;
    765         d2rq:propertyDefinitionLabel "time";
    766         d2rq:propertyDefinitionComment "time when the protocol was applied.";
    767         d2rq:column "ProtocolApplication.time";
    768         d2rq:datatype xsd:dateTime;
    769         .
    770 map:ProtocolApplication_protocol a d2rq:PropertyBridge;
    771         d2rq:belongsToClassMap map:ProtocolApplication;
    772         d2rq:property vocab:ProtocolApplication_protocol;
    773         d2rq:propertyDefinitionLabel "protocol";
    774         d2rq:propertyDefinitionComment "Reference to the protocol that is being used.";
    775         d2rq:refersToClassMap map:Protocol;
    776         d2rq:join "ProtocolApplication.protocol => Protocol.id";
    777         .
    778 map:ProtocolApplication_id a d2rq:PropertyBridge;
    779         d2rq:belongsToClassMap map:ProtocolApplication;
    780         d2rq:property vocab:ProtocolApplication_id;
    781         d2rq:propertyDefinitionLabel "id";
    782         d2rq:propertyDefinitionComment "Automatically generated id-field";
    783         d2rq:column "ProtocolApplication.id";
    784         d2rq:datatype xsd:int;
    785         .
    786 # Entity ProtocolParameter
    787 map:ProtocolParameter a d2rq:ClassMap;
    788         d2rq:dataStorage map:database;
    789         d2rq:uriPattern "ProtocolParameter/@@ProtocolParameter.id@@";
    790         d2rq:class vocab:ProtocolParameter;
    791         d2rq:classDefinitionLabel "";
    792         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 ";
    793         .       
    794 # todo: use the xref labels if they are complete
    795 # label for ProtocolParameter using primary key
    796 map:ProtocolParameter__label a d2rq:PropertyBridge;
    797         d2rq:belongsToClassMap map:ProtocolParameter;
    798         d2rq:property rdfs:label;
    799         d2rq:pattern "ProtocolParameter #@@ProtocolParameter.id@@";
    800         .
    801 map:ProtocolParameter_protocol a d2rq:PropertyBridge;
    802         d2rq:belongsToClassMap map:ProtocolParameter;
    803         d2rq:property vocab:ProtocolParameter_protocol;
    804         d2rq:propertyDefinitionLabel "protocol";
    805         d2rq:propertyDefinitionComment "protocol";
    806         d2rq:refersToClassMap map:Protocol;
    807         d2rq:join "ProtocolParameter.protocol => Protocol.id";
    808         .
    809 map:ProtocolParameter_id a d2rq:PropertyBridge;
    810         d2rq:belongsToClassMap map:ProtocolParameter;
    811         d2rq:property vocab:ProtocolParameter_id;
    812         d2rq:propertyDefinitionLabel "id";
    813         d2rq:propertyDefinitionComment "Automatically generated id-field";
    814         d2rq:column "ProtocolParameter.id";
    815         d2rq:datatype xsd:int;
    816         .
    817 # Entity ParameterValue
    818 map:ParameterValue a d2rq:ClassMap;
    819         d2rq:dataStorage map:database;
    820         d2rq:uriPattern "ParameterValue/@@ParameterValue.id@@";
    821         d2rq:class vocab:ParameterValue;
    822         d2rq:classDefinitionLabel "Parameter Value";
    823         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. ";
    824         .       
    825 # todo: use the xref labels if they are complete
    826 # label for ParameterValue using primary key
    827 map:ParameterValue__label a d2rq:PropertyBridge;
    828         d2rq:belongsToClassMap map:ParameterValue;
    829         d2rq:property rdfs:label;
    830         d2rq:pattern "ParameterValue #@@ParameterValue.id@@";
    831         .
    832 map:ParameterValue_protocolApplication a d2rq:PropertyBridge;
    833         d2rq:belongsToClassMap map:ParameterValue;
    834         d2rq:property vocab:ParameterValue_protocolApplication;
    835         d2rq:propertyDefinitionLabel "protocolApplication";
    836         d2rq:propertyDefinitionComment "Reference to the protocol application for which this parameter value was chosen for";
    837         d2rq:refersToClassMap map:ProtocolApplication;
    838         d2rq:join "ParameterValue.protocolApplication => ProtocolApplication.id";
    839         .
    840 map:ParameterValue_protocolParameter a d2rq:PropertyBridge;
    841         d2rq:belongsToClassMap map:ParameterValue;
    842         d2rq:property vocab:ParameterValue_protocolParameter;
    843         d2rq:propertyDefinitionLabel "protocolParameter";
    844         d2rq:propertyDefinitionComment "Reference to the protocol parameter that is being bound by this value";
    845         d2rq:refersToClassMap map:ProtocolParameter;
    846         d2rq:join "ParameterValue.protocolParameter => ProtocolParameter.id";
    847         .
    848 map:ParameterValue_value a d2rq:PropertyBridge;
    849         d2rq:belongsToClassMap map:ParameterValue;
    850         d2rq:property vocab:ParameterValue_value;
    851         d2rq:propertyDefinitionLabel "value";
    852         d2rq:propertyDefinitionComment "The chosen value of the parameter within this protocol application";
    853         d2rq:column "ParameterValue.value";
    854         d2rq:datatype xsd:string;
    855         .
    856 map:ParameterValue_id a d2rq:PropertyBridge;
    857         d2rq:belongsToClassMap map:ParameterValue;
    858         d2rq:property vocab:ParameterValue_id;
    859         d2rq:propertyDefinitionLabel "id";
    860         d2rq:propertyDefinitionComment "Automatically generated id-field";
    861         d2rq:column "ParameterValue.id";
    862         d2rq:datatype xsd:int;
    863         .
    864 # Entity Contact
    865 map:Contact a d2rq:ClassMap;
    866         d2rq:dataStorage map:database;
    867         d2rq:uriPattern "Contact/@@Contact.id@@";
    868         d2rq:class vocab:Contact;
    869         d2rq:classDefinitionLabel "";
    870         d2rq:classDefinitionComment " A contact is either a person or an organization. Copied from FuGE::Contact. ";
    871         .       
    872 # todo: use the xref labels if they are complete
    873 # label for Contact using primary key
    874 map:Contact__label a d2rq:PropertyBridge;
    875         d2rq:belongsToClassMap map:Contact;
    876         d2rq:property rdfs:label;
    877         d2rq:pattern "Contact #@@Contact.id@@";
    878         .
    879 map:Contact_firstName a d2rq:PropertyBridge;
    880         d2rq:belongsToClassMap map:Contact;
    881         d2rq:property vocab:Contact_FirstName;
    882         d2rq:propertyDefinitionLabel "First Name";
    883         d2rq:propertyDefinitionComment "First Name";
    884         d2rq:column "Contact.FirstName";
    885         d2rq:datatype xsd:string;
    886         .
    887 map:Contact_midInitials a d2rq:PropertyBridge;
    888         d2rq:belongsToClassMap map:Contact;
    889         d2rq:property vocab:Contact_MidInitials;
    890         d2rq:propertyDefinitionLabel "Mid Initials";
    891         d2rq:propertyDefinitionComment "Mid Initials";
    892         d2rq:column "Contact.MidInitials";
    893         d2rq:datatype xsd:string;
    894         .
    895 map:Contact_lastName a d2rq:PropertyBridge;
    896         d2rq:belongsToClassMap map:Contact;
    897         d2rq:property vocab:Contact_LastName;
    898         d2rq:propertyDefinitionLabel "Last Name";
    899         d2rq:propertyDefinitionComment "Last Name";
    900         d2rq:column "Contact.LastName";
    901         d2rq:datatype xsd:string;
    902         .
    903 map:Contact_affiliation a d2rq:PropertyBridge;
    904         d2rq:belongsToClassMap map:Contact;
    905         d2rq:property vocab:Contact_Affiliation;
    906         d2rq:propertyDefinitionLabel "Affiliation";
    907         d2rq:propertyDefinitionComment "Affiliation";
    908         d2rq:refersToClassMap map:Institute;
    909         d2rq:join "Contact.Affiliation => Institute.id";
    910         .
    911 map:Contact_roles a d2rq:PropertyBridge;
    912         d2rq:belongsToClassMap map:Contact;
    913         d2rq:property vocab:Contact_Roles;
    914         d2rq:propertyDefinitionLabel "Roles";
    915         d2rq:propertyDefinitionComment "Roles";
    916         d2rq:refersToClassMap map:OntologyTerm;
    917         d2rq:join "Contact.id <= Contact_Roles.Contact";
    918         d2rq:join "Contact_Roles.Roles => OntologyTerm.id";
    919         .
    920 map:Contact_address a d2rq:PropertyBridge;
    921         d2rq:belongsToClassMap map:Contact;
    922         d2rq:property vocab:Contact_Address;
    923         d2rq:propertyDefinitionLabel "Address";
    924         d2rq:propertyDefinitionComment "The address of the Contact.";
    925         d2rq:column "Contact.Address";
    926         d2rq:datatype xsd:text;
    927         .
    928 map:Contact_phone a d2rq:PropertyBridge;
    929         d2rq:belongsToClassMap map:Contact;
    930         d2rq:property vocab:Contact_Phone;
    931         d2rq:propertyDefinitionLabel "Phone";
    932         d2rq:propertyDefinitionComment "The telephone number of the Contact including the suitable area codes.";
    933         d2rq:column "Contact.Phone";
    934         d2rq:datatype xsd:string;
    935         .
    936 map:Contact_email a d2rq:PropertyBridge;
    937         d2rq:belongsToClassMap map:Contact;
    938         d2rq:property vocab:Contact_Email;
    939         d2rq:propertyDefinitionLabel "Email";
    940         d2rq:propertyDefinitionComment "The email address of the Contact.";
    941         d2rq:column "Contact.Email";
    942         d2rq:datatype xsd:string;
    943         .
    944 map:Contact_fax a d2rq:PropertyBridge;
    945         d2rq:belongsToClassMap map:Contact;
    946         d2rq:property vocab:Contact_Fax;
    947         d2rq:propertyDefinitionLabel "Fax";
    948         d2rq:propertyDefinitionComment "The fax number of the Contact.";
    949         d2rq:column "Contact.Fax";
    950         d2rq:datatype xsd:string;
    951         .
    952 map:Contact_tollFreePhone a d2rq:PropertyBridge;
    953         d2rq:belongsToClassMap map:Contact;
    954         d2rq:property vocab:Contact_tollFreePhone;
    955         d2rq:propertyDefinitionLabel "tollFreePhone";
    956         d2rq:propertyDefinitionComment "A toll free phone number for the Contact, including suitable area codes.";
    957         d2rq:column "Contact.tollFreePhone";
    958         d2rq:datatype xsd:string;
    959         .
    960 map:Contact_labworker a d2rq:PropertyBridge;
    961         d2rq:belongsToClassMap map:Contact;
    962         d2rq:property vocab:Contact_labworker;
    963         d2rq:propertyDefinitionLabel "labworker";
    964         d2rq:propertyDefinitionComment "Indicate whether the contact is a labworker";
    965         d2rq:column "Contact.labworker";
    966         d2rq:datatype xsd:boolean;
    967         .
    968 map:Contact_id a d2rq:PropertyBridge;
    969         d2rq:belongsToClassMap map:Contact;
    970         d2rq:property vocab:Contact_id;
    971         d2rq:propertyDefinitionLabel "id";
    972         d2rq:propertyDefinitionComment "Automatically generated id-field";
    973         d2rq:column "Contact.id";
    974         d2rq:datatype xsd:int;
    975         .
    976 # Entity Institute
    977 map:Institute a d2rq:ClassMap;
    978         d2rq:dataStorage map:database;
    979         d2rq:uriPattern "Institute/@@Institute.id@@";
    980         d2rq:class vocab:Institute;
    981         d2rq:classDefinitionLabel "";
    982         d2rq:classDefinitionComment " A contact is either a person or an organization. Copied from FuGE::Contact. ";
    983         .       
    984 # todo: use the xref labels if they are complete
    985 # label for Institute using primary key
    986 map:Institute__label a d2rq:PropertyBridge;
    987         d2rq:belongsToClassMap map:Institute;
    988         d2rq:property rdfs:label;
    989         d2rq:pattern "Institute #@@Institute.id@@";
    990         .
    991 map:Institute_address a d2rq:PropertyBridge;
    992         d2rq:belongsToClassMap map:Institute;
    993         d2rq:property vocab:Institute_Address;
    994         d2rq:propertyDefinitionLabel "Address";
    995         d2rq:propertyDefinitionComment "The address of the Contact.";
    996         d2rq:column "Institute.Address";
    997         d2rq:datatype xsd:text;
    998         .
    999 map:Institute_phone a d2rq:PropertyBridge;
    1000         d2rq:belongsToClassMap map:Institute;
    1001         d2rq:property vocab:Institute_Phone;
    1002         d2rq:propertyDefinitionLabel "Phone";
    1003         d2rq:propertyDefinitionComment "The telephone number of the Contact including the suitable area codes.";
    1004         d2rq:column "Institute.Phone";
    1005         d2rq:datatype xsd:string;
    1006         .
    1007 map:Institute_email a d2rq:PropertyBridge;
    1008         d2rq:belongsToClassMap map:Institute;
    1009         d2rq:property vocab:Institute_Email;
    1010         d2rq:propertyDefinitionLabel "Email";
    1011         d2rq:propertyDefinitionComment "The email address of the Contact.";
    1012         d2rq:column "Institute.Email";
    1013         d2rq:datatype xsd:string;
    1014         .
    1015 map:Institute_fax a d2rq:PropertyBridge;
    1016         d2rq:belongsToClassMap map:Institute;
    1017         d2rq:property vocab:Institute_Fax;
    1018         d2rq:propertyDefinitionLabel "Fax";
    1019         d2rq:propertyDefinitionComment "The fax number of the Contact.";
    1020         d2rq:column "Institute.Fax";
    1021         d2rq:datatype xsd:string;
    1022         .
    1023 map:Institute_tollFreePhone a d2rq:PropertyBridge;
    1024         d2rq:belongsToClassMap map:Institute;
    1025         d2rq:property vocab:Institute_tollFreePhone;
    1026         d2rq:propertyDefinitionLabel "tollFreePhone";
    1027         d2rq:propertyDefinitionComment "A toll free phone number for the Contact, including suitable area codes.";
    1028         d2rq:column "Institute.tollFreePhone";
    1029         d2rq:datatype xsd:string;
    1030         .
    1031 map:Institute_id a d2rq:PropertyBridge;
    1032         d2rq:belongsToClassMap map:Institute;
    1033         d2rq:property vocab:Institute_id;
    1034         d2rq:propertyDefinitionLabel "id";
    1035         d2rq:propertyDefinitionComment "Automatically generated id-field";
    1036         d2rq:column "Institute.id";
    1037         d2rq:datatype xsd:int;
    1038         .
    1039 # Entity Biobank
    1040 map:Biobank a d2rq:ClassMap;
    1041         d2rq:dataStorage map:database;
    1042         d2rq:uriPattern "Biobank/@@Biobank.id@@";
    1043         d2rq:class vocab:Biobank;
    1044         d2rq:classDefinitionLabel "";
    1045         d2rq:classDefinitionComment "Describes one biobank cohort ";
    1046         .       
    1047 # todo: use the xref labels if they are complete
    1048 # label for Biobank using primary key
    1049 map:Biobank__label a d2rq:PropertyBridge;
    1050         d2rq:belongsToClassMap map:Biobank;
    1051         d2rq:property rdfs:label;
    1052         d2rq:pattern "Biobank #@@Biobank.id@@";
    1053         .
    1054 map:Biobank_acronym a d2rq:PropertyBridge;
    1055         d2rq:belongsToClassMap map:Biobank;
    1056         d2rq:property vocab:Biobank_Acronym;
    1057         d2rq:propertyDefinitionLabel "Acronym";
    1058         d2rq:propertyDefinitionComment "Acronym for this biobank";
    1059         d2rq:column "Biobank.Acronym";
    1060         d2rq:datatype xsd:string;
    1061         .
    1062 map:Biobank_institutes a d2rq:PropertyBridge;
    1063         d2rq:belongsToClassMap map:Biobank;
    1064         d2rq:property vocab:Biobank_Institutes;
    1065         d2rq:propertyDefinitionLabel "Institutes";
    1066         d2rq:propertyDefinitionComment "Institute that are custodian of this biobank";
    1067         d2rq:refersToClassMap map:Institute;
    1068         d2rq:join "Biobank.id <= BiobankInstitute.Biobank";
    1069         d2rq:join "BiobankInstitute.Institutes => Institute.id";
    1070         .
    1071 map:Biobank_publications a d2rq:PropertyBridge;
    1072         d2rq:belongsToClassMap map:Biobank;
    1073         d2rq:property vocab:Biobank_Publications;
    1074         d2rq:propertyDefinitionLabel "Publications";
    1075         d2rq:propertyDefinitionComment "Publications for this biobank";
    1076         d2rq:refersToClassMap map:Publication;
    1077         d2rq:join "Biobank.id <= Biobank_Publications.Biobank";
    1078         d2rq:join "Biobank_Publications.Publications => Publication.id";
    1079         .
    1080 map:Biobank_category a d2rq:PropertyBridge;
    1081         d2rq:belongsToClassMap map:Biobank;
    1082         d2rq:property vocab:Biobank_Category;
    1083         d2rq:propertyDefinitionLabel "Category";
    1084         d2rq:propertyDefinitionComment "Category";
    1085         d2rq:refersToClassMap map:OntologyTerm;
    1086         d2rq:join "Biobank.Category => OntologyTerm.id";
    1087         .
    1088 map:Biobank_type a d2rq:PropertyBridge;
    1089         d2rq:belongsToClassMap map:Biobank;
    1090         d2rq:property vocab:Biobank_Type;
    1091         d2rq:propertyDefinitionLabel "Type";
    1092         d2rq:propertyDefinitionComment "Type";
    1093         d2rq:column "Biobank.Type";
    1094         d2rq:datatype xsd:string;
    1095         .
    1096 map:Biobank_contacts a d2rq:PropertyBridge;
    1097         d2rq:belongsToClassMap map:Biobank;
    1098         d2rq:property vocab:Biobank_Contacts;
    1099         d2rq:propertyDefinitionLabel "Contacts";
    1100         d2rq:propertyDefinitionComment "Contact for this biobank";
    1101         d2rq:refersToClassMap map:Contact;
    1102         d2rq:join "Biobank.id <= BiobankContact.Biobank";
    1103         d2rq:join "BiobankContact.Contacts => Contact.id";
    1104         .
    1105 map:Biobank_topics a d2rq:PropertyBridge;
    1106         d2rq:belongsToClassMap map:Biobank;
    1107         d2rq:property vocab:Biobank_Topics;
    1108         d2rq:propertyDefinitionLabel "Topics";
    1109         d2rq:propertyDefinitionComment "Topics";
    1110         d2rq:refersToClassMap map:OntologyTerm;
    1111         d2rq:join "Biobank.id <= Biobank_Topics.Biobank";
    1112         d2rq:join "Biobank_Topics.Topics => OntologyTerm.id";
    1113         .
    1114 map:Biobank_materials a d2rq:PropertyBridge;
    1115         d2rq:belongsToClassMap map:Biobank;
    1116         d2rq:property vocab:Biobank_Materials;
    1117         d2rq:propertyDefinitionLabel "Materials";
    1118         d2rq:propertyDefinitionComment "Materials";
    1119         d2rq:refersToClassMap map:OntologyTerm;
    1120         d2rq:join "Biobank.id <= Biobank_Materials.Biobank";
    1121         d2rq:join "Biobank_Materials.Materials => OntologyTerm.id";
    1122         .
    1123 map:Biobank_size a d2rq:PropertyBridge;
    1124         d2rq:belongsToClassMap map:Biobank;
    1125         d2rq:property vocab:Biobank_Size;
    1126         d2rq:propertyDefinitionLabel "Size";
    1127         d2rq:propertyDefinitionComment "Size";
    1128         d2rq:column "Biobank.Size";
    1129         d2rq:datatype xsd:string;
    1130         .
    1131 map:Biobank_lastUpdate a d2rq:PropertyBridge;
    1132         d2rq:belongsToClassMap map:Biobank;
    1133         d2rq:property vocab:Biobank_LastUpdate;
    1134         d2rq:propertyDefinitionLabel "LastUpdate";
    1135         d2rq:propertyDefinitionComment "LastUpdate";
    1136         d2rq:column "Biobank.LastUpdate";
    1137         d2rq:datatype xsd:date;
    1138         .
    1139 map:Biobank_description a d2rq:PropertyBridge;
    1140         d2rq:belongsToClassMap map:Biobank;
    1141         d2rq:property vocab:Biobank_Description;
    1142         d2rq:propertyDefinitionLabel "Description";
    1143         d2rq:propertyDefinitionComment "Description";
    1144         d2rq:column "Biobank.Description";
    1145         d2rq:datatype xsd:text;
    1146         .
    1147 map:Biobank_id a d2rq:PropertyBridge;
    1148         d2rq:belongsToClassMap map:Biobank;
    1149         d2rq:property vocab:Biobank_id;
    1150         d2rq:propertyDefinitionLabel "id";
    1151         d2rq:propertyDefinitionComment "Automatically generated id-field";
    1152         d2rq:column "Biobank.id";
    1153         d2rq:datatype xsd:int;
    1154         .
    1155 # Entity Publication
    1156 map:Publication a d2rq:ClassMap;
    1157         d2rq:dataStorage map:database;
    1158         d2rq:uriPattern "Publication/@@Publication.id@@";
    1159         d2rq:class vocab:Publication;
    1160         d2rq:classDefinitionLabel "";
    1161         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. ";
    1162         .       
    1163 # todo: use the xref labels if they are complete
    1164 # label for Publication using primary key
    1165 map:Publication__label a d2rq:PropertyBridge;
    1166         d2rq:belongsToClassMap map:Publication;
    1167         d2rq:property rdfs:label;
    1168         d2rq:pattern "Publication #@@Publication.id@@";
    1169         .
    1170 map:Publication_pubmedID a d2rq:PropertyBridge;
    1171         d2rq:belongsToClassMap map:Publication;
    1172         d2rq:property vocab:Publication_PubmedID;
    1173         d2rq:propertyDefinitionLabel "Pubmed ID";
    1174         d2rq:propertyDefinitionComment "Pubmed ID";
    1175         d2rq:column "Publication.PubmedID";
    1176         d2rq:datatype xsd:string;
    1177         .
    1178 map:Publication_dOI a d2rq:PropertyBridge;
    1179         d2rq:belongsToClassMap map:Publication;
    1180         d2rq:property vocab:Publication_DOI;
    1181         d2rq:propertyDefinitionLabel "Publication DOI";
    1182         d2rq:propertyDefinitionComment "Publication DOI";
    1183         d2rq:column "Publication.DOI";
    1184         d2rq:datatype xsd:string;
    1185         .
    1186 map:Publication_authorList a d2rq:PropertyBridge;
    1187         d2rq:belongsToClassMap map:Publication;
    1188         d2rq:property vocab:Publication_authorList;
    1189         d2rq:propertyDefinitionLabel "authorList";
    1190         d2rq:propertyDefinitionComment "The names of the authors of the publication";
    1191         d2rq:column "Publication.authorList";
    1192         d2rq:datatype xsd:text;
    1193         .
    1194 map:Publication_title a d2rq:PropertyBridge;
    1195         d2rq:belongsToClassMap map:Publication;
    1196         d2rq:property vocab:Publication_Title;
    1197         d2rq:propertyDefinitionLabel "Publication Title";
    1198         d2rq:propertyDefinitionComment "The title of the Publication";
    1199         d2rq:column "Publication.Title";
    1200         d2rq:datatype xsd:string;
    1201         .
    1202 map:Publication_status a d2rq:PropertyBridge;
    1203         d2rq:belongsToClassMap map:Publication;
    1204         d2rq:property vocab:Publication_Status;
    1205         d2rq:propertyDefinitionLabel "Publication Status";
    1206         d2rq:propertyDefinitionComment "The status of the Publication";
    1207         d2rq:refersToClassMap map:OntologyTerm;
    1208         d2rq:join "Publication.Status => OntologyTerm.id";
    1209         .
    1210 map:Publication_id a d2rq:PropertyBridge;
    1211         d2rq:belongsToClassMap map:Publication;
    1212         d2rq:property vocab:Publication_id;
    1213         d2rq:propertyDefinitionLabel "id";
    1214         d2rq:propertyDefinitionComment "Automatically generated id-field";
    1215         d2rq:column "Publication.id";
    1216         d2rq:datatype xsd:int;
    1217         .
     58}}}
     59 * Find the right class map. Below the class map, there's a property
    121860
    1219 }}}
     61bridge for each column. Find the right one. 
    122062
     63 * '''Change its !d2rq:property value to the FOAF term, e.g., !foaf:name. '''
     64 * '''You also have to make sure that the FOAF namespace is declared in the @prefix section at the very beginning of the file.'''
     65 * Or that I have a table column whose values map elements from the !DailyMed D2R database?
    122166
    1222 
    1223 Find the right class map. Below the class map, there's a property[[BR]]bridge for each column. Find the right one. Change its !d2rq:property [[BR]]value to the FOAF term, e.g., !foaf:name. You also have to make sure[[BR]]that the FOAF namespace is declared in the @prefix section at the very[[BR]]beginning of the file.[[BR]][[BR]]> Or that I have a[[BR]]> table column whose values map elements from the !DailyMed D2R database?[[BR]]Instead of mapping the column to a literal with !d2rq:column, use a[[BR]]!d2rq:uriPattern that produces URIs that match the URIs in the other[[BR]]dataset.
     67Instead of mapping the column to a literal with !d2rq:column, use a[[BR]]!d2rq:uriPattern that produces URIs that match the URIs in the other[[BR]]dataset.