@zazuko/query-rdf-data-cube
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -0,1 +1,11 @@ | ||
<a name="0.7.0"></a> | ||
# [0.7.0](https://github.com/zazuko/query-rdf-data-cube/compare/v0.6.0...v0.7.0) (2019-12-12) | ||
### Features | ||
* **query:** skos:broader support to fetch or fix a parent dimension ([784cf5c](https://github.com/zazuko/query-rdf-data-cube/commit/784cf5c)) | ||
<a name="0.6.0"></a> | ||
@@ -2,0 +12,0 @@ # [0.6.0](https://github.com/zazuko/query-rdf-data-cube/compare/v0.5.0...v0.6.0) (2019-11-25) |
@@ -58,2 +58,4 @@ import { Term } from "rdf-js"; | ||
componentType: string; | ||
broaderComponent?: Component; | ||
narrowerComponent?: Component; | ||
/** | ||
@@ -69,3 +71,3 @@ * Creates an instance of Component. | ||
* | ||
* @param {({ label?: Label, iri: string | Term})} options Additional info about the component. | ||
* @param { label?: Label, iri: string | Term} options Additional info about the component. | ||
* @param options.iri - The IRI of the Component. | ||
@@ -98,3 +100,3 @@ * @param options.label (Optional) A label for the DataCube in the following form: | ||
* const priceMeasure = new Measure({ | ||
* iri: "http://example.com/price", labels: [{ value: "Price", language: "en" }] | ||
* iri: "http://example.com/price", labels: { value: "Price", language: "en" } | ||
* }); | ||
@@ -114,3 +116,3 @@ * dataCube.query().select({ | ||
* const cityDimension = new Dimension({ | ||
* iri: "http://example.com/city", labels: [{ value: "City", language: "en" }] | ||
* iri: "http://example.com/city", labels: { value: "City", language: "en" } | ||
* }); | ||
@@ -125,11 +127,11 @@ * dataCube.query().select({ | ||
/** | ||
* Used in [[select]], [[distinct]] asks for distinct values. | ||
* Used in [[orderBy]], [[desc]] orders by descending order of this component. | ||
* | ||
* ```js | ||
* const priceMeasure = new Measure({ | ||
* iri: "http://example.com/price", labels: [{ value: "Price", language: "en" }] | ||
* iri: "http://example.com/price", labels: { value: "Price", language: "en" } | ||
* }); | ||
* dataCube.query().select({ | ||
* price: priceMeasure | ||
* }).orderBy(({ price } => price.lte(30.5))); | ||
* }).orderBy(price.desc()); | ||
* ``` | ||
@@ -141,2 +143,23 @@ * | ||
/** | ||
* Used in [[select]], lets the query use `skos:broader` relations with [[Component]]s | ||
* | ||
* ```js | ||
* const street = new Dimension({ | ||
* iri: "http://example.com/street", labels: { value: "Street", language: "en" } | ||
* }); | ||
* const city = street.broader() | ||
* const country = city.broader() | ||
* // alternatively, to get streets in cities in a specific country: | ||
* const country = city.broader("http://example.com/country/iceland") | ||
* // retrieves all streets and their country (or all streets in Iceland) in alphabetical order | ||
* dataCube.query().select({ | ||
* street, | ||
* country, | ||
* }).orderBy(street); | ||
* ``` | ||
* | ||
* @memberof Component | ||
*/ | ||
broader(iri?: string): any; | ||
/** | ||
* Mechanism resolving a Component to the corresponding binding name, used when the SPARQL query gets generated. | ||
@@ -143,0 +166,0 @@ * |
@@ -29,2 +29,3 @@ import { Literal, NamedNode } from "rdf-js"; | ||
private iriToBinding; | ||
private componentToBinding; | ||
private state; | ||
@@ -199,3 +200,11 @@ private fetcher; | ||
private autoNameVariable; | ||
private _handleSelectedDimensions; | ||
private _handleBroaderNarrower; | ||
private _handleImplicitlySelectedDimensions; | ||
private _handleSelectedMeasures; | ||
private _handleSelectedAttributes; | ||
private _handleAggregates; | ||
private _handleGroupBys; | ||
private _handleOrderBys; | ||
} | ||
export {}; |
@@ -58,2 +58,4 @@ import { Term } from "rdf-js"; | ||
componentType: string; | ||
broaderComponent?: Component; | ||
narrowerComponent?: Component; | ||
/** | ||
@@ -69,3 +71,3 @@ * Creates an instance of Component. | ||
* | ||
* @param {({ label?: Label, iri: string | Term})} options Additional info about the component. | ||
* @param { label?: Label, iri: string | Term} options Additional info about the component. | ||
* @param options.iri - The IRI of the Component. | ||
@@ -98,3 +100,3 @@ * @param options.label (Optional) A label for the DataCube in the following form: | ||
* const priceMeasure = new Measure({ | ||
* iri: "http://example.com/price", labels: [{ value: "Price", language: "en" }] | ||
* iri: "http://example.com/price", labels: { value: "Price", language: "en" } | ||
* }); | ||
@@ -114,3 +116,3 @@ * dataCube.query().select({ | ||
* const cityDimension = new Dimension({ | ||
* iri: "http://example.com/city", labels: [{ value: "City", language: "en" }] | ||
* iri: "http://example.com/city", labels: { value: "City", language: "en" } | ||
* }); | ||
@@ -125,11 +127,11 @@ * dataCube.query().select({ | ||
/** | ||
* Used in [[select]], [[distinct]] asks for distinct values. | ||
* Used in [[orderBy]], [[desc]] orders by descending order of this component. | ||
* | ||
* ```js | ||
* const priceMeasure = new Measure({ | ||
* iri: "http://example.com/price", labels: [{ value: "Price", language: "en" }] | ||
* iri: "http://example.com/price", labels: { value: "Price", language: "en" } | ||
* }); | ||
* dataCube.query().select({ | ||
* price: priceMeasure | ||
* }).orderBy(({ price } => price.lte(30.5))); | ||
* }).orderBy(price.desc()); | ||
* ``` | ||
@@ -141,2 +143,23 @@ * | ||
/** | ||
* Used in [[select]], lets the query use `skos:broader` relations with [[Component]]s | ||
* | ||
* ```js | ||
* const street = new Dimension({ | ||
* iri: "http://example.com/street", labels: { value: "Street", language: "en" } | ||
* }); | ||
* const city = street.broader() | ||
* const country = city.broader() | ||
* // alternatively, to get streets in cities in a specific country: | ||
* const country = city.broader("http://example.com/country/iceland") | ||
* // retrieves all streets and their country (or all streets in Iceland) in alphabetical order | ||
* dataCube.query().select({ | ||
* street, | ||
* country, | ||
* }).orderBy(street); | ||
* ``` | ||
* | ||
* @memberof Component | ||
*/ | ||
broader(iri?: string): any; | ||
/** | ||
* Mechanism resolving a Component to the corresponding binding name, used when the SPARQL query gets generated. | ||
@@ -143,0 +166,0 @@ * |
@@ -29,2 +29,3 @@ import { Literal, NamedNode } from "rdf-js"; | ||
private iriToBinding; | ||
private componentToBinding; | ||
private state; | ||
@@ -199,3 +200,11 @@ private fetcher; | ||
private autoNameVariable; | ||
private _handleSelectedDimensions; | ||
private _handleBroaderNarrower; | ||
private _handleImplicitlySelectedDimensions; | ||
private _handleSelectedMeasures; | ||
private _handleSelectedAttributes; | ||
private _handleAggregates; | ||
private _handleGroupBys; | ||
private _handleOrderBys; | ||
} | ||
export {}; |
{ | ||
"name": "@zazuko/query-rdf-data-cube", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "Query (or introspect) [RDF Data Cubes](https://www.w3.org/TR/vocab-data-cube/) with a JavaScript API, without writing SPARQL.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
250179
6397