Added model name to registration provider
This commit is contained in:
parent
a00424f27b
commit
320a3259f1
|
@ -2,9 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
# Changelog for gCube Model
|
||||
|
||||
## [v4.0.1-SNAPSHOT]
|
||||
## [v4.1.0-SNAPSHOT]
|
||||
|
||||
- Adding documentation generation
|
||||
- Added model name to registration provider
|
||||
|
||||
## [v4.0.0]
|
||||
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -10,7 +10,7 @@
|
|||
|
||||
<groupId>org.gcube.resource-management</groupId>
|
||||
<artifactId>gcube-model</artifactId>
|
||||
<version>4.0.1-SNAPSHOT</version>
|
||||
<version>4.1.0-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>
|
||||
|
|
|
@ -15,6 +15,8 @@ import org.gcube.resourcemanagement.model.reference.relations.isrelatedto.Activa
|
|||
*/
|
||||
public class GCubeModelRegistrationProvider implements RegistrationProvider {
|
||||
|
||||
public static final String GCUBE_MODEL_NAME = "gCube Model";
|
||||
|
||||
@Override
|
||||
public List<Package> getPackagesToRegister() {
|
||||
List<Package> packages = new ArrayList<>();
|
||||
|
@ -25,5 +27,10 @@ public class GCubeModelRegistrationProvider implements RegistrationProvider {
|
|||
packages.add(HasContact.class.getPackage());
|
||||
return packages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelName() {
|
||||
return GCUBE_MODEL_NAME;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
package org.gcube.resourcemanagement.documentation;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.informationsystem.utils.documentation.DocumentationGenerator;
|
||||
import org.gcube.resourcemanagement.model.impl.GCubeModelRegistrationProvider;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class ISMDiscoveryForDocumentation {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ISMDiscoveryForDocumentation.class);
|
||||
|
||||
@Test
|
||||
public void generateDocumentation() throws Exception {
|
||||
File documentationDirectory = new File("docs");
|
||||
DocumentationGenerator documentationGenerator = new DocumentationGenerator(documentationDirectory);
|
||||
|
||||
// Type type = TypeMapper.createTypeDefinition(ValueSchema.class);
|
||||
// documentationGenerator.generatePropertySection(type);
|
||||
List<Package> pkgs = (new GCubeModelRegistrationProvider()).getPackagesToRegister();
|
||||
documentationGenerator.generate(pkgs);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue