Skip to content
This repository has been archived by the owner on Nov 24, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Configuration Manager committed Aug 27, 2019
2 parents 260cbea + 51a98ef commit 17386c2
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 78 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ It provides:

## Libraries usage

The goal of the libraries is to simplify the conversion of raw data (e.g. .csv or xml file) in RDF. There are tons of tools to do this job and this is yet another. The idea is just to use PHP to do trivial data conversion instead to build and configure complex tool.

With BOTK you define simple models to describe things with a plain set of properties ( e.g a Business Entity, a contact, a product). Then a FactFactory processor cleans data and translates attributes in a RDF graph according with BOTK language profile.
More or less this is what you have to do do when process csv or excel files row by row.

With BOTK libraries it is easy to create "gateways" ie processors that get in stdin a data stream producing in sdout a RDF turtle stream

For example this code snippet:

```php
Expand Down Expand Up @@ -68,7 +75,7 @@ processes this csv dataset:
| 314 | ASL della Provincia di Varese | 3876 | VA0139 | Farmacia DELLA BRUNELLA Dr. Prof. A. RIGAMONTI | Via Salvo D'Acquisto, 2 | Varese | 0332289300 | 0332214856 | farmacia_brunella@libero.it | urbana | | true | 45.822059 | 8.818115 | (45.822059, 8.818115) |
| 303 | ASL della Provincia di Como | 2100 | CO0392 | Farmacia Tagliabue Dr. Diego Maria | VIA ADUA, 9 | Magreglio | 031965123 | | farmmagreglio@tiscalinet.it | rurale sussidiata | true | true | 45.92146 | 9.26228 | (45.92146, 9.26228) |

producing this rdf file:
and produces this rdf file:

```turtle
@prefix botk: <http://linkeddata.center/botk/v1#> .
Expand Down Expand Up @@ -145,6 +152,8 @@ The the dataset processing is driven by the SimpleCsvGateway class that uses a s
**modelOptions** override the default field options provided by the selected model in the $DEFAULT_OPTIONS variable.
For example see this code snippet extracted from [Thing model](src\Model\Thing.php) that is a superclass of [LocalBusiness model](src\Model\LocalBusiness.php)

Configuring models Options you can force field clenacing and validation.

```php
...
'uri' => array(
Expand Down
159 changes: 82 additions & 77 deletions vocabularies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Following vocabularies are partially supported:
BOTK vocabulary extends schema.org with some custom properties and restrictions.
SKOS vocabulary is used to categorize things

The primary focus o BOTK are:
The primary focus of BOTK language profile are:

- **Local Businesses**, defined as a legal business organization with a physical postal address contact point. Modelled as schema:LocalBusiness
- **Business contacts**, modelled as a schema:Person, it define the business identity of a person (i.e. his/her business card)
- **Products**, modeled as schema:Product
Expand All @@ -44,11 +45,12 @@ BOTK extends and introduces some restrictions to the supported ontologies.

## String context restriction

No string context should be used to qualify strings.
As default policy, no string context should be used to qualify strings.

## schema:Things

- botk:similarTo a less stringent property than owl:sameAs
- botk:similarTo a less stringent property than owl:sameAs. Has cardinality >= 0 and a URI as range.
It is reflexive and transitive but not associative.

## schema:QuantitativeValue

Expand All @@ -65,85 +67,85 @@ if schema:value with cardinality = 1 then schema:minValue = schema:maxValue =sch
Just a virtual collection of LocalBusiness and BusinessContact with some statistic data.
Extends schema:Organization with following properties and restrictions:

- botk:ateco2007 with cardinality >=0
- botk:naceV2 with cardinality >=0
- [schema:isicV4 ](http://schema.org/isicV4 )with cardinality =>0
- botk:hasServerManufacturer with cardinality >=0
- botk:hasServerVirtualizationManufacturer with cardinality >=0
- botk:hasDASManufacturer with cardinality >=0
- botk:hasNASManufacturer with cardinality >=0
- botk:hasSANManufacturer with cardinality >=0
- botk:hasTapeLibraryManufacturer with cardinality >=0
- botk:hasStorageVirtualizationManufacturer with cardinality >=0
- botk:naics with cardinality >=0
- botk:hasNAFCode with cardinality >=0
- botk:hasServerSeries with cardinality >=0
- botk:hasDesktopManufacturer with cardinality >=0
- botk:hasLaptopManufacturer with cardinality >=0
- botk:hasDesktopVirtualizationManufacturer with cardinality >=0
- botk:hasWorkstationManufacturer with cardinality >=0
- botk:hasNetworkPrinterManufacturer with cardinality >=0
- botk:hasHighVolumePrinterManufacturer with cardinality >=0
- botk:hasCopierManufacturer with cardinality >=0
- botk:hasUPSManufacturer with cardinality >=0
- botk:hasERPSuiteVendor with cardinality >=0
- botk:hasERPSoftwareasaServiceManufacturer with cardinality >=0
- botk:hasAppServerSoftwareVendor with cardinality >=0
- botk:hasBusIntellSoftwareVendor with cardinality >=0
- botk:hasCollaborativeSoftwareVendor with cardinality >=0
- botk:hasCRMSoftwareVendor with cardinality <>=0
- botk:hasCRMSoftwareasaServiceManufacturer with cardinality >=0
- botk:hasDocumentMgmtSoftwareVendor with cardinality >=0
- botk:hasAppConsolidationSoftwareVendor with cardinality >=0
- botk:hasHumanResourceSoftwareVendor with cardinality >=0
- botk:hasSupplyChainSoftwareVendor with cardinality >=0
- botk:hasWebServiceSoftwareVendor with cardinality >=0
- botk:hasDatawarehouseSoftwareVendor with cardinality >=0
- botk:hasSaaSVendor with cardinality >=0
- botk:hasEmailMessagingVendor with cardinality >=0
- botk:hasEmailSaaSManufacturer with cardinality >=0
- botk:hasOSVendor with cardinality >=0
- botk:hasOSModel with cardinality >=0
- botk:hasDBMSVendor with cardinality >=0
- botk:hasAcctingVendor with cardinality >=0
- botk:hasAntiVirusVendor with cardinality >=0
- botk:hasAssetManagementSoftwareVendor with cardinality >=0
- botk:hasEnterpriseManagementSoftwareVendor with cardinality >=0
- botk:hasIDAccessSoftwareVendor with cardinality >=0
- botk:hasStorageManagementSoftwareVendor with cardinality >=0
- botk:hasStorageSaaSManufacturer with cardinality >=0
- botk:hasEthernetTechnology with cardinality >=0
- botk:haseCommerceType with cardinality >=0
- botk:hasHostorRemoteStatus with cardinality <=1
- botk:hasNetworkLineCarrier with cardinality >=0
- botk:hasVideoConfServicesProvider with cardinality >=0
- botk:hasUnifiedCommSvcProvider with cardinality >=0
- botk:hasRouterManufacturer with cardinality >=0
- botk:hasSwitchManufacturer with cardinality >=0
- botk:hasVPNManufacturer with cardinality >=0
- botk:hasISP with cardinality >=0
- botk:hasNetworkServiceProvider with cardinality >=0
- botk:hasPhoneSystemManufacturer with cardinality >=0
- botk:hasVoIPManufacturer with cardinality >=0
- botk:hasVoIPHosting with cardinality >=0
- botk:hasLongDistanceCarrier with cardinality >=0
- botk:hasWirelessProvider with cardinality >=0
- botk:hasPhoneSystemMaintenanceProvider with cardinality >=0
- botk:hasSmartphoneManufacturer with cardinality >=0
- botk:hasSmartphoneOS with cardinality >=0
- botk:hasFYE with cardinality <=1
- [schema:foundingDate](http://schema.org/foundingDate) with cardinality <=1
- [schema:subOrganization ](http://schema.org/subOrganization )with cardinality >= 0
- botk:ateco2007 with cardinality >=0 ( as a skos skos:notation label)
- botk:naceV2 with cardinality >=0 ( as a skos skos:notation label)
- [schema:isicV4 ](http://schema.org/isicV4 )with cardinality =>0 ( as a skos skos:notation label)
- botk:hasServerManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasServerVirtualizationManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasDASManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasNASManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasSANManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasTapeLibraryManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasStorageVirtualizationManufacturer with cardinality >=0 (as a skos alt label)
- botk:naics with cardinality >=0 as a skos skos:notation label)
- botk:hasNAFCode with cardinality >=0 as a skos skos:notation label)
- botk:hasServerSeries with cardinality >=0 (as a skos alt label)
- botk:hasDesktopManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasLaptopManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasDesktopVirtualizationManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasWorkstationManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasNetworkPrinterManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasHighVolumePrinterManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasCopierManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasUPSManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasERPSuiteVendor with cardinality >=0 (as a skos alt label)
- botk:hasERPSoftwareasaServiceManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasAppServerSoftwareVendor with cardinality >=0 (as a skos alt label)
- botk:hasBusIntellSoftwareVendor with cardinality >=0 (as a skos alt label)
- botk:hasCollaborativeSoftwareVendor with cardinality >=0 (as a skos alt label)
- botk:hasCRMSoftwareVendor with cardinality <>=0 (as a skos alt label)
- botk:hasCRMSoftwareasaServiceManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasDocumentMgmtSoftwareVendor with cardinality >=0 (as a skos alt label)
- botk:hasAppConsolidationSoftwareVendor with cardinality >=0 (as a skos alt label)
- botk:hasHumanResourceSoftwareVendor with cardinality >=0 (as a skos alt label))
- botk:hasSupplyChainSoftwareVendor with cardinality >=0 (as a skos alt label)
- botk:hasWebServiceSoftwareVendor with cardinality >=0 (as a skos alt label)
- botk:hasDatawarehouseSoftwareVendor with cardinality >=0 (as a skos alt label)
- botk:hasSaaSVendor with cardinality >=0 (as a skos alt label)
- botk:hasEmailMessagingVendor with cardinality >=0 (as a skos alt label)
- botk:hasEmailSaaSManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasOSVendor with cardinality >=0 (as a skos alt label)
- botk:hasOSModel with cardinality >=0 (as a skos alt label)
- botk:hasDBMSVendor with cardinality >=0 (as a skos alt label)
- botk:hasAcctingVendor with cardinality >=0 (as a skos alt label)
- botk:hasAntiVirusVendor with cardinality >=0 (as a skos alt label)
- botk:hasAssetManagementSoftwareVendor with cardinality >=0 (as a skos alt label)
- botk:hasEnterpriseManagementSoftwareVendor with cardinality >=0 (as a skos alt label)
- botk:hasIDAccessSoftwareVendor with cardinality >=0 (as a skos alt label)
- botk:hasStorageManagementSoftwareVendor with cardinality >=0 (as a skos alt label)
- botk:hasStorageSaaSManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasEthernetTechnology with cardinality >=0 (as a skos alt label)
- botk:haseCommerceType with cardinality >=0 (as a skos alt label)
- botk:hasHostorRemoteStatus with cardinality <=1 (as a skos alt label)
- botk:hasNetworkLineCarrier with cardinality >=0 (as a skos alt label)
- botk:hasVideoConfServicesProvider with cardinality >=0 (as a skos alt label)
- botk:hasUnifiedCommSvcProvider with cardinality >=0 (as a skos alt label)
- botk:hasRouterManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasSwitchManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasVPNManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasISP with cardinality >=0 (as a skos alt label)
- botk:hasNetworkServiceProvider with cardinality >=0 (as a skos alt label)
- botk:hasPhoneSystemManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasVoIPManufacturer with cardinality >=0 (as a data cube osservable)
- botk:hasVoIPHosting with cardinality >=0 (as a skos alt label)
- botk:hasLongDistanceCarrier with cardinality >=0 (as a skos alt label)
- botk:hasWirelessProvider with cardinality >=0 (as a skos alt label)
- botk:hasPhoneSystemMaintenanceProvider with cardinality >=0 (as a skos alt label)
- botk:hasSmartphoneManufacturer with cardinality >=0 (as a skos alt label)
- botk:hasSmartphoneOS with cardinality >=0 (as a skos alt label)
- botk:hasFYE with cardinality <=1 (as a data cube osservable)
- [schema:foundingDate](http://schema.org/foundingDate) with cardinality <=1 (as a data cube osservable)
- [schema:subOrganization ](http://schema.org/subOrganization )with cardinality >= 0 (as a data cube osservable)


Following statistical dimensions also apply; all these properties have cardinality <=1 and range schema:QuantitativeValue. The range has an implicit unit of measure, and represents the last known value for a dimension.
If you need more control on statistical dimensions you should use the datacube vocabulary (https://www.w3.org/TR/vocab-data-cube/).

- [schema:numberOfEmployees ](http://schema.org/numberOfEmployees )expressend in number of employees
- botk:annualTurnover expressend in a predefined currency
- botk:netProfit expressend in a predefined currency
- botk:itBudget expressend in a predefined currency
- botk:itStorageBudget expressend in a predefined currency
- [schema:numberOfEmployees ](http://schema.org/numberOfEmployees )expressend in number of employees
- botk:annualTurnover expressend in a predefined currency
- botk:netProfit expressend in a predefined currency
- botk:itBudget expressend in a predefined currency
- botk:itStorageBudget expressend in a predefined currency
- botk:itHardwareBudget expressend in a predefined currency
- botk:itServerBudget expressend in a predefined currency
- botk:softwareBudget expressend in a predefined currency
Expand Down Expand Up @@ -240,6 +242,9 @@ ex:org1 a schema:Organization ;
schema:numberOfEmployees [ schema:minValu1e 1000 ; schema:maxValue 2000 ] ;
```

This properies should be intended as shortcuts for data cube observables, dct:identifier specialization or skos vocabularypref labels.


## schema:LocalBusiness

Captures the concept about a public legal registered business organization with an official contact point .
Expand Down

0 comments on commit 17386c2

Please sign in to comment.