* 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 [http://www4.wiwiss.fu-berlin.de/bizer/D2RQ/spec/#specification D2R] and some purely semantic : ===[[BR]] * 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 * === 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: . @prefix db: <> . @prefix vocab: . @prefix rdf: . @prefix rdfs: . @prefix xsd: . @prefix d2rq: . @prefix jdbc: . @prefix d2r: . <> a d2r:Server; rdfs:label "D2R Server"; d2r:baseURI ; 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. "; . ................................................................................................................................................. . ................................................................................................................................................. . ................................................................................................................................................. 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; . }}} * 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.''' * === When there is 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. = next todos: = * '''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.''' *