Semantic Web-rdf-Workers' projects and used computers in a company according to years -


i want sesame rdf database workers in company. workers involved in projects in date range. have computers. after database, must able search database according computers used people or people worked in projects in past or now. so, cant decide how order attributes of worker, company, project, computer because dont know place attribute year. example, workers' past companies or past projects... how can place year in rdf file below? didnt place year in file in proper way, think. because start , end dates should defined in way or date range? after how search sparql find people working in special project or before now? or people using same computer in different years?

<rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:worker="http://www.semantic.fake/worker#" xmlns:company="http://www.semantic.fake/company" xmlns:project="http://www.semantic.fake/project">  <rdf:description rdf:about="http://www.semantic.fake/worker/worker1">   <worker:worker_name>bill gates</worker:worker_name>   <worker:company_name>microsoft</worker:company_name>   <worker:department>software</worker:department>   <worker:task>co-founder</worker:task>   <worker:project_name>windows9</worker:project_name>   <worker:year>2010</worker:year>  </rdf:description>  <rdf:description rdf:about="http://www.semantic.fake/worker/worker2">   <worker:worker_name>steve jobs</worker:worker_name>   <worker:company_name>apple</worker:company_name>   <worker:department>software</worker:department>   <worker:task>co-founder</worker:task>   <worker:project_name>inertial navigation</worker:project_name>   <worker:year>2008</worker:year>   <worker:computer>lg2</worker:computer> </rdf:description>  <rdf:description rdf:about="http://www.semantic.fake/worker/worker3">   <worker:worker_name>ozge akbulut</worker:worker_name>   <worker:company_name>pozitron</worker:company_name>   <worker:department>software</worker:department>   <worker:task>intern</worker:task>   <worker:project_name>semantic web</worker:project_name>   <worker:year>2013</worker:year>   <worker:computer>lg1</worker:computer> </rdf:description>  <rdf:description rdf:about="http://www.semantic.fake/company/company1">   <company:company_name>pozitron</company:company_name>   <company:location>ayazağa</company:location> </rdf:description>  <rdf:description rdf:about="http://www.semantic.fake/company/company2">   <company:company_name>garanti teknoloji</company:company_name>   <company:location>güneşli</company:location> </rdf:description>  <rdf:description rdf:about="http://www.semantic.fake/company/company3">   <company:company_name>microsoft</company:company_name>   <company:location>us</company:location> </rdf:description>  <rdf:description rdf:about="http://www.semantic.fake/company/company4">   <company:company_name>apple</company:company_name>   <company:location>us</company:location> </rdf:description>  <rdf:description rdf:about="http://www.semantic.fake/project/project1">   <project:project_name>bkm express</project:project_name>   <project:company_name>pozitron</project:company_name>   <project:year>2013</project:year> </rdf:description>  <rdf:description rdf:about="http://www.semantic.fake/project/project2">   <project:project_name>iscep</project:project_name>   <project:company_name>pozitron</project:company_name>   <project:year>2013</project:year> </rdf:description>  <rdf:description rdf:about="http://www.semantic.fake/project/project3">   <project:project_name>semantic web</project:project_name>   <project:company_name>pozitron</project:company_name>   <project:year>2013</project:year> </rdf:description>  <rdf:description rdf:about="http://www.semantic.fake/project/project4">   <project:project_name>inertial navigation</project:project_name>   <project:company_name>apple</project:company_name>   <project:year>2009</project:year> </rdf:description>  <rdf:description rdf:about="http://www.semantic.fake/project/project5">   <project:project_name>windows9</project:project_name>   <project:company_name>microsoft</project:company_name>   <project:year>2011</project:year> </rdf:description>   </rdf:rdf> 

you need step away syntax , think conceptual model. in model, have workers, projects, companies, , departments. recommend represent of these classes in rdf model.

ex:worker rdfs:class . ex:project rdfs:class . ex:company rdfs:class . ex:department rdf:class . 

(as aside, i'm using turtle syntax rdf instead of rdf/xml, because far easier read , edit, , makes actual structure of data far clearer. recommend learn , use instead of rdf/xml)

however, want things employment of people in projects/companies/departments (such when started , when stopped working there). means need represent relationship object in own right, can things it. example, express worker ex:worker1 employed company ex:apple between 2 dates, , later employed company ex:microsoft this:

ex:worker1 ex:worker ;            ex:name "steve jobs";             ex:employment ex:employment1 ;             ex:employment ex:employment2 .  ex:employment1 ex:employmentrelation ;                ex:forcompany ex:apple ;                ex:startdate "20010101t00:00:00z"^^xsd:datetime ;                ex:enddate "20050101t00:00:00z"^^xsd:datetime .  ex:employment2 ex:employmentrelation ;                ex:forcompany ex:microsoft ;                ex:startdate "20060101t00:00:00z"^^xsd:datetime ;                ex:enddate "20080101t00:00:00z"^^xsd:datetime . 

once have data modeled above, if wanted sparql query asking people worked apple between 2 dates, you'd (as simple example):

 select ?worker ?name  { ?worker ex:worker ;                  ex:name ?name ;                  ex:employment [ ex:forcompany ex:apple ;                                  ex:startdate ?start ;                                  ex:enddate ?end ] .          filter (?start > "20001231t00:00:00z"^^xsd:datetime)          filter (?end < "20120101t00:00:00z"^^xsd:datetime  } 

(by way, above shows again why using turtle idea: turtle syntax , sparql query language closely matched - once understand one, other follows naturally).


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -