Skip to content

Commit cf07250

Browse files
committed
Rename all depending files
This PR renames all occurrences of the Open Manufacturing Platform (OMP), Semantic Data Structuring (SDS) working group and BAMM Aspect Meta Model (BAMM) to Eclipse Semantic Modeling Framework (ESMF) and Semantic Aspect Meta Model (SAMM), respectively.
1 parent 211b7f3 commit cf07250

File tree

62 files changed

+1309
-1325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1309
-1325
lines changed

CONTRIBUTING.md

Lines changed: 88 additions & 84 deletions
Large diffs are not rendered by default.

CONVENTIONS.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
# SDS SDK JS Aspect Model loader Code Conventions
1+
# ESMF JS Aspect Model loader Code Conventions
22

33
The following document contains a compilation of conventions and guidelines to format, structure and write code for the
4-
SDS SDK JS Aspect Model loader.
4+
ESMF JS Aspect Model loader.
55

66
## General Conventions
77

88
Our code conventions are based on the [Google Typescript Style Guide](https://google.github.io/styleguide/tsguide.html)
9-
but
10-
detailed and adjusted for the needs of the SDS SDK JS Aspect Model loader.
9+
but detailed and adjusted for the needs of the ESMF JS Aspect Model loader.
1110

1211
## Copyright header
1312

@@ -34,8 +33,7 @@ Developer documentation is put into a README.md placed in the project root. This
3433
### User documentation
3534

3635
User documentation (this includes technical documentation on how to use an application or tool from
37-
the SDS SDK JS Aspect Model loader) should be on
38-
its own.
36+
the ESMF JS Aspect Model loader) should be on its own.
3937
It is written in AsciiDoc, rendered with [Antora](https://antora.org) and the generated static content is
4038
publically hosted for direct user access.
4139
The source files of the documentation are placed in a subfolder /documentation from the project root.
@@ -54,4 +52,4 @@ Publishing is realized by means of [Github pages](https://docs.antora.org/antora
5452
Technical documentation targeted towards components and architecture should be accessible via the developer
5553
documentation.
5654
Corresponding discussions on design etc. can be placed in the project wiki on
57-
[Github](https://github.com/OpenManufacturingPlatform/sds-sdk-js-Aspect Model loader/wiki).
55+
[Github](https://github.com/eclipse-esmf/esmf-sdk-js-aspect-model-loader/wiki).

README.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SDS JS SDK :: Aspect Model Loader 🚀
1+
# ESMF JS SDK :: Aspect Model Loader 🚀
22

33
## Table of Contents
44

@@ -21,24 +21,20 @@ more [.ttl files](<https://en.wikipedia.org/wiki/Turtle_(syntax)>) into native T
2121

2222
## Getting help
2323

24-
Are you having trouble with SDS SDK JS? We want to help!
24+
Are you having trouble with ESMF JS? We want to help!
2525

26-
* Check the [developer documentation](https://openmanufacturingplatform.github.io)
27-
* Having issues with the SDS SDK JS? Open
28-
a [GitHub issue](https://github.com/OpenManufacturingPlatform/sds-sdk-js-aspect-model-loader/issues).
26+
- Check the [developer documentation](https://openmanufacturingplatform.github.io)
27+
- Having issues with the ESMF JS? Open
28+
a [GitHub issue](https://github.com/eclipse-esmf/esmf-sdk-js-aspect-model-loader/issues).
2929

3030
## Getting started
3131

32-
### Install from the public npm (Currently not available):
32+
### Install from the public npm:
3333

34-
```
35-
npm install @sds/aspect-model-loader
36-
```
37-
38-
### Install from github release repository:
34+
<!-- TODO: Replace this with esmf -->
3935

4036
```
41-
npm install https://github.com/OpenManufacturingPlatform/sds-sdk-js-aspect-model-loader/releases/download/<TAG_VERSION>/sds-aspect-model-loader-x.x.x.tgz
37+
npm install @omp-sdk/aspect-model-loader
4238
```
4339

4440
## Usage
@@ -101,7 +97,7 @@ to update all index files under `src`. For more information see the project http
10197
## Documentation
10298

10399
Further documentation and howto's are provided in the
104-
official [JS SDK Aspect Model loader User Documentation](https://openmanufacturingplatform.github.io/sds-documentation/js-sdk-aml-guide/index.html)
100+
official [JS SDK User Documentation](https://openmanufacturingplatform.github.io/sds-documentation/js-sdk-guide/1.0.0/index.html)
105101

106102
## License
107103

@@ -111,4 +107,3 @@ This program and the accompanying materials are made available under the terms o
111107
[Mozilla Public License, v. 2.0](LICENSE).
112108

113109
The [Notice file](NOTICE.md) details contained third party materials.
114-

documentation/js-sdk-aml-guide/modules/ROOT/pages/index.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ For example a newly added property and the related value could be shown in the U
2222

2323
[source,bash]
2424
----
25-
npm install @sds/aspect-model-loader
25+
npm install @esmf/aspect-model-loader
2626
----
2727

2828
=== Install from github release repository:
2929

3030
[source,bash]
3131
----
32-
npm install https://github.com/OpenManufacturingPlatform/sds-sdk-js-aspect-model-loader/releases/download/<TAG_VERSION>/sds-aspect-model-loader-x.x.x.tgz
32+
npm install https://github.com/eclipse-esmf/esmf-sdk-js-aspect-model-loader/releases/download/<TAG_VERSION>/esmf-aspect-model-loader-x.x.x.tgz
3333
----
3434

3535
== Usage

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@sds/aspect-model-loader",
2+
"name": "@esmf/aspect-model-loader",
33
"version": "",
44
"description": "Instantiate and traverse defined Aspect Models natively in your TypeScript applications",
55
"main": "dist/index.js",
@@ -23,15 +23,15 @@
2323
"Twin",
2424
"Digital Twin",
2525
"Aspect Meta Model",
26-
"BAMM"
26+
"SAMM"
2727
],
2828
"author": "",
2929
"license": "mpl-2.0",
3030
"engines": {
3131
"node": ">=12.18.0"
3232
},
3333
"devDependencies": {
34-
"@babel/core": "7.18.5",
34+
"@babel/core": "7.18.13",
3535
"@babel/preset-env": "7.18.2",
3636
"@babel/preset-typescript": "7.17.12",
3737
"@types/jest": "28.1.1",

src/aspect-meta-model/default-property.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export class DefaultProperty extends Base implements Property {
119119
}
120120

121121
/**
122-
* Properties which are defined inline e.g. bamm:properties ( [ bamm:extends :abstractTestProperty ; bamm:characteristic bamm-c:Text ] ).
122+
* Properties which are defined inline e.g. samm:properties ( [ samm:extends :abstractTestProperty ; samm:characteristic samm-c:Text ] ).
123123
*/
124124
export class DefaultPropertyInstanceDefinition implements Property {
125125
/**

src/aspect-model-loader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export class AspectModelLoader {
4343
* @param modelAspectUrn URN of the Aspect Model to load and instantiate
4444
*
4545
* @param rdfContent List of all RDF/Turtle representation to load, including
46-
* all referenced models imports. The default BAMM related imports
47-
* e.g. with prefixes "bamm", "bamm-c", "bamm-e", "unit" and "xsd"
46+
* all referenced models imports. The default SAMM related imports
47+
* e.g. with prefixes "samm", "samm-c", "samm-e", "unit" and "xsd"
4848
* are already provided. No needs to provided that(content) is not
4949
* required.
5050
*

src/instantiator/aspect-instantiator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class AspectInstantiator {
3434

3535
createAspect(): Aspect {
3636
const aspectNode = <NamedNode>(
37-
this.rdfModel.store.getQuads(null, this.rdfModel.BAMM().RdfType(), this.rdfModel.BAMM().Aspect(), null)[0].subject
37+
this.rdfModel.store.getQuads(null, this.rdfModel.samm.RdfType(), this.rdfModel.samm.Aspect(), null)[0].subject
3838
);
3939
const metaModelElementInstantiator = new MetaModelElementInstantiator(
4040
this.rdfModel,

src/instantiator/base-constraint-characteristic-instantiator.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
import {NamedNode, Quad, Util} from 'n3';
1515
import {BaseMetaModelElement, DefaultConstraint} from '../aspect-meta-model';
1616
import {MetaModelElementInstantiator} from './meta-model-element-instantiator';
17-
import {Bamm, Bammc} from '../vocabulary';
17+
import {Samm, SammC} from '../vocabulary';
1818

1919
export class BaseConstraintCharacteristicInstantiator {
20-
public bamm: Bamm;
21-
public bammc: Bammc;
20+
public samm: Samm;
21+
public sammC: SammC;
2222

2323
constructor(
2424
protected metaModelElementInstantiator: MetaModelElementInstantiator,
2525
public nextProcessor?: BaseConstraintCharacteristicInstantiator
2626
) {
27-
this.bamm = metaModelElementInstantiator.BAMM();
28-
this.bammc = metaModelElementInstantiator.BAMMC();
27+
this.samm = metaModelElementInstantiator.samm;
28+
this.sammC = metaModelElementInstantiator.sammC;
2929
}
3030

3131
create(quad: Quad): BaseMetaModelElement {

src/instantiator/characteristic/characteristic-instantiator.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@
1414
import {MetaModelElementInstantiator} from '../meta-model-element-instantiator';
1515
import {NamedNode, Quad, Util} from 'n3';
1616
import {Characteristic, DefaultCharacteristic, DefaultEntity, DefaultScalar, Entity, Type} from '../../aspect-meta-model';
17-
import {BammCharacteristicInstantiator} from './bamm-characteristic-instantiator';
17+
import {PredefinedCharacteristicInstantiator} from './predefined-characteristic-instantiator';
1818
import {EntityInstantiator} from '../entity-instantiator';
1919
import {BaseConstraintCharacteristicInstantiator} from '../base-constraint-characteristic-instantiator';
2020

2121
export class CharacteristicInstantiator extends BaseConstraintCharacteristicInstantiator {
22-
private standardCharacteristicInstantiator: BammCharacteristicInstantiator;
22+
private standardCharacteristicInstantiator: PredefinedCharacteristicInstantiator;
2323

2424
constructor(protected metaModelElementInstantiator: MetaModelElementInstantiator, public nextProcessor?: CharacteristicInstantiator) {
2525
super(metaModelElementInstantiator, nextProcessor);
26-
this.standardCharacteristicInstantiator = new BammCharacteristicInstantiator(metaModelElementInstantiator);
26+
this.standardCharacteristicInstantiator = new PredefinedCharacteristicInstantiator(metaModelElementInstantiator);
2727
}
2828

2929
create(quad: Quad): Characteristic {
30-
let characteristic: Characteristic = this.determineBAMMDefaultCharacteristic(quad);
30+
let characteristic: Characteristic = this.determineDefaultCharacteristic(quad);
3131
if (characteristic) {
3232
return characteristic;
3333
}
@@ -36,7 +36,7 @@ export class CharacteristicInstantiator extends BaseConstraintCharacteristicInst
3636
characteristic.dataType = this.getDataType(
3737
this.metaModelElementInstantiator.rdfModel
3838
.findAnyProperty(quad)
39-
.find(propertyQuad => this.bamm.isDataTypeProperty(propertyQuad.predicate.value))
39+
.find(propertyQuad => this.samm.isDataTypeProperty(propertyQuad.predicate.value))
4040
);
4141

4242
if (characteristic.dataType && characteristic.dataType.isComplex) {
@@ -55,16 +55,16 @@ export class CharacteristicInstantiator extends BaseConstraintCharacteristicInst
5555
return <Characteristic>this.metaModelElementInstantiator.cacheService.resolveInstance(characteristic);
5656
}
5757

58-
private determineBAMMDefaultCharacteristic(quad: Quad): Characteristic | undefined {
58+
private determineDefaultCharacteristic(quad: Quad): Characteristic | undefined {
5959
// resolve actual element quad in case of a blank node which is most likely the case
6060
// for characteristics
6161
const elementQuad = Util.isBlankNode(quad.object)
6262
? this.metaModelElementInstantiator.rdfModel.resolveBlankNodes(quad.object.value).shift()
6363
: quad;
6464

65-
// check if the found quad target a default BAMM characteristic e.g. Text or Code in this case
65+
// check if the found quad target a default SAMM characteristic e.g. Text or Code in this case
6666
// return the exiting default characteristic
67-
if (elementQuad.object.value.startsWith(this.metaModelElementInstantiator.BAMMC().getNamespace())) {
67+
if (elementQuad.object.value.startsWith(this.metaModelElementInstantiator.sammC.getNamespace())) {
6868
const standardCharacteristic = this.standardCharacteristicInstantiator.createCharacteristic(<NamedNode>elementQuad.object);
6969
if (standardCharacteristic) {
7070
return standardCharacteristic;
@@ -86,13 +86,13 @@ export class CharacteristicInstantiator extends BaseConstraintCharacteristicInst
8686
}
8787

8888
isEntity(quad: Quad): boolean {
89-
if (this.bamm.Entity().equals(quad.object) || this.bamm.AbstractEntity().equals(quad.object)) {
89+
if (this.samm.Entity().equals(quad.object) || this.samm.AbstractEntity().equals(quad.object)) {
9090
return true;
9191
}
9292

9393
const propertyFound = this.metaModelElementInstantiator.rdfModel
9494
.findAnyProperty(quad)
95-
.find(quadProperty => this.bamm.Entity().equals(quadProperty.subject));
95+
.find(quadProperty => this.samm.Entity().equals(quadProperty.subject));
9696

9797
return !!propertyFound;
9898
}
@@ -119,7 +119,7 @@ export class CharacteristicInstantiator extends BaseConstraintCharacteristicInst
119119
const entity = new EntityInstantiator(this.metaModelElementInstantiator).createEntity(
120120
quadEntity,
121121
quadEntity.find(
122-
quad => this.bamm.isRdfTypeProperty(quad.predicate.value) && this.bamm.isAbstractEntity(quad.object.value)
122+
quad => this.samm.isRdfTypeProperty(quad.predicate.value) && this.samm.isAbstractEntity(quad.object.value)
123123
) !== undefined
124124
);
125125
return <Entity>this.metaModelElementInstantiator.cacheService.resolveInstance(entity);
@@ -131,17 +131,17 @@ export class CharacteristicInstantiator extends BaseConstraintCharacteristicInst
131131
private getEffectiveType(quad: Quad): Quad {
132132
if (Util.isBlankNode(quad.subject)) {
133133
let resolvedQuad: Array<Quad>;
134-
if (this.bamm.isDataTypeProperty(quad.predicate.value)) {
134+
if (this.samm.isDataTypeProperty(quad.predicate.value)) {
135135
resolvedQuad = [quad];
136136
} else {
137137
resolvedQuad = this.metaModelElementInstantiator.rdfModel.store.getQuads(quad.subject, null, null, null);
138138
}
139139

140-
quad = resolvedQuad.find(propertyQuad => this.bamm.isDataTypeProperty(propertyQuad.predicate.value));
141-
} else if (quad.predicate.value === `${this.bamm.getRdfSyntaxNameSpace()}type`) {
140+
quad = resolvedQuad.find(propertyQuad => this.samm.isDataTypeProperty(propertyQuad.predicate.value));
141+
} else if (quad.predicate.value === `${this.samm.getRdfSyntaxNameSpace()}type`) {
142142
const resolvedQuad = this.metaModelElementInstantiator.rdfModel.store.getQuads(quad.subject, null, null, null);
143143

144-
quad = resolvedQuad.find(propertyQuad => this.bamm.isDataTypeProperty(propertyQuad.predicate.value));
144+
quad = resolvedQuad.find(propertyQuad => this.samm.isDataTypeProperty(propertyQuad.predicate.value));
145145
}
146146

147147
return quad;

0 commit comments

Comments
 (0)