Skip to content

conversion:ImplicitBundle

timrdf edited this page Feb 5, 2011 · 11 revisions

The first, middle, and last names of visitors are cited in Dataset 10025. Each of these values is describing an unmodeled person. Using an implicit bundle will create a URI for this person and will be described with the bundled first, middle, and last name properties. When the implicit bundle incorporates these properties, it loses its association to the remaining elements of the csv row -- the row needs to connect to the new implicit bundle. The property conversion:property_name is used to cite the local name of the property from the row resource to the new ImplicitBundle.

The type created from conversion:type_name (e.g., "Person"") can be subclassed to an external class (e.g. foaf:Person) using #Subclass enhancement)

@prefix conversion: <http://purl.org/twc/vocab/conversion/> .
@prefix :           <http://logd.tw.rpi.edu/whitehouse-gov/dataset/visitor-records/params/enhancement/1/> .

<font color="#FF0000">:visitor_bundle</font>
   a conversion:ImplicitBundle;
   conversion:property_name "<font color="#FF0000">visitor</font>";
   conversion:type_name     "<font color="#FF0000">Person</font>";
.

:dataset a void:Dataset;
   conversion:base_uri           "http://logd.tw.rpi.edu"^^xsd:anyURI;
   conversion:source_identifier  "whitehouse-gov";
   conversion:dataset_identifier "visitor-records";
   conversion:dataset_version    "2010-Mar-26";
   conversion:conversion_process [
       a conversion:RawConversionProcess;
      conversion:enhancement_identifier "1";
      conversion:enhance [
         ov:csvCol         1;
         ov:csvHeader     "NAMELAST";
         conversion:range  rdfs:Literal;
         conversion:label "Last name";
         <font color="#FF0000">conversion:bundled_by :visitor_bundle;</font>
      ];
      conversion:enhance [
         ov:csvCol         2;
         ov:csvHeader     "NAMEFIRST";
         conversion:range  rdfs:Literal;
         conversion:label "First name";
         <font color="#FF0000">conversion:bundled_by :visitor_bundle;</font>
      ];
      conversion:enhance [
         ov:csvCol         3;
         ov:csvHeader     "NAMEMID";
         conversion:range  rdfs:Literal;
         conversion:label "Middle name";
         <font color="#FF0000">conversion:bundled_by :visitor_bundle;</font>
      ];
   ];
.

with input:

@prefix visitor-records: <http://logd.tw.rpi.edu/source/whitehouse-gov/dataset/visitor-records/version/2010-Mar-26/> .
@prefix raw:             <http://logd.tw.rpi.edu/source/whitehouse-gov/dataset/visitor-records/vocab/raw/> .
@prefix e1:              <http://logd.tw.rpi.edu/source/whitehouse-gov/dataset/visitor-records/vocab/enhancement/1/> .

visitor-records:<font color="#0000FF">thing_1</font> 
  raw:last_name   "AABY";
  raw:first_name  "DONETT";
  raw:middle_name "L";
.

becomes

visitor-records:<font color="#0000FF">thing_1</font>
   e1:<font color="#FF0000">visitor</font> visitor-records:<font color="#FF0000">implicit_visitor_1</font>;
.
visitor-records:<font color="#FF0000">implicit_visitor_1</font> 
   rdf:type        vocab:<font color="#FF0000">Person</font>;
   e1:last_name   "AABY";
   e1:first_name  "DONETT";
   e1:middle_name "L"
.

TODO: version/2009-Oct-02/PROPERTY_NAME/thing_1 (1 == row's thing_1) (when implicit bundle not typed)
TODO: version/2009-Oct-02/PROPERTY_NAME/type_1 (1 == rows's thing_1) (when implicit bundled typed with type_name)

e.g., Dataset 1450

@prefix : <http://logd.tw.rpi.edu/source/data-gov/dataset/1450/params/enhancement/1/> .

:dataset a void:Dataset;
   conversion:base_uri           "http://logd.tw.rpi.edu"^^xsd:anyURI;
   conversion:source_identifier  "data-gov";
   conversion:dataset_identifier "1450";
   conversion:dataset_version    "2009-May-18";
   conversion:conversion_process [
      a conversion:RawConversionProcess;
      conversion:enhancement_identifier "1";

      conversion:enhance [
         ov:csvCol         7;
         ov:csvHeader     "LAST NAME";
         conversion:range  rdfs:Literal;
      ];
      conversion:enhance [
         ov:csvCol         8;
         ov:csvHeader     "FIRST NAME";
         conversion:range  rdfs:Literal;
      ];
      conversion:enhance [
         ov:csvCol         9;
         ov:csvHeader     "MI";
         conversion:range  rdfs:Literal;
      ];

   ];
.

input:

@prefix ds1450: <http://csv2rdf.org/source/data-gov/dataset/1450/version/18-May-2009/> .
@prefix raw:    <http://csv2rdf.org/source/data-gov/dataset/1450/vocab/raw/> .

ds1450:<font color="#0000FF">thing_1</font>
  raw:state                    "Alabama";
  raw:legal_entity_name        "ACCENDO INSURANCE COMPANY";
  raw:organization_name        "RxAmerica";
  raw:organization_description "PDP";
  raw:title                    "Director of Medicare Services";
  raw:last_name                "Low";
  raw:first_name               "Jeff";
  raw:phone                    "1-801-961-6251";
  raw:fax                      "1-801-961-6313";
  raw:email                    "jeff.low@rxamerica.com";
  raw:street_address           "221 N. Charles Lindbergh Dr.";
  raw:city                     "SLC";
  raw:state_2                  "UT";
  raw:zip                      "84116";
  ov:csvRow                     2;
.

becomes

@prefix e1:           <http://csv2rdf.org/source/data-gov/dataset/1450/vocab/enhancement/1/> . 
@prefix legal-entity: <http://csv2rdf.org/source/data-gov/dataset/1450/version/18-May-2009/legal-entity/> .
@prefix organization: <http://csv2rdf.org/source/data-gov/dataset/1450/version/18-May-2009/organization/> .
@prefix state:        <http://csv2rdf.org/source/data-gov/dataset/1450/version/18-May-2009/state/> .
@prefix city:         <http://csv2rdf.org/source/data-gov/dataset/1450/version/18-May-2009/city/> .
@prefix title:        <http://csv2rdf.org/source/data-gov/dataset/1450/version/18-May-2009/title/> .

ds1450:<font color="#0000FF">thing_1</font>
   e1:address                          ds1450:implicit_address_1;
   e1:legal_entity_name          legal-entity:ACCENDO_INSURANCE_COMPANY;
   e1:organization_description "PDP" ;
   e1:organization_name          organization:RxAmerica;
   e1:point_of_contact                 ds1450:implicit_point_of_contact_1;
   e1:state                             state:Alabama;
   ov:csvRow                    2; 
.

ds1450:implicit_address_1
   e1:city             city:SLC;
   e1:state_2         state:UT;
   e1:street_address "221 N. Charles Lindbergh Dr.";
   e1:zip            "84116" 
.

legal-entity:ACCENDO_INSURANCE_COMPANY
   rdfs:label "ACCENDO INSURANCE COMPANY" 
.

organization:RxAmerica
   rdfs:label "RxAmerica" 
.

ds1450:implicit_point_of_contact_1
   e1:email      "jeff.low@rxamerica.com";
   e1:fax        "1-801-961-6313";
   e1:first_name "Jeff";
   e1:last_name  "Low";
   e1:phone      "1-801-961-6251";
   e1:title       title:Director_of_Medicare_Services 
.

title:Director_of_Medicare_Services
   rdfs:label "Director of Medicare Services" 
.

Clone this wiki locally