Adding documentation generation

This commit is contained in:
Luca Frosini 2022-12-13 10:35:50 +01:00
parent b363380dc1
commit a00424f27b
4 changed files with 19 additions and 5 deletions

View File

@ -2,6 +2,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for gCube Model
## [v4.0.1-SNAPSHOT]
- Adding documentation generation
## [v4.0.0]
- Aligned model with the model defined in Luca Frosini PhD dissertation [#20367]

1
docs/readme.txt Normal file
View File

@ -0,0 +1 @@
In this directory will be automatically created the documentation

View File

@ -10,7 +10,7 @@
<groupId>org.gcube.resource-management</groupId>
<artifactId>gcube-model</artifactId>
<version>4.0.0</version>
<version>4.0.1-SNAPSHOT</version>
<name>gCube Resources</name>
<description>gCube Model is a resource model built on top of IS Model which captures the different aspects of the resources and their relations playing significant roles in a research infrastructure empowered by gCube</description>
<packaging>jar</packaging>
@ -71,5 +71,11 @@
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.gcube.information-system</groupId>
<artifactId>information-system-model-documentation-generator</artifactId>
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -1,7 +1,7 @@
package org.gcube.resourcemanagement.documentation;
import java.io.File;
import java.net.URL;
import java.util.List;
import org.gcube.informationsystem.utils.documentation.DocumentationGenerator;
import org.gcube.resourcemanagement.model.impl.GCubeModelRegistrationProvider;
@ -18,9 +18,12 @@ public class ISMDiscoveryForDocumentation {
@Test
public void generateDocumentation() throws Exception {
URL directoryURL = GCubeModelRegistrationProvider.class.getClassLoader().getResource("docs");
File documentationDirectory = new File(directoryURL.toURI());
File documentationDirectory = new File("docs");
DocumentationGenerator documentationGenerator = new DocumentationGenerator(documentationDirectory);
documentationGenerator.generate();
// Type type = TypeMapper.createTypeDefinition(ValueSchema.class);
// documentationGenerator.generatePropertySection(type);
List<Package> pkgs = (new GCubeModelRegistrationProvider()).getPackagesToRegister();
documentationGenerator.generate(pkgs);
}
}