Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Projects
The Eclipse Integrated Computational Environment
ice
Commits
ff18c728
Unverified
Commit
ff18c728
authored
Jul 27, 2020
by
Gregory Cage
Committed by
GitHub
Jul 27, 2020
Browse files
Merge pull request
#3
from eclipse/next
Next
parents
1ae7dae1
dd3d5f82
Changes
76
Show whitespace changes
Inline
Side-by-side
org.eclipse.ice.data/.classpath
View file @
ff18c728
...
...
@@ -23,6 +23,33 @@
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
excluding=
"**"
kind=
"src"
output=
"target/test-classes"
path=
"src/test/resources"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
<attribute
name=
"test"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"src"
path=
"target/generated-sources/annotations"
>
<attributes>
<attribute
name=
"optional"
value=
"true"
/>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
<attribute
name=
"ignore_optional_problems"
value=
"true"
/>
<attribute
name=
"m2e-apt"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"src"
output=
"target/test-classes"
path=
"target/generated-test-sources/test-annotations"
>
<attributes>
<attribute
name=
"optional"
value=
"true"
/>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
<attribute
name=
"ignore_optional_problems"
value=
"true"
/>
<attribute
name=
"m2e-apt"
value=
"true"
/>
<attribute
name=
"test"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"output"
path=
"target/classes"
/>
</classpath>
org.eclipse.ice.data/.settings/org.eclipse.jdt.core.prefs
View file @
ff18c728
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1
.8
org.eclipse.jdt.core.compiler.compliance=1
.8
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1
1
org.eclipse.jdt.core.compiler.compliance=1
1
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1
.8
org.eclipse.jdt.core.compiler.source=1
1
org.eclipse.ice.data/pom.xml
View file @
ff18c728
...
...
@@ -5,21 +5,39 @@
<groupId>
org.eclipse.ice
</groupId>
<artifactId>
org.eclipse.ice.data
</artifactId>
<version>
0.0
.1
-SNAPSHOT
</version>
<version>
3.
0.0-SNAPSHOT
</version>
<packaging>
jar
</packaging>
<name>
org.eclipse.ice.data
</name>
<url>
https://www.eclipse.org/ice
</url>
<properties>
<java.version>
11
</java.version>
<maven.compiler.source>
11
</maven.compiler.source>
<maven.compiler.target>
11
</maven.compiler.target>
<maven.compiler.release>
11
</maven.compiler.release>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<artifactId>
maven-surefire-plugin
</artifactId>
<version>
2.22.2
</version>
</plugin>
<plugin>
<artifactId>
maven-failsafe-plugin
</artifactId>
<version>
2.22.2
</version>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.1
2
</version>
<groupId>
org.
junit
.jupiter
</groupId>
<artifactId>
junit
-jupiter
</artifactId>
<version>
5.6.
2
</version>
<scope>
test
</scope>
</dependency>
...
...
org.eclipse.ice.d
ev/org.eclipse.ice.dev.annotations
/src/main/java/org/eclipse/ice/d
ev/annotations
/IDataElement.java
→
org.eclipse.ice.d
ata
/src/main/java/org/eclipse/ice/d
ata
/IDataElement.java
View file @
ff18c728
package
org.eclipse.ice.dev.annotations
;
/******************************************************************************
* Copyright (c) 2020- UT-Battelle, LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Initial API and implementation and/or initial documentation -
* Daniel Bluhm
*****************************************************************************/
package
org.eclipse.ice.data
;
import
java.util.UUID
;
...
...
org.eclipse.ice.d
ev/org.eclipse.ice.dev.annotations
/src/main/java/org/eclipse/ice/d
ev/annotations
/IPersistenceHandler.java
→
org.eclipse.ice.d
ata
/src/main/java/org/eclipse/ice/d
ata
/IPersistenceHandler.java
View file @
ff18c728
package
org.eclipse.ice.dev.annotations
;
/******************************************************************************
* Copyright (c) 2020- UT-Battelle, LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Initial API and implementation and/or initial documentation -
* Daniel Bluhm
*****************************************************************************/
package
org.eclipse.ice.data
;
import
java.util.UUID
;
...
...
org.eclipse.ice.d
ev/org.eclipse.ice.dev.annotations
/src/main/java/org/eclipse/ice/d
ev/annotations
/JavascriptValidator.java
→
org.eclipse.ice.d
ata
/src/main/java/org/eclipse/ice/d
ata
/JavascriptValidator.java
View file @
ff18c728
...
...
@@ -9,7 +9,7 @@
* Initial API and implementation and/or initial documentation -
* Jay Jay Billings
*******************************************************************************/
package
org.eclipse.ice.d
ev.annotations
;
package
org.eclipse.ice.d
ata
;
import
java.io.Serializable
;
import
javax.script.Invocable
;
...
...
org.eclipse.ice.data/src/test/java/org/eclipse/ice/tests/data/ComponentBuilderTest.java
View file @
ff18c728
...
...
@@ -11,7 +11,9 @@
*****************************************************************************/
package
org.eclipse.ice.tests.data
;
import
static
org
.
junit
.
Assert
.*;
import
org.junit.jupiter.api.BeforeAll
;
import
org.junit.jupiter.api.Test
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.*;
import
org.apache.jena.ontology.OntModel
;
import
org.apache.jena.ontology.OntModelSpec
;
...
...
@@ -21,8 +23,6 @@ import org.apache.jena.rdf.model.Resource;
import
org.apache.jena.util.FileManager
;
import
org.eclipse.ice.data.ComponentBuilder
;
import
org.eclipse.ice.data.ICEDataConstants
;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
/**
* This class tests {@link ComponentBuilder}.
...
...
@@ -46,7 +46,7 @@ public class ComponentBuilderTest {
/**
* @throws java.lang.Exception
*/
@Before
Class
@Before
All
public
static
void
setUpBeforeClass
()
throws
Exception
{
// Load the ontology
Model
baseModel
=
FileManager
.
get
().
loadModel
(
"data/org.eclipse.ice.data.owl.ttl"
,
null
,
"TURTLE"
);
...
...
org.eclipse.ice.data/src/test/java/org/eclipse/ice/tests/data/CompositeBuilderTest.java
View file @
ff18c728
...
...
@@ -11,22 +11,24 @@
*****************************************************************************/
package
org.eclipse.ice.tests.data
;
import
static
org
.
junit
.
Assert
.*;
import
static
org
.
junit
.
jupiter
.
api
.
Assert
ions
.*;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
org.junit.jupiter.api.BeforeAll
;
import
org.junit.jupiter.api.Disabled
;
import
org.junit.jupiter.api.Test
;
/**
* This class tests {@link CompositeBuilder}.
* @author Jay Jay Billings
*
*/
@Disabled
public
class
CompositeBuilderTest
{
/**
* @throws java.lang.Exception
*/
@Before
Class
@Before
All
public
static
void
setUpBeforeClass
()
throws
Exception
{
}
...
...
org.eclipse.ice.data/src/test/java/org/eclipse/ice/tests/data/ICEModelFactoryTest.java
View file @
ff18c728
...
...
@@ -11,13 +11,13 @@
*****************************************************************************/
package
org.eclipse.ice.tests.data
;
import
static
org
.
junit
.
Assert
.*;
import
static
org
.
junit
.
jupiter
.
api
.
Assert
ions
.*;
import
org.apache.jena.rdf.model.Model
;
import
org.eclipse.ice.data.ComponentBuilder
;
import
org.eclipse.ice.data.ICEModelFactory
;
import
org.junit.Before
Class
;
import
org.junit.Test
;
import
org.junit.
jupiter.api.
Before
All
;
import
org.junit.
jupiter.api.
Test
;
/**
* This class tests the ModelFactory used to build ICE's data structures.
...
...
@@ -30,7 +30,7 @@ public class ICEModelFactoryTest {
/**
* @throws java.lang.Exception
*/
@Before
Class
@Before
All
public
static
void
setUpBeforeClass
()
throws
Exception
{
}
...
...
org.eclipse.ice.data/src/test/java/org/eclipse/ice/tests/data/ModelValidatorTest.java
View file @
ff18c728
...
...
@@ -11,10 +11,11 @@
*****************************************************************************/
package
org.eclipse.ice.tests.data
;
import
static
org
.
junit
.
Assert
.*;
import
static
org
.
junit
.
jupiter
.
api
.
Assert
ions
.*;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
org.junit.jupiter.api.BeforeAll
;
import
org.junit.jupiter.api.Disabled
;
import
org.junit.jupiter.api.Test
;
/**
* This class is responsible for insuring that the ModelValidator can correctly
...
...
@@ -23,12 +24,13 @@ import org.junit.Test;
* @author Jay Jay Billings
*
*/
@Disabled
public
class
ModelValidatorTest
{
/**
* @throws java.lang.Exception
*/
@Before
Class
@Before
All
public
static
void
setUpBeforeClass
()
throws
Exception
{
}
...
...
org.eclipse.ice.dev/org.eclipse.ice.dev.annotations.proxytest/pom.xml
View file @
ff18c728
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
org.eclipse.ice.dev
</groupId>
...
...
@@ -78,5 +80,11 @@
<artifactId>
org.eclipse.ice.dev.annotations
</artifactId>
<version>
3.0.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
org.eclipse.ice
</groupId>
<artifactId>
org.eclipse.ice.data
</artifactId>
<version>
3.0.0-SNAPSHOT
</version>
<scope>
provided
</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
org.eclipse.ice.dev/org.eclipse.ice.dev.annotations.proxytest/src/test/java/org/eclipse/ice/dev/annotations/proxytest/GeneratedDataElementTest.java
View file @
ff18c728
...
...
@@ -13,7 +13,7 @@ package org.eclipse.ice.dev.annotations.proxytest;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.*;
import
org.eclipse.ice.d
ev.annotations
.JavascriptValidator
;
import
org.eclipse.ice.d
ata
.JavascriptValidator
;
import
org.junit.jupiter.api.Test
;
/**
...
...
org.eclipse.ice.dev/org.eclipse.ice.dev.annotations.proxytest/src/test/java/org/eclipse/ice/dev/annotations/proxytest/JavascriptValidatorTest.java
View file @
ff18c728
...
...
@@ -2,7 +2,7 @@ package org.eclipse.ice.dev.annotations.proxytest;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.*;
import
org.eclipse.ice.d
ev.annotations
.JavascriptValidator
;
import
org.eclipse.ice.d
ata
.JavascriptValidator
;
import
org.junit.jupiter.api.Test
;
/**
...
...
org.eclipse.ice.dev/org.eclipse.ice.dev.annotations/pom.xml
View file @
ff18c728
...
...
@@ -96,6 +96,12 @@
<artifactId>
mongo-java-driver
</artifactId>
<version>
3.12.2
</version>
</dependency>
<dependency>
<groupId>
org.eclipse.ice
</groupId>
<artifactId>
org.eclipse.ice.data
</artifactId>
<version>
3.0.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
<parent>
...
...
org.eclipse.ice.dev/org.eclipse.ice.dev.annotations/src/main/java/org/eclipse/ice/dev/annotations/DataElement.java
View file @
ff18c728
/******************************************************************************
* Copyright (c) 2020- UT-Battelle, LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Initial API and implementation and/or initial documentation -
* Jay Jay Billings, Daniel Bluhm
*****************************************************************************/
package
org.eclipse.ice.dev.annotations
;
import
java.lang.annotation.Retention
;
...
...
@@ -38,9 +49,10 @@ import java.lang.annotation.RetentionPolicy;
* {@code PersonImplementation}) that fulfills that interface.
*
*
* @see org.eclipse.ice.d
ev.annotations
.IDataElement
* @see org.eclipse.ice.d
ata
.IDataElement
* @see org.eclipse.ice.dev.annotations.DataField
* @author Daniel Bluhm
* @author Jay Jay Billings
*/
@Target
(
ElementType
.
TYPE
)
@Retention
(
RetentionPolicy
.
SOURCE
)
...
...
org.eclipse.ice.dev/org.eclipse.ice.dev.annotations/src/main/java/org/eclipse/ice/dev/annotations/DataField.java
View file @
ff18c728
/******************************************************************************
* Copyright (c) 2020- UT-Battelle, LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Initial API and implementation and/or initial documentation -
* Jay Jay Billings, Daniel Bluhm
*****************************************************************************/
package
org.eclipse.ice.dev.annotations
;
import
java.lang.annotation.ElementType
;
...
...
@@ -11,6 +22,7 @@ import java.lang.annotation.Target;
* @see org.eclipse.ice.dev.annotations.DataElement
* @see org.eclipse.ice.dev.annotations.DataField.Default
* @author Daniel Bluhm
* @author Jay Jay Billings
*/
@Target
(
ElementType
.
FIELD
)
@Retention
(
RetentionPolicy
.
SOURCE
)
...
...
@@ -34,7 +46,7 @@ public @interface DataField {
/**
* Flag whether this field should be included in
* {@link org.eclipse.ice.d
ev.annotations
.IDataElement#matches(Object)}.
* {@link org.eclipse.ice.d
ata
.IDataElement#matches(Object)}.
* @return match annotation value
* @see org.eclipse.ice.dev.annotations.processors.Field#match
*/
...
...
@@ -53,10 +65,10 @@ public @interface DataField {
* Flag whether this field should be searchable in a collection.
* This causes persistence retrieval methods to be generated for this
* field.
* @return search annotation value
* @see org.eclipse.ice.dev.annotations.processors.Field#search
* @return search
able
annotation value
* @see org.eclipse.ice.dev.annotations.processors.Field#search
able
*/
boolean
search
()
default
true
;
boolean
search
able
()
default
true
;
/**
* Flag whether this field can have a value of null. This causes
...
...
org.eclipse.ice.dev/org.eclipse.ice.dev.annotations/src/main/java/org/eclipse/ice/dev/annotations/processors/DataElementProcessor.java
View file @
ff18c728
...
...
@@ -174,6 +174,7 @@ public class DataElementProcessor extends AbstractProcessor {
.
packageName
(
element
.
getPackageName
())
.
elementInterface
(
element
.
getName
())
.
className
(
element
.
getPersistenceHandlerName
())
.
interfaceName
(
element
.
getPersistenceHandlerInterfaceName
())
.
implementation
(
element
.
getImplName
())
.
collection
(
collectionName
)
.
fields
(
fields
)
...
...
org.eclipse.ice.dev/org.eclipse.ice.dev.annotations/src/main/java/org/eclipse/ice/dev/annotations/processors/DataElementSpec.java
View file @
ff18c728
/******************************************************************************
* Copyright (c) 2019- UT-Battelle, LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Initial API and implementation and/or initial documentation -
* Daniel Bluhm
*****************************************************************************/
package
org.eclipse.ice.dev.annotations.processors
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -11,6 +21,7 @@ import javax.lang.model.element.ElementKind;
import
javax.lang.model.element.TypeElement
;
import
javax.lang.model.util.Elements
;
import
org.eclipse.ice.data.IPersistenceHandler
;
import
org.eclipse.ice.dev.annotations.DataElement
;
import
org.eclipse.ice.dev.annotations.DataFieldJson
;
import
org.eclipse.ice.dev.annotations.Persisted
;
...
...
@@ -179,4 +190,15 @@ public class DataElementSpec extends AnnotatedElement {
.
map
(
jsons
->
Arrays
.
asList
(
jsons
.
value
()))
.
orElse
(
Collections
.
emptyList
());
}
/**
* Get the interface name of the persistence handler.
*
* Right now, this is simply the IPersistenceHandler interface. In the future
* this will be a data element specific interface.
* @return Interface name of the Persistence Handler
*/
public
String
getPersistenceHandlerInterfaceName
()
{
return
org
.
eclipse
.
ice
.
data
.
IPersistenceHandler
.
class
.
getSimpleName
();
}
}
org.eclipse.ice.dev/org.eclipse.ice.dev.annotations/src/main/java/org/eclipse/ice/dev/annotations/processors/DataFieldSpec.java
View file @
ff18c728
...
...
@@ -138,7 +138,7 @@ public class DataFieldSpec extends AnnotatedElement {
.
setter
(
fieldInfo
.
setter
())
.
match
(
fieldInfo
.
match
())
.
unique
(
fieldInfo
.
unique
())
.
search
(
fieldInfo
.
search
())
.
search
able
(
fieldInfo
.
search
able
())
.
nullable
(
fieldInfo
.
nullable
())
.
build
();
}
...
...
org.eclipse.ice.dev/org.eclipse.ice.dev.annotations/src/main/java/org/eclipse/ice/dev/annotations/processors/DefaultFields.java
View file @
ff18c728
...
...
@@ -4,7 +4,7 @@ import java.util.Arrays;
import
java.util.List
;
import
java.util.UUID
;
import
org.eclipse.ice.d
ev.annotations
.JavascriptValidator
;
import
org.eclipse.ice.d
ata
.JavascriptValidator
;
/**
* Aggregation of fields generated and included in <code>@DataElement</code>
...
...
@@ -117,7 +117,7 @@ public class DefaultFields {
.
docString
(
"The validator used to check the correctness of the data."
)
.
nullable
(
true
)
.
defaultField
(
true
)
.
search
(
false
)
.
search
able
(
false
)
.
build
();
/**
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment