Skip to content

Commit

Permalink
Version 0.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lcbarcellos committed Jun 26, 2020
2 parents 4c0d429 + 29ad5f4 commit 7a2677d
Show file tree
Hide file tree
Showing 14 changed files with 2,005 additions and 17 deletions.
57 changes: 55 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>br.ufes.inf.nemo</groupId>
<artifactId>ufo-protege-plugin</artifactId>
<version>0.0.4</version>
<version>0.0.5</version>
<packaging>bundle</packaging>

<name>UFO Protégé Plugin</name>
Expand Down Expand Up @@ -95,10 +95,40 @@
<artifactId>rhino</artifactId>
<version>1.7.12</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.6.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.6.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.6.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.3.3</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<!-- Specifying surefire plugin for enabling JUnit 5 tests -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
Expand Down Expand Up @@ -183,6 +213,29 @@
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>convert-package-to-path</id>
<goals><goal>regex-property</goal></goals>
<configuration>
<name>validation.main.package.path</name>
<value>${validation.main.package}</value>
<regex>\.</regex>
<replacement>${file.separator}</replacement>
<failIfNoMatch>false</failIfNoMatch>
</configuration>
</execution>
<execution>
<id>add-test-resource</id>
<goals><goal>add-test-resource</goal></goals>
<configuration>
<resources>
<resource>
<directory>${basedir}/src/general/owl</directory>
<targetPath>${validation.main.package.path}</targetPath>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>add-generated-sources</id>
<phase>generate-sources</phase>
Expand All @@ -196,7 +249,7 @@
</configuration>
</execution>
<execution>
<id>add-annotation-list</id>
<id>add-generated-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
Expand Down
16 changes: 13 additions & 3 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var
options = {
gufo: {
iri: "${gufo.iri}",
localFile: "${gufo.ontology.file}"
localFile: "${basedir}/src/general/owl/gufo.ttl"
},
gufoIris: {
ufoTreeFile: "${basedir}/scripts/ufo-tree.txt",
Expand All @@ -29,7 +29,8 @@ var
targetFile: null,
prefixes: [],
nsToPrefix: {},
tree: []
tree: [],
treeClassNames: {}
},

// Making Netbeans happy
Expand Down Expand Up @@ -210,6 +211,7 @@ function generatePublicClassesSetAndTreeHierarchy() {
configData,

tree = gufoIris.tree,
treeClassNames = gufoIris.treeClassNames,
parent,
prefixes = {},
pattern, match,
Expand Down Expand Up @@ -259,7 +261,7 @@ function generatePublicClassesSetAndTreeHierarchy() {
}
}
parent = tree[levelInfo.index];
tree.push({
tree.push(treeClassNames[name] = {
namespace: prefixes[prefix],
shortForm: name,
childrenCount: 0,
Expand Down Expand Up @@ -332,6 +334,14 @@ function generateGufoIrisClassFile() {
ClassName: node => node.shortForm,
INDEX: node => node.index
}
},
"notInTreeClassName": {
items: gufoIris.classIRIs
.filter(iri => gufoIris.nsToPrefix[iri.namespace])
.filter(iri => !gufoIris.treeClassNames[iri.shortForm]),
map: {
ClassName: iri => iri.shortForm
}
}
};

Expand Down
Loading

0 comments on commit 7a2677d

Please sign in to comment.