@gisatcz/ptr-be-core 0.0.1-dev.1 → 0.0.1-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +18 -26
- package/dist/index.cjs +120 -26252
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +10 -11
- package/dist/index.mjs +118 -26253
- package/dist/index.mjs.map +1 -1
- package/dist/src/api/errors.api.d.ts +18 -0
- package/dist/src/api/models.api.d.ts +9 -0
- package/dist/src/coding/code.formating.d.ts +0 -1
- package/dist/src/coding/code.types.d.ts +1 -2
- package/dist/src/logging/logger.d.ts +0 -1
- package/dist/src/panther/enums.panther.d.ts +3 -3
- package/dist/src/panther/models.edges.d.ts +0 -1
- package/dist/src/panther/models.nodes.d.ts +18 -7
- package/dist/src/panther/models.nodes.properties.d.ts +41 -3
- package/package.json +22 -12
- package/.github/workflows/release-dev.yml +0 -34
- package/.github/workflows/release.yml +0 -28
- package/.github/workflows/version-bump.yml +0 -68
- package/barrelsby.json +0 -9
- package/dist/index.d.ts.map +0 -1
- package/dist/src/coding/code.formating.d.ts.map +0 -1
- package/dist/src/coding/code.types.d.ts.map +0 -1
- package/dist/src/logging/logger.d.ts.map +0 -1
- package/dist/src/panther/enums.panther.d.ts.map +0 -1
- package/dist/src/panther/models.edges.d.ts.map +0 -1
- package/dist/src/panther/models.nodes.d.ts.map +0 -1
- package/dist/src/panther/models.nodes.properties.d.ts.map +0 -1
- package/doc/npm-refresh.md +0 -4
- package/rollup.config.js +0 -30
- package/src/coding/code.formating.ts +0 -104
- package/src/coding/code.types.ts +0 -11
- package/src/logging/logger.ts +0 -58
- package/src/panther/SharedFeature.md +0 -43
- package/src/panther/enums.panther.ts +0 -41
- package/src/panther/models.edges.ts +0 -20
- package/src/panther/models.nodes.properties.ts +0 -31
- package/src/panther/models.nodes.ts +0 -55
- package/tsconfig.json +0 -51
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# Panther Models and Logic
|
|
2
|
-
Panther models are based on graph data structure. Graph structure is flat and very flexible.
|
|
3
|
-
|
|
4
|
-
## What are Graphs
|
|
5
|
-
Graph can be visualiset as dots connected by lines.
|
|
6
|
-
|
|
7
|
-
Graphs have two parts:
|
|
8
|
-
- node (dot)
|
|
9
|
-
- edge (line)
|
|
10
|
-
|
|
11
|
-
Nodes are connected by Edges into a graph.
|
|
12
|
-
|
|
13
|
-
## Node Structure
|
|
14
|
-
Node has two main parts:
|
|
15
|
-
- Label(s)
|
|
16
|
-
- Properties
|
|
17
|
-
|
|
18
|
-
### Labels
|
|
19
|
-
Label is one or more Tags that define a "category" saing "What this Node is".
|
|
20
|
-
Examples are Place, Period, Datasource etc.
|
|
21
|
-
|
|
22
|
-
Combination of multiple nodes can be used as multiple-level labeling. Like `[Datasource, WMS]` is combination of two labels for single node.
|
|
23
|
-
|
|
24
|
-
### Properties
|
|
25
|
-
Can be anything inside the node. Can be `key`, `name` or any general property we need.
|
|
26
|
-
|
|
27
|
-
## Edge Structure
|
|
28
|
-
Edge is connection betwee two nodes. Can be directed (from-to).
|
|
29
|
-
|
|
30
|
-
Same as Nodes, Edge also can have:
|
|
31
|
-
- Label(s)
|
|
32
|
-
- Properties
|
|
33
|
-
|
|
34
|
-
Works the same as in the node case.
|
|
35
|
-
|
|
36
|
-
Example of Edge Labels: `IS_RELATED`, `WAITING_FOR`, `CONTAINS`
|
|
37
|
-
Example of Edge properties: `expiration`, `length`, `priority`, `created`
|
|
38
|
-
|
|
39
|
-
## Resources
|
|
40
|
-
Please check resorces for visual explanation and many other examples.
|
|
41
|
-
|
|
42
|
-
- https://neo4j.com/docs/getting-started/graph-database/
|
|
43
|
-
- https://www.mongodb.com/resources/basics/databases/mongodb-graph-database
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What types of graph nodes we use in metadata model
|
|
3
|
-
*/
|
|
4
|
-
export enum UsedNodeLabels {
|
|
5
|
-
Application = "application", // Application node (the root of the FE app)
|
|
6
|
-
Datasource = "datasource", // Datasource node for data including GIS information
|
|
7
|
-
Place = "place", // Place node for geographical information
|
|
8
|
-
Period = "period", // Period node for time information
|
|
9
|
-
AreaTree = "areaTree", // Area tree node for administrative division
|
|
10
|
-
AreaTreeLevel = "areaTreeLevel", // Area tree level node for administrative division
|
|
11
|
-
Layer = "layer", // Layer node for map layer (layer have a style and a datasource)
|
|
12
|
-
Style = "style", // Style node for map layer or a feature
|
|
13
|
-
Feature = "feature" // Feature node for map layer
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* What datasources we use in the system
|
|
18
|
-
*/
|
|
19
|
-
export enum UsedDatasourceLabels {
|
|
20
|
-
Attribute = "attribute", // Column(s) with attribute values
|
|
21
|
-
Geojson = "geojson", // Geojson for web map
|
|
22
|
-
WMS = "wms", // WMS online source
|
|
23
|
-
COG = "cogBitmap", // COG online source
|
|
24
|
-
MVT = "mvt", // MVT (Mapbox Vector Tiles) source
|
|
25
|
-
XYZ = "xyz", // XYZ tile source
|
|
26
|
-
CSV = "csv", // CSV data source
|
|
27
|
-
GeoTIFF = "geotiff", // GeoTIFF raster data
|
|
28
|
-
Shapefile = "shapefile", // ESRI Shapefile format
|
|
29
|
-
PostGIS = "postgis", // PostGIS database source
|
|
30
|
-
WMTS = "wmts", // Web Map Tile Service
|
|
31
|
-
WFS = "wfs", // Web Feature Service
|
|
32
|
-
GeoPackage = "geopackage" // OGC GeoPackage format
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* What types of edges we use in metadata model
|
|
37
|
-
*/
|
|
38
|
-
export enum UsedEdgeLabels {
|
|
39
|
-
RelatedTo = "RELATED", // Generic edge for any relation
|
|
40
|
-
Has = "HAS", // Edge for ownership relation
|
|
41
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Nullable } from "../coding/code.types"
|
|
2
|
-
import { UsedEdgeLabels } from "./enums.panther"
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Tuple for relation between two graph nodes
|
|
6
|
-
* It is point to point definition of graph edge
|
|
7
|
-
*/
|
|
8
|
-
export type GraphRelation = [string, string]
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Edge of the graph model.
|
|
13
|
-
* It connects two graph nodes and have some properties.
|
|
14
|
-
* Have "key" witch is composed from node keys.
|
|
15
|
-
*/
|
|
16
|
-
export interface GraphEdge{
|
|
17
|
-
labels: string[] | UsedEdgeLabels[],
|
|
18
|
-
edgeNodes: GraphRelation
|
|
19
|
-
properties: Nullable<object>
|
|
20
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Entity that has relevant time interval.
|
|
3
|
-
* Example: Period is connected to some time range.
|
|
4
|
-
*/
|
|
5
|
-
export interface HasInterval {
|
|
6
|
-
validUtcIntervalIso: string,
|
|
7
|
-
validFrom: number,
|
|
8
|
-
validTo: number
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Entity with custom configuration
|
|
13
|
-
*/
|
|
14
|
-
export interface HasConfiguration {
|
|
15
|
-
configuration: string // JSON string
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Place node - somewhere in the world
|
|
20
|
-
*/
|
|
21
|
-
export interface HasGeometry {
|
|
22
|
-
geometry: any,
|
|
23
|
-
bbox: any,
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Place node - somewhere in the world
|
|
28
|
-
*/
|
|
29
|
-
export interface HasLevels {
|
|
30
|
-
level: number,
|
|
31
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Nullable } from "../coding/code.types"
|
|
2
|
-
import { HasGeometry, HasInterval, HasLevels, HasConfiguration } from "./models.nodes.properties"
|
|
3
|
-
import { UsedNodeLabels, UsedDatasourceLabels } from "./enums.panther"
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* General graph node - same for all metadatata entities
|
|
7
|
-
*/
|
|
8
|
-
export interface PantherEntity {
|
|
9
|
-
labels: Array<string | UsedNodeLabels | UsedDatasourceLabels>,
|
|
10
|
-
key: string
|
|
11
|
-
nameDisplay: string,
|
|
12
|
-
nameInternal: string,
|
|
13
|
-
description: Nullable<string>,
|
|
14
|
-
lastUpdatedAt: number,
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Place node - somewhere in the world
|
|
19
|
-
*/
|
|
20
|
-
export interface Place extends PantherEntity, HasGeometry { }
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Period node - selected time in timeline
|
|
24
|
-
*/
|
|
25
|
-
export interface Period extends PantherEntity, HasInterval { }
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Area tree node - tree of areas
|
|
29
|
-
*/
|
|
30
|
-
export interface AreaTreeLevel extends PantherEntity, HasLevels {}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Datasource with source configuration
|
|
34
|
-
*/
|
|
35
|
-
export interface Datasource extends PantherEntity, HasConfiguration {}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Application node - main entity in metadata model
|
|
39
|
-
*/
|
|
40
|
-
export interface ApplicationNode extends PantherEntity, HasConfiguration {}
|
|
41
|
-
|
|
42
|
-
export { UsedNodeLabels, HasInterval, UsedDatasourceLabels }
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Represents a full panther entity which extends the basic PantherEntity
|
|
47
|
-
* and optionally includes geometry, interval, levels, and configuration properties.
|
|
48
|
-
*
|
|
49
|
-
* @extends PantherEntity
|
|
50
|
-
* @extends Partial<HasGeometry>
|
|
51
|
-
* @extends Partial<HasInterval>
|
|
52
|
-
* @extends Partial<HasLevels>
|
|
53
|
-
* @extends Partial<HasConfiguration>
|
|
54
|
-
*/
|
|
55
|
-
export interface FullPantherEntity extends PantherEntity, Partial<HasGeometry & HasInterval & HasLevels & HasConfiguration> { }
|
package/tsconfig.json
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
/* Basic Options */
|
|
4
|
-
"target": "ESNext",
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"outDir": "dist",
|
|
8
|
-
"rootDir": ".",
|
|
9
|
-
|
|
10
|
-
/* Strict Type-Checking Options */
|
|
11
|
-
"strict": true,
|
|
12
|
-
"noImplicitAny": true,
|
|
13
|
-
"noImplicitReturns": true,
|
|
14
|
-
"noFallthroughCasesInSwitch": true,
|
|
15
|
-
|
|
16
|
-
/* Module Resolution Options */
|
|
17
|
-
"esModuleInterop": true,
|
|
18
|
-
|
|
19
|
-
/* Advanced Options */
|
|
20
|
-
"skipLibCheck": true,
|
|
21
|
-
"forceConsistentCasingInFileNames": true,
|
|
22
|
-
|
|
23
|
-
/* Additional Options */
|
|
24
|
-
"sourceMap": true,
|
|
25
|
-
"noEmitOnError": true,
|
|
26
|
-
|
|
27
|
-
/* Declaration Options */
|
|
28
|
-
"declaration": true,
|
|
29
|
-
"declarationMap": true,
|
|
30
|
-
|
|
31
|
-
"resolveJsonModule": true,
|
|
32
|
-
"types": [
|
|
33
|
-
"node"
|
|
34
|
-
],
|
|
35
|
-
/* Path Mapping (Optional) */
|
|
36
|
-
"baseUrl": ".",
|
|
37
|
-
"paths": {
|
|
38
|
-
"@core/*": ["./src/*"]
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
"include": [
|
|
42
|
-
"./**/*"
|
|
43
|
-
],
|
|
44
|
-
"exclude": [
|
|
45
|
-
"node_modules",
|
|
46
|
-
"./dist/**/*"
|
|
47
|
-
],
|
|
48
|
-
/* Additional Linting Options */
|
|
49
|
-
"noUnusedLocals": true,
|
|
50
|
-
"noUnusedParameters": false // Set to true if applicable
|
|
51
|
-
}
|