Commit 9772d5ce authored by Andrei Popescu's avatar Andrei Popescu
Browse files

added a method that checks presence of term in the termMap

parent 8e1d564c
Pipeline #57121 passed with stage
in 36 seconds
......@@ -17,7 +17,7 @@ for (var _i = 0, _a = Array.from(schema_object); _i < _a.length; _i++) {
var writer = new N3.Writer({ prefixes: config.prefixes });
var prefix = config.prefix;
traverse_1.Traverse.initialise(writer, prefix);
rdfTools_1.RDFTools.initialise(object); //initialising the filename written by RDF tools with the name of the main object
rdfTools_1.RDFTools.initialise(object, config.terms); //initialising the filename written by RDF tools with the name of the main object
// filename ,
//ShaclTools.initialise(JsonProcessor.getMainObject(), JsonProcessor.mainObject );
traverse_1.Traverse.traverse('schema', schema);
......
......@@ -19,7 +19,7 @@ for (let [schemaPath,object] of Array.from(schema_object)){
let writer = new N3.Writer({prefixes:config.prefixes});
let prefix = config.prefix;
Traverse.initialise(writer, prefix);
RDFTools.initialise(object); //initialising the filename written by RDF tools with the name of the main object
RDFTools.initialise(object, config.terms); //initialising the filename written by RDF tools with the name of the main object
// filename ,
//ShaclTools.initialise(JsonProcessor.getMainObject(), JsonProcessor.mainObject );
Traverse.traverse('schema', schema);
......
@prefix gbfs: <https://w3id.org/gbfs/terms>.
@prefix schema: <http://schema.org/#>.
@prefix ebucore: <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix vann: <http://purl.org/vocab/vann/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix jsonsc: <https://www.w3.org/2019/wot/json-schema#>.
@prefix airs: <https://raw.githubusercontent.com/airs-linked-data/lov/latest/src/airs_vocabulary.ttl#>.
@prefix vso: <http://purl.org/vso/ns#>.
@prefix dbpedia-owl: <http://dbpedia.org/ontology/>.
gbfs:last_updated rdf:type xsd:integer;
rdfs:label "Last time the data in the feed was updated in POSIX time."@en.
gbfs:ttl rdf:type xsd:integer;
rdfs:label "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed)."@en.
gbfs:alerts rdfs:range gbfs:Alerts.
gbfs:Alerts rdf:type rdfs:Class.
gbfs:alert_id rdf:type xsd:string;
rdfs:label "Identifier for this alert."@en.
gbfs:type rdf:type xsd:string;
rdfs:label "Type of alert."@en.
gbfs:Type owl:oneOf (<SYSTEM_CLOSURE> <STATION_CLOSURE> <STATION_MOVE> <OTHER>).
gbfs:times rdfs:range gbfs:Times.
gbfs:Times rdf:type rdfs:Class.
gbfs:start rdf:type xsd:integer;
rdfs:label "undefined"@en.
gbfs:end rdf:type xsd:integer;
rdfs:label "undefined"@en.
gbfs:times rdfs:range gbfs:Times.
gbfs:Times rdfs:hasProperty (<start> <end>).
gbfs:station_ids rdfs:range gbfs:Station_ids.
gbfs:Station_ids rdf:type rdfs:Class.
gbfs:region_ids rdfs:range gbfs:Region_ids.
gbfs:Region_ids rdf:type rdfs:Class.
gbfs:url rdf:type xsd:string;
rdfs:label "URL where the customer can learn more information about this alert."@en.
gbfs:summary rdf:type xsd:string;
rdfs:label "A short summary of this …played to the customer."@en.
gbfs:description rdf:type xsd:string;
rdfs:label "Detailed description of the alert."@en.
gbfs:last_updated rdf:type xsd:integer;
rdfs:label "Indicates the last time the info for the alert was updated."@en.
gbfs:alerts rdfs:range gbfs:Alerts.
gbfs:Alerts rdfs:hasProperty (<alert_id> <type> <times> <station_ids> <region_ids> <url> <summary> <description> <last_updated>).
gbfs:data rdfs:range gbfs:Data.
gbfs:Data rdfs:hasProperty (<alerts>).
gbfs:schema rdfs:range gbfs:Schema.
gbfs:Schema rdfs:hasProperty (<last_updated> <ttl> <data>).
@prefix gbfs: <https://w3id.org/gbfs/terms>.
@prefix schema: <http://schema.org/#>.
@prefix ebucore: <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix vann: <http://purl.org/vocab/vann/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix jsonsc: <https://www.w3.org/2019/wot/json-schema#>.
@prefix airs: <https://raw.githubusercontent.com/airs-linked-data/lov/latest/src/airs_vocabulary.ttl#>.
@prefix vso: <http://purl.org/vso/ns#>.
@prefix dbpedia-owl: <http://dbpedia.org/ontology/>.
gbfs:last_updated rdf:type xsd:integer;
rdfs:label "Last time the data in the feed was updated in POSIX time."@en.
gbfs:ttl rdf:type xsd:integer;
rdfs:label "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed)."@en.
gbfs:bikes rdfs:range gbfs:Bikes.
gbfs:Bikes rdf:type rdfs:Class.
gbfs:bike_id rdf:type xsd:string;
rdfs:label "Rotating (as of v2.0) identifier of a vehicle."@en.
gbfs:lat rdf:type xsd:integer;
rdfs:label "The latitude of the vehicle."@en.
gbfs:lon rdf:type xsd:integer;
rdfs:label "The longitude of the vehicle."@en.
gbfs:bikes rdfs:range gbfs:Bikes.
gbfs:Bikes rdfs:hasProperty (<bike_id> <lat> <lon> <is_reserved> <is_disabled>).
gbfs:data rdfs:range gbfs:Data.
gbfs:Data rdfs:hasProperty (<bikes>).
gbfs:schema rdfs:range gbfs:Schema.
gbfs:Schema rdfs:hasProperty (<last_updated> <ttl> <data>).
@prefix gbfs: <https://w3id.org/gbfs/terms>.
@prefix schema: <http://schema.org/#>.
@prefix ebucore: <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix vann: <http://purl.org/vocab/vann/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix jsonsc: <https://www.w3.org/2019/wot/json-schema#>.
@prefix airs: <https://raw.githubusercontent.com/airs-linked-data/lov/latest/src/airs_vocabulary.ttl#>.
@prefix vso: <http://purl.org/vso/ns#>.
@prefix dbpedia-owl: <http://dbpedia.org/ontology/>.
gbfs:last_updated rdf:type xsd:integer;
rdfs:label "Last time the data in the feed was updated in POSIX time."@en.
gbfs:ttl rdf:type xsd:integer;
rdfs:label "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed)."@en.
gbfs:version rdf:type xsd:string;
rdfs:label "GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1)."@en.
gbfs:calendars rdfs:range gbfs:Calendars.
gbfs:Calendars rdf:type rdfs:Class.
gbfs:start_month rdf:type xsd:integer;
rdfs:label "Starting month for the system operations."@en.
gbfs:start_day rdf:type xsd:integer;
rdfs:label "Starting day for the system operations."@en.
gbfs:start_year rdf:type xsd:integer;
rdfs:label "Starting year for the system operations."@en.
gbfs:end_month rdf:type xsd:integer;
rdfs:label "End month for the system operations."@en.
gbfs:end_day rdf:type xsd:integer;
rdfs:label "End day for the system operations."@en.
gbfs:end_year rdf:type xsd:integer;
rdfs:label "End year for the system operations."@en.
gbfs:calendars rdfs:range gbfs:Calendars.
gbfs:Calendars rdfs:hasProperty (<start_month> <start_day> <start_year> <end_month> <end_day> <end_year>).
gbfs:data rdfs:range gbfs:Data.
gbfs:Data rdfs:hasProperty (<calendars>).
gbfs:schema rdfs:range gbfs:Schema.
gbfs:Schema rdfs:hasProperty (<last_updated> <ttl> <version> <data>).
@prefix gbfs: <https://w3id.org/gbfs/terms>.
@prefix schema: <http://schema.org/#>.
@prefix ebucore: <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix vann: <http://purl.org/vocab/vann/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix jsonsc: <https://www.w3.org/2019/wot/json-schema#>.
@prefix airs: <https://raw.githubusercontent.com/airs-linked-data/lov/latest/src/airs_vocabulary.ttl#>.
@prefix vso: <http://purl.org/vso/ns#>.
@prefix dbpedia-owl: <http://dbpedia.org/ontology/>.
gbfs:last_updated rdf:type xsd:integer;
rdfs:label "Last time the data in the feed was updated in POSIX time."@en.
gbfs:ttl rdf:type xsd:integer;
rdfs:label "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed)."@en.
gbfs:version rdf:type xsd:string;
rdfs:label "GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1)."@en.
gbfs:plans rdfs:range gbfs:Plans.
gbfs:Plans rdf:type rdfs:Class.
gbfs:plan_id rdf:type xsd:string;
rdfs:label "Identifier of a pricing plan in the system."@en.
gbfs:url rdf:type xsd:string;
rdfs:label "URL where the customer can learn more about this pricing plan."@en.
gbfs:name rdf:type xsd:string;
rdfs:label "Name of this pricing plan."@en.
gbfs:currency rdf:type xsd:string;
rdfs:label "Currency used to pay the fare in ISO 4217 code."@en.
gbfs:price rdf:type xsd:integer;
rdfs:label "Fare price."@en.
gbfs:is_taxable rdf:type xsd:boolean;
rdfs:label "Will additional tax be added to the base price?"@en.
gbfs:description rdf:type xsd:string;
rdfs:label "Customer-readable description of the pricing plan."@en.
gbfs:per_km_pricing rdfs:range gbfs:Per_km_pricing.
gbfs:Per_km_pricing rdf:type rdfs:Class.
gbfs:start rdf:type xsd:integer;
rdfs:label "Number of kilometers that have to elapse before this segment starts applying (added in v2.1-RC2)."@en.
gbfs:rate rdf:type xsd:integer;
rdfs:label "Rate that is charged for each kilometer interval after the start (added in v2.1-RC2)."@en.
gbfs:interval rdf:type xsd:integer;
rdfs:label "Interval in kilometers at which the rate of this segment is either reapplied indefinitely, or if defined, up until (but not including) end kilometer (added in v2.1-RC2)."@en.
gbfs:end rdf:type xsd:integer;
rdfs:label "The kilometer at which the rate will no longer apply (added in v2.1-RC2)."@en.
gbfs:per_km_pricing rdfs:range gbfs:Per_km_pricing.
gbfs:Per_km_pricing rdfs:hasProperty (<start> <rate> <interval> <end>).
gbfs:per_min_pricing rdfs:range gbfs:Per_min_pricing.
gbfs:Per_min_pricing rdf:type rdfs:Class.
gbfs:start rdf:type xsd:integer;
rdfs:label "Number of minutes that have to elapse before this segment starts applying (added in v2.1-RC2)."@en.
gbfs:rate rdf:type xsd:integer;
rdfs:label "Rate that is charged for each minute interval after the start (added in v2.1-RC2)."@en.
gbfs:interval rdf:type xsd:integer;
rdfs:label "Interval in minutes at which the rate of this segment is either reapplied (added in v2.1-RC2)."@en.
gbfs:end rdf:type xsd:integer;
rdfs:label "The minute at which the rate will no longer apply (added in v2.1-RC2)."@en.
gbfs:per_min_pricing rdfs:range gbfs:Per_min_pricing.
gbfs:Per_min_pricing rdfs:hasProperty (<start> <rate> <interval> <end>).
gbfs:surge_pricing rdf:type xsd:boolean;
rdfs:label "Is there currently an increase in price in response to increased demand in this pricing plan? (added in v2.1-RC2)"@en.
gbfs:plans rdfs:range gbfs:Plans.
gbfs:Plans rdfs:hasProperty (<plan_id> <url> <name> <currency> <price> <is_taxable> <description> <per_km_pricing> <per_min_pricing> <surge_pricing>).
gbfs:data rdfs:range gbfs:Data.
gbfs:Data rdfs:hasProperty (<plans>).
gbfs:schema rdfs:range gbfs:Schema.
gbfs:Schema rdfs:hasProperty (<last_updated> <ttl> <version> <data>).
@prefix gbfs: <https://w3id.org/gbfs/terms>.
@prefix schema: <http://schema.org/#>.
@prefix ebucore: <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix vann: <http://purl.org/vocab/vann/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix jsonsc: <https://www.w3.org/2019/wot/json-schema#>.
@prefix airs: <https://raw.githubusercontent.com/airs-linked-data/lov/latest/src/airs_vocabulary.ttl#>.
@prefix vso: <http://purl.org/vso/ns#>.
@prefix dbpedia-owl: <http://dbpedia.org/ontology/>.
gbfs:last_updated rdf:type xsd:integer;
rdfs:label "Last time the data in the feed was updated in POSIX time."@en.
gbfs:ttl rdf:type xsd:integer;
rdfs:label "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed)."@en.
gbfs:version rdf:type xsd:string;
rdfs:label "GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1)."@en.
gbfs:regions rdfs:range gbfs:Regions.
gbfs:Regions rdf:type rdfs:Class.
gbfs:region_id rdf:type xsd:string;
rdfs:label "identifier of the region."@en.
gbfs:name rdf:type xsd:string;
rdfs:label "Public name for this region."@en.
gbfs:regions rdfs:range gbfs:Regions.
gbfs:Regions rdfs:hasProperty (<region_id> <name>).
gbfs:data rdfs:range gbfs:Data.
gbfs:Data rdfs:hasProperty (<regions>).
gbfs:schema rdfs:range gbfs:Schema.
gbfs:Schema rdfs:hasProperty (<last_updated> <ttl> <version> <data>).
@prefix gbfs: <https://w3id.org/gbfs/terms>.
@prefix schema: <http://schema.org/#>.
@prefix ebucore: <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix vann: <http://purl.org/vocab/vann/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix jsonsc: <https://www.w3.org/2019/wot/json-schema#>.
@prefix airs: <https://raw.githubusercontent.com/airs-linked-data/lov/latest/src/airs_vocabulary.ttl#>.
@prefix vso: <http://purl.org/vso/ns#>.
@prefix dbpedia-owl: <http://dbpedia.org/ontology/>.
gbfs:last_updated rdf:type xsd:integer;
rdfs:label "Last time the data in the feed was updated in POSIX time."@en.
gbfs:ttl rdf:type xsd:integer;
rdfs:label "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed)."@en.
gbfs:version rdf:type xsd:string;
rdfs:label "GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1)."@en.
gbfs:rental_hours rdfs:range gbfs:Rental_hours.
gbfs:Rental_hours rdf:type rdfs:Class.
gbfs:user_types rdfs:range gbfs:User_types.
gbfs:User_types rdf:type rdfs:Class;
owl:oneOf (<member> <nonmember>).
gbfs:days rdfs:range gbfs:Days.
gbfs:Days rdf:type rdfs:Class;
owl:oneOf (<sun> <mon> <tue> <wed> <thu> <fri> <sat>).
gbfs:start_time rdf:type xsd:string;
rdfs:label "Start time for the hours of operation of the system."@en.
gbfs:end_time rdf:type xsd:string;
rdfs:label "End time for the hours of operation of the system."@en.
gbfs:rental_hours rdfs:range gbfs:Rental_hours.
gbfs:Rental_hours rdfs:hasProperty (<user_types> <days> <start_time> <end_time>).
gbfs:data rdfs:range gbfs:Data.
gbfs:Data rdfs:hasProperty (<rental_hours>).
gbfs:schema rdfs:range gbfs:Schema.
gbfs:Schema rdfs:hasProperty (<last_updated> <ttl> <version> <data>).
@prefix gbfs: <https://w3id.org/gbfs/terms>.
@prefix schema: <http://schema.org/#>.
@prefix ebucore: <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix vann: <http://purl.org/vocab/vann/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix jsonsc: <https://www.w3.org/2019/wot/json-schema#>.
@prefix airs: <https://raw.githubusercontent.com/airs-linked-data/lov/latest/src/airs_vocabulary.ttl#>.
@prefix vso: <http://purl.org/vso/ns#>.
@prefix dbpedia-owl: <http://dbpedia.org/ontology/>.
gbfs:last_updated rdf:type xsd:integer;
rdfs:label "Last time the data in the feed was updated in POSIX time."@en.
gbfs:ttl rdf:type xsd:integer;
rdfs:label "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed)."@en.
gbfs:version rdf:type xsd:string;
rdfs:label "GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1)."@en.
gbfs:stations rdfs:range gbfs:Stations.
gbfs:Stations rdf:type rdfs:Class.
gbfs:station_id rdf:type xsd:string;
rdfs:label "Identifier of a station."@en.
gbfs:name rdf:type xsd:string;
rdfs:label "Public name of the station."@en.
gbfs:short_name rdf:type xsd:string;
rdfs:label "Short name or other type of identifier."@en.
gbfs:lat rdf:type xsd:integer;
rdfs:label "The latitude of the station."@en.
gbfs:lon rdf:type xsd:integer;
rdfs:label "The longitude fo the station."@en.
gbfs:address rdf:type xsd:string;
rdfs:label "Address where station is located."@en.
gbfs:cross_street rdf:type xsd:string;
rdfs:label "Cross street or landmark where the station is located."@en.
gbfs:region_id rdf:type xsd:string;
rdfs:label "Identifier of the region where the station is located."@en.
gbfs:post_code rdf:type xsd:string;
rdfs:label "Postal code where station is located."@en.
gbfs:rental_methods rdfs:range gbfs:Rental_methods.
gbfs:Rental_methods rdf:type rdfs:Class;
owl:oneOf (<key> schema:CreditCard <paypass> <applepay> <androidpay> <transitcard> <accountnumber> foaf:phone).
gbfs:is_virtual_station rdf:type xsd:boolean;
rdfs:label "Is this station a location with or without physical infrastructure? (added in v2.1-RC)"@en.
gbfs:type rdf:type xsd:string;
rdfs:label "undefined"@en.
gbfs:Type owl:oneOf (<MultiPolygon>).
gbfs:coordinates rdfs:range gbfs:Coordinates.
gbfs:Coordinates rdf:type rdfs:Class.
gbfs:station_area rdfs:range gbfs:Station_area.
gbfs:Station_area rdfs:hasProperty (<type> <coordinates>).
gbfs:capacity rdf:type xsd:integer;
rdfs:label "Number of total docking points installed at this station, both available and unavailable."@en.
gbfs:is_valet_station rdf:type xsd:boolean;
rdfs:label "Are valet services provided at this station? (added in v2.1-RC)"@en.
gbfs:is_charging_station rdf:type xsd:boolean;
rdfs:label "Does the station support charging of electric vehicles? (added in v2.3-RC)"@en.
gbfs:android rdf:type xsd:string;
rdfs:label "URI that can be passed to an Android app with an intent (added in v1.1)."@en.
gbfs:ios rdf:type xsd:string;
rdfs:label "URI that can be used on iOS to launch the rental app for this station (added in v1.1)."@en.
gbfs:web rdf:type xsd:string;
rdfs:label "URL that can be used by a web browser to show more information about renting a vehicle at this station (added in v1.1)."@en.
gbfs:rental_uris rdfs:range gbfs:Rental_uris.
gbfs:Rental_uris rdfs:hasProperty (<android> <ios> <web>).
gbfs:stations rdfs:range gbfs:Stations.
gbfs:Stations rdfs:hasProperty (<station_id> <name> <short_name> <lat> <lon> <address> <cross_street> <region_id> <post_code> <rental_methods> <is_virtual_station> <station_area> <capacity> <vehicle_capacity> <is_valet_station> <is_charging_station> <rental_uris> <vehicle_type_capacity>).
gbfs:data rdfs:range gbfs:Data.
gbfs:Data rdfs:hasProperty (<stations>).
gbfs:schema rdfs:range gbfs:Schema.
gbfs:Schema rdfs:hasProperty (<last_updated> <ttl> <version> <data>).
@prefix gbfs: <https://w3id.org/gbfs/terms>.
@prefix schema: <http://schema.org/#>.
@prefix ebucore: <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix vann: <http://purl.org/vocab/vann/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix jsonsc: <https://www.w3.org/2019/wot/json-schema#>.
@prefix airs: <https://raw.githubusercontent.com/airs-linked-data/lov/latest/src/airs_vocabulary.ttl#>.
@prefix vso: <http://purl.org/vso/ns#>.
@prefix dbpedia-owl: <http://dbpedia.org/ontology/>.
gbfs:last_updated rdf:type xsd:integer;
rdfs:label "Last time the data in the feed was updated in POSIX time."@en.
gbfs:ttl rdf:type xsd:integer;
rdfs:label "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed)."@en.
gbfs:version rdf:type xsd:string;
rdfs:label "GBFS version number to which the feed conforms, according to the versioning framework."@en.
gbfs:vehicle_types rdfs:range gbfs:Vehicle_types.
gbfs:Vehicle_types rdf:type rdfs:Class.
gbfs:vehicle_type_id rdf:type xsd:string;
rdfs:label "Unique identifier of a vehicle type."@en.
gbfs:form_factor rdf:type xsd:string;
rdfs:label "The vehicle's general form factor."@en.
gbfs:Form_factor owl:oneOf (vso:bicycle schema:car <moped> <other> <scooter>).
gbfs:propulsion_type rdf:type xsd:string;
rdfs:label "The primary propulsion type of the vehicle."@en.
gbfs:Propulsion_type owl:oneOf (<human> <electric_assist> <electric> <combustion>).
gbfs:max_range_meters rdf:type xsd:integer;
rdfs:label "The furthest distance in meters that the vehicle can travel without recharging or refueling when it has the maximum amount of energy potential."@en.
gbfs:name rdf:type xsd:string;
rdfs:label "The public name of this vehicle type."@en.
gbfs:default_reserve_time rdf:type xsd:integer;
rdfs:label "Maximum time in minutes that a vehicle can be reserved before a rental begins added in v2.3-RC."@en.
gbfs:return_type rdfs:range gbfs:Return_type.
gbfs:Return_type rdf:type rdfs:Class;
owl:oneOf (<free_floating> <roundtrip_station> <any_station>).
gbfs:icon_url rdf:type xsd:string;
rdfs:label "A fully qualified URL pointing to the location of a graphic icon file that MAY be used to represent this vehicle type on maps and in other applications added in v2.3-RC."@en.
gbfs:icon_url_dark rdf:type xsd:string;
rdfs:label "A fully qualified URL pointing to the location of a graphic icon file to be used to represent this vehicle type when in dark mode added in v2.3-RC."@en.
gbfs:icon_last_modified rdf:type xsd:string;
rdfs:label "Date that indicates the last time any included vehicle icon images were modified or updated added in v2.3-RC."@en.
gbfs:default_pricing_plan_id rdf:type xsd:string;
rdfs:label "A plan_id as defined in system_pricing_plans.json added in v2.3-RC."@en.
gbfs:pricing_plan_ids rdfs:range gbfs:Pricing_plan_ids.
gbfs:Pricing_plan_ids rdf:type rdfs:Class.
gbfs:vehicle_assets rdfs:range gbfs:Vehicle_assets.
gbfs:Vehicle_assets rdfs:hasProperty (<icon_url> <icon_url_dark> <icon_last_modified> <default_pricing_plan_id> <pricing_plan_ids>).
gbfs:vehicle_types rdfs:range gbfs:Vehicle_types.
gbfs:Vehicle_types rdfs:hasProperty (<vehicle_type_id> <form_factor> <propulsion_type> <max_range_meters> <name> <default_reserve_time> <return_type> <vehicle_assets>).
gbfs:data rdfs:range gbfs:Data.
gbfs:Data rdfs:hasProperty (<vehicle_types>).
gbfs:schema rdfs:range gbfs:Schema.
gbfs:Schema rdfs:hasProperty (<last_updated> <ttl> <version> <data>).
@prefix gbfs: <https://w3id.org/gbfs/terms>.
@prefix schema: <http://schema.org/#>.
@prefix ebucore: <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix vann: <http://purl.org/vocab/vann/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix jsonsc: <https://www.w3.org/2019/wot/json-schema#>.
@prefix airs: <https://raw.githubusercontent.com/airs-linked-data/lov/latest/src/airs_vocabulary.ttl#>.
@prefix vso: <http://purl.org/vso/ns#>.
@prefix dbpedia-owl: <http://dbpedia.org/ontology/>.
gbfs:last_updated rdf:type xsd:integer;
rdfs:label "Last time the data in the feed was updated in POSIX time."@en.
gbfs:ttl rdf:type xsd:integer;
rdfs:label "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed)."@en.
gbfs:version rdf:type xsd:string;
rdfs:label "GBFS version number to which the feed conforms, according to the versioning framework."@en.
gbfs:versions rdfs:range gbfs:Versions.
gbfs:Versions rdf:type rdfs:Class.
gbfs:version rdf:type xsd:string;
rdfs:label "The semantic version of the feed in the form X.Y"@en.
gbfs:Version owl:oneOf (<1.1> <2.0> <2.1> <2.2> <2.3-RC>).
gbfs:url rdf:type xsd:string;
rdfs:label "URL of the corresponding gbfs.json endpoint"@en.
gbfs:versions rdfs:range gbfs:Versions.
gbfs:Versions rdfs:hasProperty (<version> <url>).
gbfs:data rdfs:range gbfs:Data.
gbfs:Data rdfs:hasProperty (<versions>).
gbfs:schema rdfs:range gbfs:Schema.
gbfs:Schema rdfs:hasProperty (<last_updated> <ttl> <version> <data>).
......@@ -15,15 +15,35 @@ var RDFTools = /** @class */ (function () {
* First method of this class to be called; RDFTools has to be initialised right after a *Pattern class has been created.
* @param filename
*/
RDFTools.initialise = function (filename) {
RDFTools.initialise = function (filename, map) {
this.fs = require('fs');
this.fileName = filename;
for (var object in map) {
this.termMap.set(object, map[object]);
}
};
RDFTools.inMap = function (term) {
if (this.termMap.has(term) != false) {
return this.termMap.get(term);
}
else {
return false;
}
};
RDFTools.getOneOfQuad = function (prefix, name, oneOf, writer) {
var oneOfValues = [];
for (var _i = 0, oneOf_1 = oneOf; _i < oneOf_1.length; _i++) {
var value = oneOf_1[_i];
oneOfValues.push(namedNode(value.toString()));
console.log(RDFTools.inMap(value));
if (RDFTools.inMap(value) != false) {
console.log(RDFTools.inMap(value));
oneOfValues.push(namedNode(RDFTools.inMap(value)));
}
else {
console.log("false");
oneOfValues.push(namedNode(value.toString()));
}
//oneOfValues.push(namedNode(value.toString()));
}
var oneOfQuad = RDFTools.node_node_list(prefix + ':' + name, 'owl:oneOf', writer.list(oneOfValues));
return oneOfQuad;
......@@ -32,7 +52,7 @@ var RDFTools = /** @class */ (function () {
RDFTools.writeTurtle = function (writer) {
// Write the content of the writer in the .ttl
var _this = this;
var filePath = "build/".concat(this.fileName, ".ttl").replace(/:/g, '');
var filePath = ("build/" + this.fileName + ".ttl").replace(/:/g, '');
console.log(filePath);
writer.end(function (error, result) { return _this.fs.writeFile(filePath, result, function (err) {
// throws an error, you could also catch it here
......@@ -92,6 +112,7 @@ var RDFTools = /** @class */ (function () {
RDFTools.capitalizeFirstLetter = function (string) {
return string.charAt(0).toUpperCase() + string.slice(1);
};
RDFTools.termMap = new Map();
return RDFTools;
}());
exports.RDFTools = RDFTools;
......@@ -17,22 +17,41 @@ export class RDFTools {
static fileName: string;
static termMap = new Map<string,string>() ;
static fs:any;
/**
* First method of this class to be called; RDFTools has to be initialised right after a *Pattern class has been created.
* @param filename
*/
static initialise (filename: string){
static initialise (filename: string, map){
this.fs = require('fs');
this.fileName = filename;
for (let object in map){
this.termMap.set(object, map[object]);
}
}
static inMap(term: string){
if (this.termMap.has(term)!= false) {
return this.termMap.get(term);
}
else{
return false;
}
}
static getOneOfQuad(prefix, name, oneOf, writer){
let oneOfValues:NamedNode[] = [];
for (const value of oneOf){
oneOfValues.push(namedNode(value.toString()));
if (RDFTools.inMap(value) != false){
oneOfValues.push(namedNode(RDFTools.inMap(value)));
}
else{