Skip to content

Commit e75ea3c

Browse files
committed
Refactoring JSON-LD functionality
1 parent 276ccf8 commit e75ea3c

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/jsonld/AspectModelJsonLdGeneratorTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
import org.eclipse.esmf.test.TestAspect;
88
import org.eclipse.esmf.test.TestResources;
99

10-
import com.github.jsonldjava.core.JsonLdError;
1110
import org.junit.jupiter.api.Test;
1211

1312
class AspectModelJsonLdGeneratorTest {
1413

1514
@Test
16-
void generateTest() throws JsonLdError {
15+
void generateTest() {
1716
final Aspect aspect = TestResources.load( TestAspect.ASPECT_WITH_ENTITY_LIST ).aspect();
1817
final AspectModelToJsonLdGenerator jsonGenerator = new AspectModelToJsonLdGenerator( aspect );
1918
final String generatedJsonLd = jsonGenerator.generateJsonLd();

documentation/developer-guide/modules/tooling-guide/pages/maven-plugin.adoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -523,11 +523,9 @@ Configuration Properties:
523523
| `outputDirectory` | The path to the directory where the generated JSON payload will be written to. | `String` | none | {ok}
524524
|===
525525

526-
=== Generating Sample JSON-LD
526+
=== Generating JSON-LD representation of an Aspect Model
527527

528-
The `generateJsonLd` goal generates a valid sample JSON-LD for a given Aspect Model as it
529-
could be returned by an Aspect that implements that Aspect Model. The default life cycle phase for
530-
the goal is `generate-resources`.
528+
The `generateJsonLd` goal generates a JSON-LD represention of a given Aspect Model. The default life cycle phase for the goal is `generate-resources`.
531529

532530
Usage:
533531

documentation/developer-guide/modules/tooling-guide/pages/samm-cli.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ The available options and their meaning can also be seen in the help text of the
146146
.3+| [[aspect-to-json]] aspect <model> to json | Generate example JSON payload data for an Aspect Model | `samm aspect AspectModel.ttl to json`
147147
| _--output, -o_ : output file path (default: stdout) |
148148
| _--custom-resolver_ : use an external resolver for the resolution of the model elements |
149-
.3+| [[aspect-to-jsonld]] aspect <model> to jsonld | Generate example JSON-LD data for an Aspect Model | `samm aspect AspectModel.ttl to jsonld`
149+
.3+| [[aspect-to-jsonld]] aspect <model> to jsonld | Generate JSON-LD representation of an Aspect Model | `samm aspect AspectModel.ttl to jsonld`
150150
| _--output, -o_ : output file path (default: stdout) |
151151
| _--custom-resolver_ : use an external resolver for the resolution of the model elements |
152152
.4+| [[aspect-to-schema]] aspect <model> to schema | Generate JSON schema for an Aspect Model | `samm aspect AspectModel.ttl to schema`

tools/esmf-aspect-model-maven-plugin/src/main/java/org/eclipse/esmf/aspectmodel/GenerateJsonLd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ public void executeGeneration() throws MojoExecutionException, MojoFailureExcept
4343
} catch ( final IOException exception ) {
4444
throw new MojoExecutionException( "Could not generate JSON-LD.", exception );
4545
}
46-
LOG.info( "Successfully generated example JSON-LD for Aspect Models." );
46+
LOG.info( "Successfully generated JSON-LD for Aspect Models." );
4747
}
4848
}

tools/samm-cli/src/main/java/org/eclipse/esmf/aspect/to/AspectToJsonLdCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import picocli.CommandLine;
2626

2727
@CommandLine.Command( name = AspectToJsonLdCommand.COMMAND_NAME,
28-
description = "Generate JSON-LD specification for an Aspect Model",
28+
description = "Generate JSON-LD representation of an Aspect Model",
2929
descriptionHeading = "%n@|bold Description|@:%n%n",
3030
parameterListHeading = "%n@|bold Parameters|@:%n",
3131
optionListHeading = "%n@|bold Options|@:%n"

0 commit comments

Comments
 (0)