Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
parallel-rsync
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rosi
parallel-rsync
Commits
e4acfb4a
Commit
e4acfb4a
authored
4 years ago
by
Tim Kluge
Browse files
Options
Downloads
Patches
Plain Diff
Add quickstart
parent
4067dbce
No related branches found
No related tags found
No related merge requests found
Pipeline
#9684
passed
4 years ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+16
-7
16 additions, 7 deletions
README.md
quickstart/pom.xml
+79
-0
79 additions, 0 deletions
quickstart/pom.xml
quickstart/src/main/scala/de/tudresden/inf/st/rmsc/quickstart/Main.scala
+26
-0
26 additions, 0 deletions
...main/scala/de/tudresden/inf/st/rmsc/quickstart/Main.scala
with
121 additions
and
7 deletions
README.md
+
16
−
7
View file @
e4acfb4a
...
...
@@ -4,7 +4,21 @@ Supplementary material for the [COP 2021](https://conf.researchr.org/track/ecoop
The repository contains the source code of a library to be used as a core for systems synchronizing heterogenous object-oriented models.
## Installation
## Prerequisites
*
Java SE Development Kit 8 (minimum)
*
Maven 3.6.0 (minimum)
## Example
A minimal example project is available in
`quickstart`
, which just creates a new element at the central hub.
To run it, clone the repository and run
`mvn package exec:java`
in
`quickstart`
.
## Development
If you want to work on the actual library:
### Installation
This project is based on Maven, thus building it is simple:
...
...
@@ -13,18 +27,13 @@ This project is based on Maven, thus building it is simple:
3.
run mvn -compile
4.
run mvn -package
## Setting up IntelliJ
##
#
Setting up IntelliJ
1.
Install IntelliJ's Plugin for Scala-Support
2.
Clone this maven project
3.
Import the project into IntelliJ
4.
Wait till all dependencies are downloaded / installed
### Prerequisites
*
Java SE Development Kit 8 (minimum)
*
Maven 3.6.0 (minimum)
### Example Model Code
*
see https://git-st.inf.tu-dresden.de/rosi/parallel-rsync/-/tree/master/crm-example
This diff is collapsed.
Click to expand it.
quickstart/pom.xml
0 → 100644
+
79
−
0
View file @
e4acfb4a
<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
de.tudresden.inf.st.rmsc
</groupId>
<artifactId>
quickstart
</artifactId>
<version>
1.0.0
</version>
<packaging>
jar
</packaging>
<name>
Role-Model-Sync Conflict-Resolver Quickstart example
</name>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<java.version>
1.8
</java.version>
</properties>
<repositories>
<repository>
<id>
gitlab-maven
</id>
<url>
https://git-st.inf.tu-dresden.de/api/v4/projects/959/packages/maven
</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>
gitlab-maven
</id>
<url>
https://git-st.inf.tu-dresden.de/api/v4/projects/959/packages/maven
</url>
</repository>
<snapshotRepository>
<id>
gitlab-maven
</id>
<url>
https://git-st.inf.tu-dresden.de/api/v4/projects/959/packages/maven
</url>
</snapshotRepository>
</distributionManagement>
<dependencies>
<!-- SCALA LANGUAGE -->
<dependency>
<groupId>
org.scala-lang
</groupId>
<artifactId>
scala-library
</artifactId>
<version>
2.12.8
</version>
</dependency>
<!-- Parallel RSYNC -->
<dependency>
<groupId>
de.tudresden.inf.st.rmsc
</groupId>
<artifactId>
crm-example
</artifactId>
<version>
1.0.2
</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
net.alchim31.maven
</groupId>
<artifactId>
scala-maven-plugin
</artifactId>
<version>
3.1.3
</version>
<executions>
<execution>
<goals>
<goal>
compile
</goal>
<goal>
testCompile
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
exec-maven-plugin
</artifactId>
<version>
1.1
</version>
<configuration>
<mainClass>
de.tudresden.inf.st.rmsc.quickstart.Main
</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
quickstart/src/main/scala/de/tudresden/inf/st/rmsc/quickstart/Main.scala
0 → 100644
+
26
−
0
View file @
e4acfb4a
package
de.tudresden.inf.st.rmsc.quickstart
import
de.tudresden.inf.st.crme.models.MetaModels
import
org.rosi_project.model_management.
{
ClientChangeRecord
,
ConflictResolution
}
import
org.rosi_project.model_management.sync.procedures.data.ClientEntireRecord
import
scala.collection.mutable.ListBuffer
object
Main
{
final
val
MEMBER_MODEL_TYPE
=
"de.tudresden.inf.st.crme.models.modelB.Member"
def
main
(
args
:
Array
[
String
])
:
Unit
=
{
MetaModels
.
initCrmMetaModels
()
val
clientChangeRecords
=
ListBuffer
[
ClientChangeRecord
]()
val
clientEntireRecords
=
ListBuffer
[
ClientEntireRecord
]()
// Add an example member object
clientChangeRecords
.
append
(
ClientChangeRecord
(
MEMBER_MODEL_TYPE
,
s
"e1"
,
0
,
0
,
Map
(
"birthday"
->
s
"01.01.1995"
,
"lastName"
->
s
"Member 1"
,
"address"
->
"Dresden"
),
Map
(),
Map
(),
s
"e1"
,
s
"testuser1"
,
refonly
=
false
))
clientEntireRecords
.
append
(
ClientEntireRecord
(
s
"e1"
,
0
,
0
,
MEMBER_MODEL_TYPE
))
ConflictResolution
.
syncModel
(
"creation"
,
clientChangeRecords
,
clientEntireRecords
,
1
,
s
"testuser1"
)
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment