diff --git a/.gitignore b/.gitignore index da5da89165571a2bde8a0d49678909676bd1ba35..5b81dcb7560dc64269585140ad5286c40567f200 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ /.gradle /.idea/ +logs/ +out/ diff --git a/cp-to-solution.sh b/cp-to-solution.sh index 2f307332567433e15b8075faf76d1971af4d18c5..00c6a00f347f216c5d81174a883be8ebd88e3fb9 100755 --- a/cp-to-solution.sh +++ b/cp-to-solution.sh @@ -1,11 +1,104 @@ -# temporarily enable integration -sed -i 's/enabled = false/enabled = true/g' solve/build.gradle -./gradlew --console=plain build -sed -i 's/enabled = true/enabled = false/g' solve/build.gradle -ls -lh solve/build/distributions -aunpack solve/build/distributions/solve-1.0-SNAPSHOT.tar solve-1.0-SNAPSHOT/bin/ solve-1.0-SNAPSHOT/lib/ -X ../ttc2018liveContest/solutions/jastadd-ttc18/ -cd ../ttc2018liveContest/solutions/jastadd-ttc18/ -rm -r bin/ lib/ -mv solve-1.0-SNAPSHOT/bin/ . -mv solve-1.0-SNAPSHOT/lib/ . -rmdir solve-1.0-SNAPSHOT +#!/usr/bin/env bash + +function build_sed_activate() { + # enable integration + sed -i 's/enabled = false/enabled = true/g' solve/build.gradle + # disable debug + sed -i 's|"--debug",|//"--debug",|g' solve/build.gradle +} + +function build_sed_deactivate() { + sed -i 's/enabled = true/enabled = false/g' solve/build.gradle + sed -i 's|//"--debug",|"--debug",|g' solve/build.gradle + sed -i 's/"--incremental=[^"]*"/"--incremental=param,debug"/g' solve/build.gradle + sed -i 's/--flush=[^"]*/--flush=api/g' solve/build.gradle +} + +function build_incremental() { + #TODO + name="$1-inc" + echo ">> Building $name" + build_sed_activate + sed -i 's/--flush=full/--flush=api/g' solve/build.gradle + sed -i 's/"--incremental=[^"]*"/"--incremental=param"/g' solve/build.gradle + ./gradlew --console=plain distTar + build_sed_deactivate + copy_to_ttc $name +} + +function build_flushing() { + #TODO + name="$1-flush" + echo ">> Building $name" + build_sed_activate + sed -i 's/--flush=api/--flush=full/g' solve/build.gradle + sed -i 's/"--incremental=[^"]*"/"--incremental=none"/g' solve/build.gradle + ./gradlew --console=plain distTar + build_sed_deactivate + copy_to_ttc $name +} + +function copy_to_ttc() {( + name=$1 + ls -lh solve/build/distributions + + # ensure directory exists and unpack into it + mkdir -p ../ttc2018liveContest/solutions/$name + tar -xf solve/build/distributions/solve-1.0-SNAPSHOT.tar -C ../ttc2018liveContest/solutions/$name/ solve-1.0-SNAPSHOT/bin/ solve-1.0-SNAPSHOT/lib/ + + # cp solution.ini + cp solution.ini ../ttc2018liveContest/solutions/$name/ + + # fix directory layout + cd ../ttc2018liveContest/solutions/$name/ + rm -r bin/ lib/ + mv solve-1.0-SNAPSHOT/bin/ . + mv solve-1.0-SNAPSHOT/lib/ . + rmdir solve-1.0-SNAPSHOT +)} + +function build() { + build_flushing $@ + build_incremental $@ +} + +function prepare_namelookup() { + # deactivate preprocess + sed -i 's|^jastadd.dependsOn preprocess|//jastadd.dependsOn preprocess|g' solve/build.gradle + # remove generated AST and helper files, activate namelookup AST and helper jadd files + ( cd solve/src/main/jastadd && + rm SocialNetworkGen.ast SocialNetworkGen.jadd && + mv Refs.jadd.unused Refs.jadd && + mv SocialNetworkNamelookup.ast.unused SocialNetworkNamelookup.ast ) +} + +function revert_namelookup() { + # activate preprocess + sed -i 's|//jastadd.dependsOn preprocess|jastadd.dependsOn preprocess|g' solve/build.gradle + # deactivate normal AST and helper jadd files + ( cd solve/src/main/jastadd && + mv Refs.jadd Refs.jadd.unused && + mv SocialNetworkNamelookup.ast SocialNetworkNamelookup.ast.unused ) +} + +prepare_namelookup +# Build jastadd-ttc18-xml (namelookup) +sed -i 's/LiveContestDriverEMF/LiveContestDriverXml/' solve/build.gradle +build "jastadd-ttc18-xml" + +revert_namelookup + +# workaround for failing build +echo ">> Prepare building relast building" +sleep 1 +./gradlew --console=plain preprocess jastadd build 2> /dev/null +sleep 1 +./gradlew --console=plain preprocess jastadd build 2> /dev/null + +# Build jastadd-ttc18-xml +sed -i 's/LiveContestDriverEMF/LiveContestDriverXml/' solve/build.gradle +build "jastadd-ttc18-relast-xml" + +# Build jastadd-ttc18-emf +sed -i 's/LiveContestDriverXml/LiveContestDriverEMF/' solve/build.gradle +build "jastadd-ttc18-relast-emf" diff --git a/push-multiple-to-influx.py b/push-multiple-to-influx.py new file mode 100755 index 0000000000000000000000000000000000000000..c62bf37c4cee96216917a254a59242e13ee3ae41 --- /dev/null +++ b/push-multiple-to-influx.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python2 +# -*- coding: utf-8 -*- +import os +import subprocess +import yaml + +if __name__ == '__main__': + with open('push-multiple-to-influx.yml') as fdr: + content = yaml.load(fdr) + # print content + base_dir = content['base_dir'] + python_executable = content['python_executable'] + solutions = content['solutions'] + sizes = content['sizes'] + queries = content['queries'] + + for solution_name in solutions: + fileformat = solutions[solution_name]['fileformat'] + for size in sizes: + size = str(size) + for query in queries: + query = str(query) + filename = os.path.join(base_dir, solution_name, fileformat.replace(r'%size', size).replace(r'%query', query)) + if not os.path.exists(filename): + print 'File "{}" not found'.format(filename) + continue + cmd = [python_executable, '-f', filename, '-s', size, '-q', query, '-n', solution_name] + print 'Calling ' + ' '.join(cmd) + subprocess.call(cmd) diff --git a/push-multiple-to-influx.yml b/push-multiple-to-influx.yml new file mode 100644 index 0000000000000000000000000000000000000000..c0ad0f1732cd824394679b213ccc9bc9b78bd2c7 --- /dev/null +++ b/push-multiple-to-influx.yml @@ -0,0 +1,13 @@ +base_dir: /data/git/ttc2018liveContest/solutions +python_executable: solve/push-to-influx.py +solutions: + jastadd-ttc18-xml-flush: + fileformat: events-xml-%size-%query.csv + jastadd-ttc18-xml-inc: + fileformat: events-xml-%size-%query.csv +sizes: + - 1 + - 2 +queries: + - Q1 + - Q2 diff --git a/solution.ini b/solution.ini new file mode 100644 index 0000000000000000000000000000000000000000..d5652e8e5561d57839265654a20c69e400290131 --- /dev/null +++ b/solution.ini @@ -0,0 +1,7 @@ +[build] +default=echo "It is already built" +skipTests=echo "It is already built" + +[run] +Q1=bin/solve +Q2=bin/solve diff --git a/solve/.gitignore b/solve/.gitignore index 34ca26c10ab445543ca7ad92a5eb3bedf25425fc..bef26b50e99f1e8efd8d681885b6ea2870f80b3d 100644 --- a/solve/.gitignore +++ b/solve/.gitignore @@ -1,3 +1,6 @@ /src/gen/ /src/gen-res/ /build/ +events.txt +/src/main/jastadd/SocialNetworkGen.ast +/src/main/jastadd/SocialNetworkGen.jadd diff --git a/solve/build.gradle b/solve/build.gradle index ce61367904604c2c96845e7dfdb69bb3a42c44af..a5b601bf4775dc25cd744db87afebf29b6d62b15 100644 --- a/solve/build.gradle +++ b/solve/build.gradle @@ -2,7 +2,6 @@ plugins { id 'application' id 'maven' id 'java' -// id 'org.jastadd' version '1.12.2' } group 'de.tudresden.inf.st' @@ -19,13 +18,16 @@ dependencies { compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.8.1' compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.10.0' compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.10.0' + compile group: 'org.eclipse.emf', name: 'org.eclipse.emf.ecore', version: '2.12.0' + compile group: 'org.eclipse.emf', name: 'org.eclipse.emf.ecore.xmi', version: '2.12.0' + compile group: 'org.eclipse.emf', name: 'org.eclipse.emf.common', version: '2.12.0' + compile group: 'org.eclipse.emf', name: 'org.eclipse.emf.mwe.core', version: '1.3.13' testCompile group: 'junit', name: 'junit', version: junitVersion testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '1.0.0.0' -// jastadd2 "org.jastadd:jastadd:2.3.0" } run { - mainClassName = 'de.tudresden.inf.st.ttc18live.LiveContestDriver' + mainClassName = 'de.tudresden.inf.st.ttc18live.LiveContestDriverEMF' standardInput = System.in if (project.hasProperty("appArgs")) { args Eval.me(appArgs) @@ -38,24 +40,19 @@ task testMain(type: JavaExec, dependsOn: assemble) { main = 'de.tudresden.inf.st.ttc18live.Main' } -//jastadd { -// configureModuleBuild() -// modules "jastadd_modules" -// -// module = "pe" -// -//// extraJastAddOptions = ['--cache=all'] -// extraJastAddOptions = ['--cache=none'] -// -// astPackage = 'de.tudresden.inf.st.ttc18live.jastadd.model' -// genDir = 'src/gen/java' -// -// buildInfoDir = 'src/gen-res' -//// parser.name = 'MquatParser' -// -//// scanner.genDir = "src/gen/java/de/tudresden/inf/st/mquat/jastadd/scanner" -//// parser.genDir = "src/gen/java/de/tudresden/inf/st/mquat/jastadd/parser" -//} +task preprocess(type: JavaExec) { + group = 'Build' + main = "-jar" + args = [ + "libs/relast-compiler.jar", + "./src/main/jastadd/SocialNetwork.relast", + "--listClass=RefList", + "--file" + ] + + inputs.files file("./src/main/jastadd/SocialNetwork.relast") + outputs.files file("./src/main/jastadd/SocialNetworkGen.ast"), file("./src/main/jastadd/SocialNetworkGen.jadd") +} task jastadd(type: JavaExec) { group = 'Build' @@ -64,27 +61,20 @@ task jastadd(type: JavaExec) { "libs/jastadd2.jar", "--debug", "--cache=all", -// "--cache=none", - "--flush=full", -// "--rewrite=cnta", -// "--incremental=param,debug", + "--flush=api", + "--rewrite=cnta", + "--incremental=param,debug", "--package=de.tudresden.inf.st.ttc18live.jastadd.model", "--o=src/gen/java", - "--tracing=api", - ] + fileTree("./src/main/jastadd/") + "--tracing", + ] + fileTree("./src/main/jastadd/").matching {exclude "*.relast"}.matching {exclude "*.unused"} doFirst { print("Calling jastadd2.jar " + fileTree("./src/main/jastadd/") + '\n') delete fileTree('src/gen/java/') } - // doLast { - - // ant.replaceregexp(match:'RefList extends List', replace:'RefList<T extends ASTNode> extends List<T>', flags:'g', byline:true) { - // fileset(dir: 'src/gen/java/de/tudresden/inf/st/ttc18live/jastadd/model', includes: 'RefList.java') - // } - // } - inputs.files fileTree("./solve/src/main/jastadd/") + inputs.files fileTree("./solve/src/main/jastadd/") + file("libs/jastadd2.jar") outputs.files file("src/gen/java/ASTNode.java") } @@ -100,6 +90,8 @@ sourceSets { // always run tests test.outputs.upToDateWhen {false} +// Comment this in to regenerate the generated AST +jastadd.dependsOn preprocess compileJava.dependsOn jastadd // always run jastadd @@ -108,5 +100,5 @@ jastadd.outputs.upToDateWhen {false} // disable distribution jar.enabled = false distTar.enabled = false -distZip.enabled = false -packageSources.enabled = false +distZip.enabled=false // always disabled +packageSources.enabled=false // always disabled diff --git a/solve/libs/jastadd2.jar b/solve/libs/jastadd2.jar index de45bb8f05b1c536b2ced789afec761ffaeff00d..09255c49ed78adddd355733ddb944c9b3586725a 100644 Binary files a/solve/libs/jastadd2.jar and b/solve/libs/jastadd2.jar differ diff --git a/solve/libs/relast-compiler.jar b/solve/libs/relast-compiler.jar new file mode 100644 index 0000000000000000000000000000000000000000..b34b7ad458dc69677a919df76e649aa72b773873 Binary files /dev/null and b/solve/libs/relast-compiler.jar differ diff --git a/solve/push-to-influx.py b/solve/push-to-influx.py new file mode 100755 index 0000000000000000000000000000000000000000..d510db63e29b1d133cd4831afdf5117847d4d566 --- /dev/null +++ b/solve/push-to-influx.py @@ -0,0 +1,99 @@ +#!/usr/bin/env python2 +# -*- coding: utf-8 -*- +import argparse +import csv +from datetime import datetime +import re +import os +import sys + +from influxdb import InfluxDBClient +from influxdb import SeriesHelper + +# InfluxDB connections settings +host = '172.22.1.152' +port = 8086 +user = '' +password = '' +dbname = 'jastadd' + +myclient = InfluxDBClient(host, port, user, password, dbname) + +# myclient.create_retention_policy('awesome_policy', '3d', 3, default=True) + + +class MySeriesHelper(SeriesHelper): + """Instantiate SeriesHelper to write points to the backend.""" + + class Meta: + """Meta class stores time series helper configuration.""" + + # The client should be an instance of InfluxDBClient. + client = myclient + + # The series name must be a string. Add dependent fields/tags + # in curly brackets. + series_name = 'ttc18live' + + # Defines all the fields in this time series. + fields = ['dummy'] + + # Defines all the tags for the series. + tags = ['event', 'attribute', 'size', 'query', 'solution'] + + # Defines the number of data points to store prior to writing + # on the wire. + bulk_size = 10000 + + # autocommit must be set to True when using bulk_size + autocommit = True + + +def nice_tag(s): + s = s.replace('.', '_') + s = re.sub(r'\([^)]*\)', '', s) + return s + + +def main(args): + if args.drop_database: + myclient.drop_database(dbname) + myclient.create_database(dbname) + fieldnames = ['timestamp'] + MySeriesHelper.Meta.tags[:] + MySeriesHelper.Meta.fields[:] + # read <filename> (or solve/<filename> if not found. maybe we are in root directory after all) + filename = args.filename + if not os.path.exists(filename): + filename = os.path.join('solve', filename) + with open(filename) as fdr: + reader = csv.DictReader(fdr, fieldnames=fieldnames) + + for row in reader: + dt = datetime.fromtimestamp(long(row['timestamp']) / 1000.0) + MySeriesHelper(time=dt.strftime('%Y-%m-%dT%H:%M:%S.%fZ'), + event=nice_tag(row['event']), + attribute=nice_tag(row["attribute"]), + size=args.size, + query=args.query, + solution=args.name, + dummy='1') + # print MySeriesHelper._json_body_() + # 1/0 + + # print MySeriesHelper._json_body_() + # To manually submit data points which are not yet written, call commit: + MySeriesHelper.commit() + + # To inspect the JSON which will be written, call _json_body_(): + # print MySeriesHelper._json_body_() + + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + parser.add_argument("-f", "--filename", help="Filename to process", required=True) + parser.add_argument("-s", "--size", help="Size of change set", required=True) + parser.add_argument("-q", "--query", help="Computed query", required=True) + parser.add_argument("-n", "--name", help="Name of the solution", default='jastadd-ttc18') + parser.add_argument("--drop_database", help="Whether the database should be dropped beforehand (Default: false)", action='store_true') + args = parser.parse_args() + + main(args) diff --git a/solve/src/main/jastadd/ApplyChanges.jadd b/solve/src/main/jastadd/ApplyChanges.jadd index ec3c399731e7b3536743cd0ee2d96d41f082610f..274e1c29893f4f08ba50eb611175a4ef86da7848 100644 --- a/solve/src/main/jastadd/ApplyChanges.jadd +++ b/solve/src/main/jastadd/ApplyChanges.jadd @@ -17,32 +17,31 @@ aspect ApplyChanges { public void AssociationCollectionInsertion.apply() { logger.debug("Applying {}", this); - String referenceName = getFeature().substring(getFeature().lastIndexOf('/') + 1); if (getAffectedElement().isUser()) { User user = java.util.Objects.requireNonNull(getAffectedElement().asUser(), () -> "Was no user, instead " + getAffectedElement()); - switch (referenceName) { + switch (getFeature()) { case "submissions": java.util.Objects.requireNonNull(getAddedElement(), () -> "Added Element was null in " + this); Submission submission = java.util.Objects.requireNonNull(getAddedElement().asSubmission(), () -> "Was no submission, instead " + getAddedElement()); - user.addSubmission(submission.createSubmissionRef()); + user.addSubmission(submission); return; case "friends": java.util.Objects.requireNonNull(getAddedElement(), () -> "Added Element was null in " + this); User friend = java.util.Objects.requireNonNull(getAddedElement().asUser(), () -> "Was no user, instead " + getAddedElement()); - user.addFriend(friend.createUserRef()); + user.addFriend(friend); return; case "likes": java.util.Objects.requireNonNull(getAddedElement(), () -> "Added Element was null in " + this); Comment like = java.util.Objects.requireNonNull(getAddedElement().asComment(), () -> "Was no comment, instead " + getAddedElement()); - user.addLike(like.createCommentRef()); + user.addLike(like); return; } } - if (referenceName.equals("likedBy")) { + if (getFeature().equals("likedBy")) { logger.debug("AssociationCollectionInsertion for likedBy will be handled by attributes."); return; } @@ -51,9 +50,8 @@ aspect ApplyChanges { public void AssociationPropertyChange.apply() { logger.debug("Applying {}", this); - String referenceName = getFeature().substring(getFeature().lastIndexOf('/') + 1); if (getAffectedElement().isComment()) { - switch (referenceName) { + switch (getFeature()) { case "commented": // inverse to Submission.comments -> Comments* logger.debug("AssociationPropertyChange for commented already handled by parser."); // newValue is a Submission @@ -69,9 +67,8 @@ aspect ApplyChanges { public void AttributionPropertyChange.apply() { logger.debug("Applying {}", this); - String referenceName = getFeature().substring(getFeature().lastIndexOf('/') + 1); if (getAffectedElement().isUser()) { - switch (referenceName) { + switch (getFeature()) { case "name": User user = getAffectedElement().asUser(); user.setName((String) getNewValue()); @@ -84,10 +81,9 @@ aspect ApplyChanges { public void CompositionListInsertion.apply() { logger.debug("Applying {}", this); if (getAffectedElement().isSubmission()) { - String referenceName = getFeature().substring(getFeature().lastIndexOf('/') + 1); Submission affected = java.util.Objects.requireNonNull(getAffectedElement().asSubmission(), () -> "Was no submission, instead " + getAffectedElement()); - switch (referenceName) { + switch (getFeature()) { case "comments": Comment comment = java.util.Objects.requireNonNull(getAddedElement().asComment(), () -> "Was no comment, instead " + getAddedElement()); @@ -98,9 +94,8 @@ aspect ApplyChanges { return; } } else if (getAffectedElement().isSocialNetwork()) { - String referenceName = getFeature().substring(getFeature().lastIndexOf('/') + 1); SocialNetwork socialNetwork = getAffectedElement().asSocialNetwork(); - switch (referenceName) { + switch (getFeature()) { case "posts": Post post = getAddedElement().asPost(); // remove from pending model elements first diff --git a/solve/src/main/jastadd/Checking.jrag b/solve/src/main/jastadd/Checking.jrag index f6bdc03043582c05e6d89a6124b71bf619cea08f..b4dd7f5e8e959f97cdab21eccf0b45ea9666dcb3 100644 --- a/solve/src/main/jastadd/Checking.jrag +++ b/solve/src/main/jastadd/Checking.jrag @@ -1,6 +1,6 @@ aspect Checking { - boolean ModelElement.checkGeneralListValid(List<? extends ASTNode> listToCheck, String nonterminalName) { + boolean ModelElement.checkGeneralListValid(java.util.List<? extends ASTNode> listToCheck, String nonterminalName) { boolean valid = true; for (ASTNode node : listToCheck) { if (node == null) { @@ -40,9 +40,9 @@ aspect Checking { } eq User.isValid() { - return checkGeneralListValid(getFriendList(), "Friend") && - checkGeneralListValid(getSubmissionList(), "Submission") && - checkGeneralListValid(getLikeList(), "Like") && checkThat(getName() != null, "User" + getId() + ".Name == null"); + return checkGeneralListValid(getFriends(), "Friend") && + checkGeneralListValid(getSubmissions(), "Submission") && + checkGeneralListValid(getLikes(), "Like") && checkThat(getName() != null, "User" + getId() + ".Name == null"); } eq Submission.isValid() { diff --git a/solve/src/main/jastadd/Helpers.jadd b/solve/src/main/jastadd/Helpers.jadd index 862bf36fdd20677f9745fd19e505f2b5954755a6..47ddfab349b91110ac68189ed3a81c1ee5b96897 100644 --- a/solve/src/main/jastadd/Helpers.jadd +++ b/solve/src/main/jastadd/Helpers.jadd @@ -12,4 +12,10 @@ aspect Helpers { return false; } + public static SocialNetwork SocialNetwork.createSocialNetwork() { + SocialNetwork result = new SocialNetwork(); + result.setId(-42L); + return result; + } + } diff --git a/solve/src/main/jastadd/Helpers.jrag b/solve/src/main/jastadd/Helpers.jrag deleted file mode 100644 index d7b46d54953f0dc099e6fd2b5d564ee1e4f9b479..0000000000000000000000000000000000000000 --- a/solve/src/main/jastadd/Helpers.jrag +++ /dev/null @@ -1,4 +0,0 @@ -aspect Helpers { - // override id of SocialNetwork to an unused, constant value - syn Long SocialNetwork.getId() = -42L; -} diff --git a/solve/src/main/jastadd/ModelNavigation.jrag b/solve/src/main/jastadd/ModelNavigation.jrag index 91d4ebae3170796fd7b30bd2126752e76084c4d6..7571a71dad8e307a4678c948056ec962f0abc2fe 100644 --- a/solve/src/main/jastadd/ModelNavigation.jrag +++ b/solve/src/main/jastadd/ModelNavigation.jrag @@ -3,30 +3,6 @@ import java.util.HashMap; aspect ModelNavigation { - // =================================================================================================================== - // resolving - // =================================================================================================================== - - syn User SocialNetwork.resolveUser(Long id) = userMap().get(id); - - syn Map<Long, User> SocialNetwork.userMap() { - java.util.Map<Long, User> users = new HashMap<>(); - for (User user : getUserList()) { - users.put(user.getId(), user); - } - return users; - } - - syn Comment SocialNetwork.resolveComment(Long id) = commentMap().get(id); - - syn Map<Long, Comment> SocialNetwork.commentMap() { - java.util.Map<Long, Comment> comments = new HashMap<>(); - for (Comment comment : comments()) { - comments.put(comment.getId(), comment); - } - return comments; - } - syn java.util.List<Comment> SocialNetwork.comments() { java.util.List<Comment> result = new java.util.ArrayList<>(); for (Post post : getPostList()) { @@ -46,56 +22,6 @@ aspect ModelNavigation { } } - syn Post SocialNetwork.resolvePost(Long id) = postMap().get(id); - - syn Map<Long, Post> SocialNetwork.postMap() { - java.util.Map<Long, Post> posts = new HashMap<>(); - for (Post post : getPostList()) { - posts.put(post.getId(), post); - } - return posts; - } - - // =================================================================================================================== - // relations replica - // =================================================================================================================== - - syn java.util.List<User> Comment.getLikedBy() = socialNetwork().getLikedByMap().get(this); - - syn Map<Comment, java.util.List<User>> SocialNetwork.getLikedByMap() { - Map<Comment, java.util.List<User>> result = new HashMap(); - for (Comment comment : comments()) { - result.put(comment, new java.util.ArrayList<>()); - } - for (User user : getUserList()) { - for (CommentRef commentRef : user.getLikes()) { - result.get(commentRef.getComment()).add(user); - } - } - return result; - } - - // =================================================================================================================== - // root access - // =================================================================================================================== - - inh SocialNetwork ModelElement.socialNetwork(); -// inh SocialNetwork User.socialNetwork(); - eq SocialNetwork.getUser().socialNetwork() = this; - -// inh SocialNetwork Post.socialNetwork(); - eq SocialNetwork.getPost().socialNetwork() = this; -// eq CompositionListInsertion.getAddedElement().socialNetwork() = socialNetwork(); - -// eq Post.getComment(int i).socialNetwork() = socialNetwork(); - -// inh SocialNetwork Comment.socialNetwork(); - eq Post.getComment().socialNetwork() = socialNetwork(); - - inh SocialNetwork ModelChange.socialNetwork(); - eq ModelChangeSet.getModelChange().socialNetwork() = getSocialNetwork(); - eq ModelChangeSet.getPendingNewElement().socialNetwork() = getSocialNetwork(); - // =================================================================================================================== // casting // =================================================================================================================== @@ -130,13 +56,15 @@ aspect ModelNavigation { syn Comment ModelElement.asComment() = null; eq Comment.asComment() = this; - // =================================================================================================================== - // going up - // =================================================================================================================== - - inh Post Comment.containingPost(); - eq Post.getComment().containingPost() = this; - eq Comment.getComment().containingPost() = containingPost(); - eq ModelChangeSet.getPendingNewElement().containingPost() = null; - + // (un)cache instructions + uncache ModelElement.isSocialNetwork(); + uncache ModelElement.isPost(); + uncache ModelElement.isSubmission(); + uncache ModelElement.isUser(); + uncache ModelElement.isComment(); + uncache ModelElement.asSocialNetwork(); + uncache ModelElement.asPost(); + uncache ModelElement.asSubmission(); + uncache ModelElement.asUser(); + uncache ModelElement.asComment(); } diff --git a/solve/src/main/jastadd/NTA.jrag b/solve/src/main/jastadd/NTA.jrag new file mode 100644 index 0000000000000000000000000000000000000000..f55db69b88a25ee3329720ca85da87a97e8707f8 --- /dev/null +++ b/solve/src/main/jastadd/NTA.jrag @@ -0,0 +1,5 @@ +aspect NTA { + inh Post Comment.getPost(); + eq Post.getComment().getPost() = this; + eq ModelChangeSet.getPendingNewElement().getPost() = null; +} \ No newline at end of file diff --git a/solve/src/main/jastadd/Printing.jrag b/solve/src/main/jastadd/Printing.jrag index 7d5860de077c6a70e189bc3e464b91eef90abbda..4a49a9bc69714c4ec12494416b1a7c43cba0f49f 100644 --- a/solve/src/main/jastadd/Printing.jrag +++ b/solve/src/main/jastadd/Printing.jrag @@ -26,12 +26,12 @@ aspect Printing { return "CompositionListInsertion (affected = " + (getAffectedElement() == null ? "null" : getAffectedElement().getId()) + ", feature = " + getFeature() + ", index = " + getIndex() + ", addedElement = " + getAddedElement() + ")"; } - syn String ModelChange.toString() = print(); - eq ChangeTransaction.toString() = "ChangeTransaction@" + Integer.toHexString(hashCode()); +// syn String ModelChange.toString() = print(); +// eq ChangeTransaction.toString() = "ChangeTransaction@" + Integer.toHexString(hashCode()); - syn String ModelElement.toString(); - eq SocialNetwork.toString() = "SocialNetwork" + getId(); - eq User.toString() = "User-" + getId(); - eq Post.toString() = "Post-" + getId(); - eq Comment.toString() = "Comment-" + getId(); +// syn String ModelElement.toString(); +// eq SocialNetwork.toString() = "SocialNetwork" + getId(); +// eq User.toString() = "User-" + getId(); +// eq Post.toString() = "Post-" + getId(); +// eq Comment.toString() = "Comment-" + getId(); } diff --git a/solve/src/main/jastadd/RefList.jadd b/solve/src/main/jastadd/RefList.jadd new file mode 100644 index 0000000000000000000000000000000000000000..a0566565528518a7d4fe5fa35b57aa4f9a32062b --- /dev/null +++ b/solve/src/main/jastadd/RefList.jadd @@ -0,0 +1,3 @@ +aspect RefList { + public class RefList<T extends ASTNode> extends java.util.ArrayList<T> {} +} diff --git a/solve/src/main/jastadd/Refs.jadd.unused b/solve/src/main/jastadd/Refs.jadd.unused new file mode 100644 index 0000000000000000000000000000000000000000..f9f4974ef3b2f2a97a69ccbc4fbf1f8b3bd55ae1 --- /dev/null +++ b/solve/src/main/jastadd/Refs.jadd.unused @@ -0,0 +1,71 @@ +aspect NameLookup { + + // accessor replica getFriends + syn java.util.List<User> User.getFriends() { + java.util.List<User> result = new java.util.ArrayList<>(); + for (UserRef userRef : getFriendRefList()) { + result.add(userRef.getUser()); + } + return result; + } + + // accessor replica getLikes + syn java.util.List<Comment> User.getLikes() { + java.util.List<Comment> result = new java.util.ArrayList<>(); + for (CommentRef commentRef : getLikeRefList()) { + result.add(commentRef.getComment()); + } + return result; + } + + // accessor replica getSubmissions + syn java.util.List<Submission> User.getSubmissions() { + java.util.List<Submission> result = new java.util.ArrayList<>(); + for (SubmissionRef submissionRef : getSubmissionRefList()) { + result.add(submissionRef.getSubmission()); + } + return result; + } + + // =================================================================================================================== + // root access + // =================================================================================================================== + + inh SocialNetwork ModelElement.socialNetwork(); + eq SocialNetwork.getUser().socialNetwork() = this; + eq SocialNetwork.getPost().socialNetwork() = this; + eq Post.getComment().socialNetwork() = socialNetwork(); + + inh SocialNetwork ModelChange.socialNetwork(); + eq ModelChangeSet.getModelChange().socialNetwork() = getSocialNetwork(); + eq ModelChangeSet.getPendingNewElement().socialNetwork() = getSocialNetwork(); + + syn java.util.List<User> Comment.getLikedByList() = socialNetwork().getLikedByMap().get(this); + + syn Map<Comment, java.util.List<User>> SocialNetwork.getLikedByMap() { + Map<Comment, java.util.List<User>> result = new HashMap(); + for (Comment comment : comments()) { + result.put(comment, new java.util.ArrayList<>()); + } + for (User user : getUserList()) { + for (Comment comment : user.getLikes()) { + result.get(comment).add(user); + } + } + return result; + } + + public void User.addSubmission(Submission s) { + this.addSubmissionRef(new SubmissionRef(s)); + } + + public void User.addFriend(User s) { + this.addFriendRef(new UserRef(s)); + s.addFriendRef(new UserRef(this)); + } + + public void User.addLike(Comment s) { + this.addLikeRef(new CommentRef(s)); + } + +} diff --git a/solve/src/main/jastadd/SocialNetwork.relast b/solve/src/main/jastadd/SocialNetwork.relast new file mode 100644 index 0000000000000000000000000000000000000000..7156eecedeb105486a211cd46c3833b203cdb889 --- /dev/null +++ b/solve/src/main/jastadd/SocialNetwork.relast @@ -0,0 +1,12 @@ +abstract ModelElement ::= <Id:Long> ; +SocialNetwork : ModelElement ::= User* Post* ; + +User:ModelElement ::= <Name:String> ; + +abstract Submission : ModelElement ::= <Timestamp:Long> <Content:String> Comment* ; +Comment : Submission ::= ; +Post : Submission ::= ; + +rel User.Friend* -> User ; +rel User.Submission* -> Submission ; +rel User.Like* <-> Comment.LikedBy* ; diff --git a/solve/src/main/jastadd/grammar.ast b/solve/src/main/jastadd/SocialNetworkNamelookup.ast.unused similarity index 56% rename from solve/src/main/jastadd/grammar.ast rename to solve/src/main/jastadd/SocialNetworkNamelookup.ast.unused index b929904478aa17a17dd7d59132ce409756275232..f1b45cf5988d5b97bf1a7f72ddf4a158163c92ad 100644 --- a/solve/src/main/jastadd/grammar.ast +++ b/solve/src/main/jastadd/SocialNetworkNamelookup.ast.unused @@ -1,10 +1,10 @@ abstract ModelElement ::= <Id:Long> ; -SocialNetwork : ModelElement ::= /<Id:Long>/ User* Post* ; +SocialNetwork : ModelElement ::= User* Post* ; -User:ModelElement ::= <Name:String> Friend:UserRef* Submission:SubmissionRef* Like:CommentRef* ; +User:ModelElement ::= <Name:String> FriendRef:UserRef* SubmissionRef:SubmissionRef* LikeRef:CommentRef* ; abstract Submission : ModelElement ::= <Timestamp:Long> <Content:String> Comment* ; -Comment : Submission ::= <Post:Post> ; +Comment : Submission ::= ; Post : Submission ::= ; UserRef ::= <User:User> ; diff --git a/solve/src/main/jastadd/Tracing.jadd b/solve/src/main/jastadd/Tracing.jadd new file mode 100644 index 0000000000000000000000000000000000000000..a00b6e0fec500e1c025ec13811206ffd8da594a7 --- /dev/null +++ b/solve/src/main/jastadd/Tracing.jadd @@ -0,0 +1,21 @@ +aspect Tracing { + + private java.util.List<String> SocialNetwork.events = new java.util.ArrayList<>(); + + public void SocialNetwork.enableTracing() { + this.trace().setReceiver((event, node, attribute, params, value) -> { + String eventString = System.currentTimeMillis() + "," + event + "," + attribute; + events.add(eventString); + }); + } + + public void SocialNetwork.insertCustomEvent(String event, String text) { + String eventString = System.currentTimeMillis() + "," + event.replace(",", "_") + "," + text.replace(",", "_"); + events.add(eventString); + } + + public void SocialNetwork.writeTracingEvents(java.nio.file.Path destination) throws java.io.IOException { + java.nio.file.Files.write(destination, events); + } + +} diff --git a/solve/src/main/jastadd/queries.jrag b/solve/src/main/jastadd/queries.jrag index ee930175d94ed1b799a7e3b639e4303965e4be88..d149261f476ce6581b45818fb5291ae4a6bbcc8b 100644 --- a/solve/src/main/jastadd/queries.jrag +++ b/solve/src/main/jastadd/queries.jrag @@ -1,27 +1,27 @@ aspect Queries { + syn int ModelElement.score() = 0; + syn java.util.Set<User> User.getCommentLikerFriends(Comment comment) circular [new java.util.HashSet<User>()]; eq User.getCommentLikerFriends(Comment comment) { // java.util.Set<User> s = this.getCommentLikerFriends(comment); java.util.Set<User> s = new java.util.HashSet<>(); s.add(this); - for (UserRef f : getFriends()) { - for (CommentRef cref : f.getUser().getLikes()) { - if (cref.getComment() == comment) { - s.add(f.getUser()); - for (User commentLikerFriend : f.getUser().getCommentLikerFriends(comment)) { - s.add(commentLikerFriend); - } + for (User f : getFriends()) { + for (Comment otherComment : f.getLikes()) { + if (otherComment == comment) { + s.add(f); + s.addAll(f.getCommentLikerFriends(comment)); } } } return s; } - syn int Comment.score() { + eq Comment.score() { int score = 0; java.util.Set<java.util.Set<User>> commentLikerGroups = new java.util.HashSet(); - for (User user : getLikedBy()) { + for (User user : getLikedByList()) { commentLikerGroups.add(user.getCommentLikerFriends(this)); } for (java.util.Set<User> userSet : commentLikerGroups) { @@ -31,35 +31,10 @@ aspect Queries { return score; } - syn String SocialNetwork.query2() { - Comment[] comments = new Comment[3]; - for (Comment comment : comments()) { - int score = comment.score(); - if (hasBetterQ2Score(comment, comments[2])) { - // at least better than #3 - if (hasBetterQ2Score(comment, comments[1])) { - comments[2] = comments[1]; - if (hasBetterQ2Score(comment, comments[0])) { - // new highscore - comments[1] = comments[0]; - comments[0] = comment; - } else { - // better than second - comments[1] = comment; - } - } else { - comments[2] = comment; - } - } -// System.out.println(comment + ", " + java.util.Arrays.toString(comments)); - } - return comments[0].getId() + "|" + comments[1].getId() + "|" + comments[2].getId(); - } - - syn int Post.score() { + eq Post.score() { int result = 0; for (Comment comment : commentsForPost()) { - result += 10 + comment.getLikedBy().size(); + result += 10 + comment.getLikedByList().size(); } return result; } @@ -70,38 +45,37 @@ aspect Queries { return result; } - syn String SocialNetwork.query1() { - Post[] posts = new Post[3]; - for (Post post : getPostList()) { - int score = post.score(); - if (hasBetterQ1Score(post, posts[2])) { + syn String SocialNetwork.query(int queryId) { + Iterable<? extends Submission> l; + switch (queryId) { + case 1: l = getPostList(); break; + case 2: l = comments(); break; + default: return null; + } + Submission[] elements = new Submission[3]; + for (Submission elem : l) { + if (elem.hasBetterScoreThan(elements[2])) { // at least better than #3 - if (hasBetterQ1Score(post, posts[1])) { - posts[2] = posts[1]; - if (hasBetterQ1Score(post, posts[0])) { + if (elem.hasBetterScoreThan(elements[1])) { + elements[2] = elements[1]; + if (elem.hasBetterScoreThan(elements[0])) { // new highscore - posts[1] = posts[0]; - posts[0] = post; + elements[1] = elements[0]; + elements[0] = elem; } else { // better than second - posts[1] = post; + elements[1] = elem; } } else { - posts[2] = post; + elements[2] = elem; } } } - return posts[0].getId() + "|" + posts[1].getId() + "|" + posts[2].getId(); - } - - private boolean SocialNetwork.hasBetterQ1Score(Post myPost, Post oldPost) { - return oldPost == null || myPost.score() > oldPost.score() || - (myPost.score() == oldPost.score() && myPost.getTimestamp() > oldPost.getTimestamp()); + return elements[0].getId() + "|" + elements[1].getId() + "|" + elements[2].getId(); } - private boolean SocialNetwork.hasBetterQ2Score(Comment myComment, Comment oldComment) { - return oldComment == null || myComment.score() > oldComment.score() || - (myComment.score() == oldComment.score() && myComment.getTimestamp() > oldComment.getTimestamp()); + syn boolean Submission.hasBetterScoreThan(Submission other) { + return other == null || this.score() > other.score() || + (this.score() == other.score() && this.getTimestamp() > other.getTimestamp()); } - } diff --git a/solve/src/main/jastadd/refs.jadd b/solve/src/main/jastadd/refs.jadd deleted file mode 100644 index 435aed1a3f4742ee7e1370463730da6de13a9a0c..0000000000000000000000000000000000000000 --- a/solve/src/main/jastadd/refs.jadd +++ /dev/null @@ -1,13 +0,0 @@ -aspect References { - public UserRef User.createUserRef() { - return new UserRef(this); - } - - public CommentRef Comment.createCommentRef() { - return new CommentRef(this); - } - - public SubmissionRef Submission.createSubmissionRef() { - return new SubmissionRef(this); - } -} diff --git a/solve/src/main/java/Changes/AssociationChange.java b/solve/src/main/java/Changes/AssociationChange.java new file mode 100644 index 0000000000000000000000000000000000000000..608507ba400da7cb5787a6931022ad61f3486d2f --- /dev/null +++ b/solve/src/main/java/Changes/AssociationChange.java @@ -0,0 +1,17 @@ +/** + */ +package Changes; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Association Change</b></em>'. + * <!-- end-user-doc --> + * + * + * @see Changes.ChangesPackage#getAssociationChange() + * @model + * @generated + */ +public interface AssociationChange extends ElementaryChange { +} // AssociationChange diff --git a/solve/src/main/java/Changes/AssociationCollectionDeletion.java b/solve/src/main/java/Changes/AssociationCollectionDeletion.java new file mode 100644 index 0000000000000000000000000000000000000000..bccf6aa5bf79f3ff68001ffd7c7fbf52f157439c --- /dev/null +++ b/solve/src/main/java/Changes/AssociationCollectionDeletion.java @@ -0,0 +1,50 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Association Collection Deletion</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.AssociationCollectionDeletion#getDeletedElement <em>Deleted Element</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getAssociationCollectionDeletion() + * @model + * @generated + */ +public interface AssociationCollectionDeletion extends AssociationChange { + /** + * Returns the value of the '<em><b>Deleted Element</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Deleted Element</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Deleted Element</em>' reference. + * @see #setDeletedElement(EObject) + * @see Changes.ChangesPackage#getAssociationCollectionDeletion_DeletedElement() + * @model required="true" + * @generated + */ + EObject getDeletedElement(); + + /** + * Sets the value of the '{@link Changes.AssociationCollectionDeletion#getDeletedElement <em>Deleted Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Deleted Element</em>' reference. + * @see #getDeletedElement() + * @generated + */ + void setDeletedElement(EObject value); + +} // AssociationCollectionDeletion diff --git a/solve/src/main/java/Changes/AssociationCollectionInsertion.java b/solve/src/main/java/Changes/AssociationCollectionInsertion.java new file mode 100644 index 0000000000000000000000000000000000000000..a10524398f7985a96132ef3d88b516db5b58c2b8 --- /dev/null +++ b/solve/src/main/java/Changes/AssociationCollectionInsertion.java @@ -0,0 +1,50 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Association Collection Insertion</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.AssociationCollectionInsertion#getAddedElement <em>Added Element</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getAssociationCollectionInsertion() + * @model + * @generated + */ +public interface AssociationCollectionInsertion extends AssociationChange { + /** + * Returns the value of the '<em><b>Added Element</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Added Element</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Added Element</em>' reference. + * @see #setAddedElement(EObject) + * @see Changes.ChangesPackage#getAssociationCollectionInsertion_AddedElement() + * @model required="true" + * @generated + */ + EObject getAddedElement(); + + /** + * Sets the value of the '{@link Changes.AssociationCollectionInsertion#getAddedElement <em>Added Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Added Element</em>' reference. + * @see #getAddedElement() + * @generated + */ + void setAddedElement(EObject value); + +} // AssociationCollectionInsertion diff --git a/solve/src/main/java/Changes/AssociationCollectionReset.java b/solve/src/main/java/Changes/AssociationCollectionReset.java new file mode 100644 index 0000000000000000000000000000000000000000..83f25bdf265a9125b2609b8be44201cee1a36899 --- /dev/null +++ b/solve/src/main/java/Changes/AssociationCollectionReset.java @@ -0,0 +1,17 @@ +/** + */ +package Changes; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Association Collection Reset</b></em>'. + * <!-- end-user-doc --> + * + * + * @see Changes.ChangesPackage#getAssociationCollectionReset() + * @model + * @generated + */ +public interface AssociationCollectionReset extends AssociationChange { +} // AssociationCollectionReset diff --git a/solve/src/main/java/Changes/AssociationListDeletion.java b/solve/src/main/java/Changes/AssociationListDeletion.java new file mode 100644 index 0000000000000000000000000000000000000000..4039d13d16a140bea435ff82ecd5041ef346ee1d --- /dev/null +++ b/solve/src/main/java/Changes/AssociationListDeletion.java @@ -0,0 +1,77 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Association List Deletion</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.AssociationListDeletion#getDeletedElement <em>Deleted Element</em>}</li> + * <li>{@link Changes.AssociationListDeletion#getIndex <em>Index</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getAssociationListDeletion() + * @model + * @generated + */ +public interface AssociationListDeletion extends AssociationChange { + /** + * Returns the value of the '<em><b>Deleted Element</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Deleted Element</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Deleted Element</em>' reference. + * @see #setDeletedElement(EObject) + * @see Changes.ChangesPackage#getAssociationListDeletion_DeletedElement() + * @model + * @generated + */ + EObject getDeletedElement(); + + /** + * Sets the value of the '{@link Changes.AssociationListDeletion#getDeletedElement <em>Deleted Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Deleted Element</em>' reference. + * @see #getDeletedElement() + * @generated + */ + void setDeletedElement(EObject value); + + /** + * Returns the value of the '<em><b>Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Index</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Index</em>' attribute. + * @see #setIndex(int) + * @see Changes.ChangesPackage#getAssociationListDeletion_Index() + * @model required="true" + * @generated + */ + int getIndex(); + + /** + * Sets the value of the '{@link Changes.AssociationListDeletion#getIndex <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Index</em>' attribute. + * @see #getIndex() + * @generated + */ + void setIndex(int value); + +} // AssociationListDeletion diff --git a/solve/src/main/java/Changes/AssociationListInsertion.java b/solve/src/main/java/Changes/AssociationListInsertion.java new file mode 100644 index 0000000000000000000000000000000000000000..3a69094ec0a89d592bd33f66bf282943ea93b384 --- /dev/null +++ b/solve/src/main/java/Changes/AssociationListInsertion.java @@ -0,0 +1,77 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Association List Insertion</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.AssociationListInsertion#getAddedElement <em>Added Element</em>}</li> + * <li>{@link Changes.AssociationListInsertion#getIndex <em>Index</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getAssociationListInsertion() + * @model + * @generated + */ +public interface AssociationListInsertion extends AssociationChange { + /** + * Returns the value of the '<em><b>Added Element</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Added Element</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Added Element</em>' reference. + * @see #setAddedElement(EObject) + * @see Changes.ChangesPackage#getAssociationListInsertion_AddedElement() + * @model required="true" + * @generated + */ + EObject getAddedElement(); + + /** + * Sets the value of the '{@link Changes.AssociationListInsertion#getAddedElement <em>Added Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Added Element</em>' reference. + * @see #getAddedElement() + * @generated + */ + void setAddedElement(EObject value); + + /** + * Returns the value of the '<em><b>Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Index</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Index</em>' attribute. + * @see #setIndex(int) + * @see Changes.ChangesPackage#getAssociationListInsertion_Index() + * @model required="true" + * @generated + */ + int getIndex(); + + /** + * Sets the value of the '{@link Changes.AssociationListInsertion#getIndex <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Index</em>' attribute. + * @see #getIndex() + * @generated + */ + void setIndex(int value); + +} // AssociationListInsertion diff --git a/solve/src/main/java/Changes/AssociationPropertyChange.java b/solve/src/main/java/Changes/AssociationPropertyChange.java new file mode 100644 index 0000000000000000000000000000000000000000..6893a70b43954bcbab1c15b03be8c6780f42773c --- /dev/null +++ b/solve/src/main/java/Changes/AssociationPropertyChange.java @@ -0,0 +1,77 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Association Property Change</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.AssociationPropertyChange#getNewValue <em>New Value</em>}</li> + * <li>{@link Changes.AssociationPropertyChange#getOldValue <em>Old Value</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getAssociationPropertyChange() + * @model + * @generated + */ +public interface AssociationPropertyChange extends AssociationChange { + /** + * Returns the value of the '<em><b>New Value</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>New Value</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>New Value</em>' reference. + * @see #setNewValue(EObject) + * @see Changes.ChangesPackage#getAssociationPropertyChange_NewValue() + * @model + * @generated + */ + EObject getNewValue(); + + /** + * Sets the value of the '{@link Changes.AssociationPropertyChange#getNewValue <em>New Value</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>New Value</em>' reference. + * @see #getNewValue() + * @generated + */ + void setNewValue(EObject value); + + /** + * Returns the value of the '<em><b>Old Value</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Old Value</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Old Value</em>' reference. + * @see #setOldValue(EObject) + * @see Changes.ChangesPackage#getAssociationPropertyChange_OldValue() + * @model + * @generated + */ + EObject getOldValue(); + + /** + * Sets the value of the '{@link Changes.AssociationPropertyChange#getOldValue <em>Old Value</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Old Value</em>' reference. + * @see #getOldValue() + * @generated + */ + void setOldValue(EObject value); + +} // AssociationPropertyChange diff --git a/solve/src/main/java/Changes/AttributeChange.java b/solve/src/main/java/Changes/AttributeChange.java new file mode 100644 index 0000000000000000000000000000000000000000..9e2e489d4f05856e8fc5cf40e17f0f054c8d3e4c --- /dev/null +++ b/solve/src/main/java/Changes/AttributeChange.java @@ -0,0 +1,17 @@ +/** + */ +package Changes; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Attribute Change</b></em>'. + * <!-- end-user-doc --> + * + * + * @see Changes.ChangesPackage#getAttributeChange() + * @model + * @generated + */ +public interface AttributeChange extends ElementaryChange { +} // AttributeChange diff --git a/solve/src/main/java/Changes/AttributeCollectionDeletion.java b/solve/src/main/java/Changes/AttributeCollectionDeletion.java new file mode 100644 index 0000000000000000000000000000000000000000..4a362b4b477530b4bd32cde1b03d1e6c4e833bb6 --- /dev/null +++ b/solve/src/main/java/Changes/AttributeCollectionDeletion.java @@ -0,0 +1,49 @@ +/** + */ +package Changes; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Attribute Collection Deletion</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.AttributeCollectionDeletion#getDeletedValue <em>Deleted Value</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getAttributeCollectionDeletion() + * @model + * @generated + */ +public interface AttributeCollectionDeletion extends AttributeChange { + /** + * Returns the value of the '<em><b>Deleted Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Deleted Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Deleted Value</em>' attribute. + * @see #setDeletedValue(String) + * @see Changes.ChangesPackage#getAttributeCollectionDeletion_DeletedValue() + * @model required="true" + * @generated + */ + String getDeletedValue(); + + /** + * Sets the value of the '{@link Changes.AttributeCollectionDeletion#getDeletedValue <em>Deleted Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Deleted Value</em>' attribute. + * @see #getDeletedValue() + * @generated + */ + void setDeletedValue(String value); + +} // AttributeCollectionDeletion diff --git a/solve/src/main/java/Changes/AttributeCollectionInsertion.java b/solve/src/main/java/Changes/AttributeCollectionInsertion.java new file mode 100644 index 0000000000000000000000000000000000000000..1a15c6ae9fc520e8fd532ad0548baba564e14549 --- /dev/null +++ b/solve/src/main/java/Changes/AttributeCollectionInsertion.java @@ -0,0 +1,49 @@ +/** + */ +package Changes; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Attribute Collection Insertion</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.AttributeCollectionInsertion#getAddedValue <em>Added Value</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getAttributeCollectionInsertion() + * @model + * @generated + */ +public interface AttributeCollectionInsertion extends AttributeChange { + /** + * Returns the value of the '<em><b>Added Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Added Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Added Value</em>' attribute. + * @see #setAddedValue(String) + * @see Changes.ChangesPackage#getAttributeCollectionInsertion_AddedValue() + * @model required="true" + * @generated + */ + String getAddedValue(); + + /** + * Sets the value of the '{@link Changes.AttributeCollectionInsertion#getAddedValue <em>Added Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Added Value</em>' attribute. + * @see #getAddedValue() + * @generated + */ + void setAddedValue(String value); + +} // AttributeCollectionInsertion diff --git a/solve/src/main/java/Changes/AttributeCollectionReset.java b/solve/src/main/java/Changes/AttributeCollectionReset.java new file mode 100644 index 0000000000000000000000000000000000000000..35babb01df04b56889871635696902f144061f15 --- /dev/null +++ b/solve/src/main/java/Changes/AttributeCollectionReset.java @@ -0,0 +1,17 @@ +/** + */ +package Changes; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Attribute Collection Reset</b></em>'. + * <!-- end-user-doc --> + * + * + * @see Changes.ChangesPackage#getAttributeCollectionReset() + * @model + * @generated + */ +public interface AttributeCollectionReset extends AttributeChange { +} // AttributeCollectionReset diff --git a/solve/src/main/java/Changes/AttributeListDeletion.java b/solve/src/main/java/Changes/AttributeListDeletion.java new file mode 100644 index 0000000000000000000000000000000000000000..365491d5c3ed19be11adb1ce2e68d954925de308 --- /dev/null +++ b/solve/src/main/java/Changes/AttributeListDeletion.java @@ -0,0 +1,76 @@ +/** + */ +package Changes; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Attribute List Deletion</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.AttributeListDeletion#getDeletedValue <em>Deleted Value</em>}</li> + * <li>{@link Changes.AttributeListDeletion#getIndex <em>Index</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getAttributeListDeletion() + * @model + * @generated + */ +public interface AttributeListDeletion extends AttributeChange { + /** + * Returns the value of the '<em><b>Deleted Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Deleted Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Deleted Value</em>' attribute. + * @see #setDeletedValue(String) + * @see Changes.ChangesPackage#getAttributeListDeletion_DeletedValue() + * @model + * @generated + */ + String getDeletedValue(); + + /** + * Sets the value of the '{@link Changes.AttributeListDeletion#getDeletedValue <em>Deleted Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Deleted Value</em>' attribute. + * @see #getDeletedValue() + * @generated + */ + void setDeletedValue(String value); + + /** + * Returns the value of the '<em><b>Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Index</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Index</em>' attribute. + * @see #setIndex(int) + * @see Changes.ChangesPackage#getAttributeListDeletion_Index() + * @model required="true" + * @generated + */ + int getIndex(); + + /** + * Sets the value of the '{@link Changes.AttributeListDeletion#getIndex <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Index</em>' attribute. + * @see #getIndex() + * @generated + */ + void setIndex(int value); + +} // AttributeListDeletion diff --git a/solve/src/main/java/Changes/AttributeListInsertion.java b/solve/src/main/java/Changes/AttributeListInsertion.java new file mode 100644 index 0000000000000000000000000000000000000000..50f4a4505eee2970c8c87e9c4ea08726b09a205a --- /dev/null +++ b/solve/src/main/java/Changes/AttributeListInsertion.java @@ -0,0 +1,76 @@ +/** + */ +package Changes; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Attribute List Insertion</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.AttributeListInsertion#getAddedValue <em>Added Value</em>}</li> + * <li>{@link Changes.AttributeListInsertion#getIndex <em>Index</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getAttributeListInsertion() + * @model + * @generated + */ +public interface AttributeListInsertion extends AttributeChange { + /** + * Returns the value of the '<em><b>Added Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Added Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Added Value</em>' attribute. + * @see #setAddedValue(String) + * @see Changes.ChangesPackage#getAttributeListInsertion_AddedValue() + * @model required="true" + * @generated + */ + String getAddedValue(); + + /** + * Sets the value of the '{@link Changes.AttributeListInsertion#getAddedValue <em>Added Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Added Value</em>' attribute. + * @see #getAddedValue() + * @generated + */ + void setAddedValue(String value); + + /** + * Returns the value of the '<em><b>Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Index</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Index</em>' attribute. + * @see #setIndex(int) + * @see Changes.ChangesPackage#getAttributeListInsertion_Index() + * @model required="true" + * @generated + */ + int getIndex(); + + /** + * Sets the value of the '{@link Changes.AttributeListInsertion#getIndex <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Index</em>' attribute. + * @see #getIndex() + * @generated + */ + void setIndex(int value); + +} // AttributeListInsertion diff --git a/solve/src/main/java/Changes/AttributePropertyChange.java b/solve/src/main/java/Changes/AttributePropertyChange.java new file mode 100644 index 0000000000000000000000000000000000000000..e9a09b1b393447db87706407e4523410f5cc4f24 --- /dev/null +++ b/solve/src/main/java/Changes/AttributePropertyChange.java @@ -0,0 +1,76 @@ +/** + */ +package Changes; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Attribute Property Change</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.AttributePropertyChange#getNewValue <em>New Value</em>}</li> + * <li>{@link Changes.AttributePropertyChange#getOldValue <em>Old Value</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getAttributePropertyChange() + * @model + * @generated + */ +public interface AttributePropertyChange extends AttributeChange { + /** + * Returns the value of the '<em><b>New Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>New Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>New Value</em>' attribute. + * @see #setNewValue(String) + * @see Changes.ChangesPackage#getAttributePropertyChange_NewValue() + * @model + * @generated + */ + String getNewValue(); + + /** + * Sets the value of the '{@link Changes.AttributePropertyChange#getNewValue <em>New Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>New Value</em>' attribute. + * @see #getNewValue() + * @generated + */ + void setNewValue(String value); + + /** + * Returns the value of the '<em><b>Old Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Old Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Old Value</em>' attribute. + * @see #setOldValue(String) + * @see Changes.ChangesPackage#getAttributePropertyChange_OldValue() + * @model + * @generated + */ + String getOldValue(); + + /** + * Sets the value of the '{@link Changes.AttributePropertyChange#getOldValue <em>Old Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Old Value</em>' attribute. + * @see #getOldValue() + * @generated + */ + void setOldValue(String value); + +} // AttributePropertyChange diff --git a/solve/src/main/java/Changes/ChangeTransaction.java b/solve/src/main/java/Changes/ChangeTransaction.java new file mode 100644 index 0000000000000000000000000000000000000000..c940ca1189dd22de5210a4b102e385463e53eee1 --- /dev/null +++ b/solve/src/main/java/Changes/ChangeTransaction.java @@ -0,0 +1,67 @@ +/** + */ +package Changes; + +import org.eclipse.emf.common.util.EList; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Change Transaction</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.ChangeTransaction#getSourceChange <em>Source Change</em>}</li> + * <li>{@link Changes.ChangeTransaction#getNestedChanges <em>Nested Changes</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getChangeTransaction() + * @model + * @generated + */ +public interface ChangeTransaction extends ModelChange { + /** + * Returns the value of the '<em><b>Source Change</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Source Change</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Source Change</em>' containment reference. + * @see #setSourceChange(ModelChange) + * @see Changes.ChangesPackage#getChangeTransaction_SourceChange() + * @model containment="true" required="true" + * @generated + */ + ModelChange getSourceChange(); + + /** + * Sets the value of the '{@link Changes.ChangeTransaction#getSourceChange <em>Source Change</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Source Change</em>' containment reference. + * @see #getSourceChange() + * @generated + */ + void setSourceChange(ModelChange value); + + /** + * Returns the value of the '<em><b>Nested Changes</b></em>' containment reference list. + * The list contents are of type {@link Changes.ModelChange}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Nested Changes</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Nested Changes</em>' containment reference list. + * @see Changes.ChangesPackage#getChangeTransaction_NestedChanges() + * @model containment="true" + * @generated + */ + EList<ModelChange> getNestedChanges(); + +} // ChangeTransaction diff --git a/solve/src/main/java/Changes/ChangesFactory.java b/solve/src/main/java/Changes/ChangesFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..0816c698bc5bfbc78990fe03bb67dc5aa2f1cde9 --- /dev/null +++ b/solve/src/main/java/Changes/ChangesFactory.java @@ -0,0 +1,267 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EFactory; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see Changes.ChangesPackage + * @generated + */ +public interface ChangesFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ChangesFactory eINSTANCE = Changes.impl.ChangesFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Model Change Set</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Model Change Set</em>'. + * @generated + */ + ModelChangeSet createModelChangeSet(); + + /** + * Returns a new object of class '<em>Change Transaction</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Change Transaction</em>'. + * @generated + */ + ChangeTransaction createChangeTransaction(); + + /** + * Returns a new object of class '<em>Association Collection Deletion</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Association Collection Deletion</em>'. + * @generated + */ + AssociationCollectionDeletion createAssociationCollectionDeletion(); + + /** + * Returns a new object of class '<em>Composition Collection Deletion</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Composition Collection Deletion</em>'. + * @generated + */ + CompositionCollectionDeletion createCompositionCollectionDeletion(); + + /** + * Returns a new object of class '<em>Attribute Collection Deletion</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Attribute Collection Deletion</em>'. + * @generated + */ + AttributeCollectionDeletion createAttributeCollectionDeletion(); + + /** + * Returns a new object of class '<em>Association Collection Insertion</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Association Collection Insertion</em>'. + * @generated + */ + AssociationCollectionInsertion createAssociationCollectionInsertion(); + + /** + * Returns a new object of class '<em>Composition Collection Insertion</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Composition Collection Insertion</em>'. + * @generated + */ + CompositionCollectionInsertion createCompositionCollectionInsertion(); + + /** + * Returns a new object of class '<em>Attribute Collection Insertion</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Attribute Collection Insertion</em>'. + * @generated + */ + AttributeCollectionInsertion createAttributeCollectionInsertion(); + + /** + * Returns a new object of class '<em>Association Collection Reset</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Association Collection Reset</em>'. + * @generated + */ + AssociationCollectionReset createAssociationCollectionReset(); + + /** + * Returns a new object of class '<em>Composition Collection Reset</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Composition Collection Reset</em>'. + * @generated + */ + CompositionCollectionReset createCompositionCollectionReset(); + + /** + * Returns a new object of class '<em>Attribute Collection Reset</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Attribute Collection Reset</em>'. + * @generated + */ + AttributeCollectionReset createAttributeCollectionReset(); + + /** + * Returns a new object of class '<em>Association List Deletion</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Association List Deletion</em>'. + * @generated + */ + AssociationListDeletion createAssociationListDeletion(); + + /** + * Returns a new object of class '<em>Composition List Deletion</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Composition List Deletion</em>'. + * @generated + */ + CompositionListDeletion createCompositionListDeletion(); + + /** + * Returns a new object of class '<em>Attribute List Deletion</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Attribute List Deletion</em>'. + * @generated + */ + AttributeListDeletion createAttributeListDeletion(); + + /** + * Returns a new object of class '<em>Association List Insertion</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Association List Insertion</em>'. + * @generated + */ + AssociationListInsertion createAssociationListInsertion(); + + /** + * Returns a new object of class '<em>Composition List Insertion</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Composition List Insertion</em>'. + * @generated + */ + CompositionListInsertion createCompositionListInsertion(); + + /** + * Returns a new object of class '<em>Attribute List Insertion</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Attribute List Insertion</em>'. + * @generated + */ + AttributeListInsertion createAttributeListInsertion(); + + /** + * Returns a new object of class '<em>Attribute Property Change</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Attribute Property Change</em>'. + * @generated + */ + AttributePropertyChange createAttributePropertyChange(); + + /** + * Returns a new object of class '<em>Association Property Change</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Association Property Change</em>'. + * @generated + */ + AssociationPropertyChange createAssociationPropertyChange(); + + /** + * Returns a new object of class '<em>Composition Property Change</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Composition Property Change</em>'. + * @generated + */ + CompositionPropertyChange createCompositionPropertyChange(); + + /** + * Returns a new object of class '<em>Composition Move Into Property</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Composition Move Into Property</em>'. + * @generated + */ + CompositionMoveIntoProperty createCompositionMoveIntoProperty(); + + /** + * Returns a new object of class '<em>Composition Move To List</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Composition Move To List</em>'. + * @generated + */ + CompositionMoveToList createCompositionMoveToList(); + + /** + * Returns a new object of class '<em>Composition Move To Collection</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Composition Move To Collection</em>'. + * @generated + */ + CompositionMoveToCollection createCompositionMoveToCollection(); + + /** + * Returns a new object of class '<em>Operation Call</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Operation Call</em>'. + * @generated + */ + OperationCall createOperationCall(); + + /** + * Returns a new object of class '<em>Value Argument</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Value Argument</em>'. + * @generated + */ + ValueArgument createValueArgument(); + + /** + * Returns a new object of class '<em>Reference Argument</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Reference Argument</em>'. + * @generated + */ + ReferenceArgument createReferenceArgument(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + ChangesPackage getChangesPackage(); + +} //ChangesFactory diff --git a/solve/src/main/java/Changes/ChangesPackage.java b/solve/src/main/java/Changes/ChangesPackage.java new file mode 100644 index 0000000000000000000000000000000000000000..e68424e7a3aea6ad2e6a92c3da78179f3d35d64f --- /dev/null +++ b/solve/src/main/java/Changes/ChangesPackage.java @@ -0,0 +1,3257 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @see Changes.ChangesFactory + * @model kind="package" + * @generated + */ +public interface ChangesPackage extends EPackage { + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "Changes"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "http://nmf.codeplex.com/changes"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "changes"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ChangesPackage eINSTANCE = Changes.impl.ChangesPackageImpl.init(); + + /** + * The meta object id for the '{@link Changes.impl.ModelChangeSetImpl <em>Model Change Set</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.ModelChangeSetImpl + * @see Changes.impl.ChangesPackageImpl#getModelChangeSet() + * @generated + */ + int MODEL_CHANGE_SET = 0; + + /** + * The feature id for the '<em><b>Changes</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MODEL_CHANGE_SET__CHANGES = 0; + + /** + * The number of structural features of the '<em>Model Change Set</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MODEL_CHANGE_SET_FEATURE_COUNT = 1; + + /** + * The number of operations of the '<em>Model Change Set</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MODEL_CHANGE_SET_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link Changes.impl.ModelChangeImpl <em>Model Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.ModelChangeImpl + * @see Changes.impl.ChangesPackageImpl#getModelChange() + * @generated + */ + int MODEL_CHANGE = 1; + + /** + * The number of structural features of the '<em>Model Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MODEL_CHANGE_FEATURE_COUNT = 0; + + /** + * The number of operations of the '<em>Model Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MODEL_CHANGE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link Changes.impl.ElementaryChangeImpl <em>Elementary Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.ElementaryChangeImpl + * @see Changes.impl.ChangesPackageImpl#getElementaryChange() + * @generated + */ + int ELEMENTARY_CHANGE = 2; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ELEMENTARY_CHANGE__AFFECTED_ELEMENT = MODEL_CHANGE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ELEMENTARY_CHANGE__FEATURE = MODEL_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Elementary Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ELEMENTARY_CHANGE_FEATURE_COUNT = MODEL_CHANGE_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Elementary Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ELEMENTARY_CHANGE_OPERATION_COUNT = MODEL_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.ChangeTransactionImpl <em>Change Transaction</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.ChangeTransactionImpl + * @see Changes.impl.ChangesPackageImpl#getChangeTransaction() + * @generated + */ + int CHANGE_TRANSACTION = 3; + + /** + * The feature id for the '<em><b>Source Change</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CHANGE_TRANSACTION__SOURCE_CHANGE = MODEL_CHANGE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Nested Changes</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CHANGE_TRANSACTION__NESTED_CHANGES = MODEL_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Change Transaction</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CHANGE_TRANSACTION_FEATURE_COUNT = MODEL_CHANGE_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Change Transaction</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CHANGE_TRANSACTION_OPERATION_COUNT = MODEL_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.CompositionChangeImpl <em>Composition Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionChangeImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionChange() + * @generated + */ + int COMPOSITION_CHANGE = 4; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_CHANGE__AFFECTED_ELEMENT = ELEMENTARY_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_CHANGE__FEATURE = ELEMENTARY_CHANGE__FEATURE; + + /** + * The number of structural features of the '<em>Composition Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_CHANGE_FEATURE_COUNT = ELEMENTARY_CHANGE_FEATURE_COUNT + 0; + + /** + * The number of operations of the '<em>Composition Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_CHANGE_OPERATION_COUNT = ELEMENTARY_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.AssociationChangeImpl <em>Association Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AssociationChangeImpl + * @see Changes.impl.ChangesPackageImpl#getAssociationChange() + * @generated + */ + int ASSOCIATION_CHANGE = 5; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_CHANGE__AFFECTED_ELEMENT = ELEMENTARY_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_CHANGE__FEATURE = ELEMENTARY_CHANGE__FEATURE; + + /** + * The number of structural features of the '<em>Association Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_CHANGE_FEATURE_COUNT = ELEMENTARY_CHANGE_FEATURE_COUNT + 0; + + /** + * The number of operations of the '<em>Association Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_CHANGE_OPERATION_COUNT = ELEMENTARY_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.AttributeChangeImpl <em>Attribute Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AttributeChangeImpl + * @see Changes.impl.ChangesPackageImpl#getAttributeChange() + * @generated + */ + int ATTRIBUTE_CHANGE = 6; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_CHANGE__AFFECTED_ELEMENT = ELEMENTARY_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_CHANGE__FEATURE = ELEMENTARY_CHANGE__FEATURE; + + /** + * The number of structural features of the '<em>Attribute Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_CHANGE_FEATURE_COUNT = ELEMENTARY_CHANGE_FEATURE_COUNT + 0; + + /** + * The number of operations of the '<em>Attribute Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_CHANGE_OPERATION_COUNT = ELEMENTARY_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.AssociationCollectionDeletionImpl <em>Association Collection Deletion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AssociationCollectionDeletionImpl + * @see Changes.impl.ChangesPackageImpl#getAssociationCollectionDeletion() + * @generated + */ + int ASSOCIATION_COLLECTION_DELETION = 7; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_COLLECTION_DELETION__AFFECTED_ELEMENT = ASSOCIATION_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_COLLECTION_DELETION__FEATURE = ASSOCIATION_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>Deleted Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_COLLECTION_DELETION__DELETED_ELEMENT = ASSOCIATION_CHANGE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Association Collection Deletion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_COLLECTION_DELETION_FEATURE_COUNT = ASSOCIATION_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Association Collection Deletion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_COLLECTION_DELETION_OPERATION_COUNT = ASSOCIATION_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.CompositionCollectionDeletionImpl <em>Composition Collection Deletion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionCollectionDeletionImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionCollectionDeletion() + * @generated + */ + int COMPOSITION_COLLECTION_DELETION = 8; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_COLLECTION_DELETION__AFFECTED_ELEMENT = COMPOSITION_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_COLLECTION_DELETION__FEATURE = COMPOSITION_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>Deleted Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_COLLECTION_DELETION__DELETED_ELEMENT = COMPOSITION_CHANGE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Composition Collection Deletion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_COLLECTION_DELETION_FEATURE_COUNT = COMPOSITION_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Composition Collection Deletion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_COLLECTION_DELETION_OPERATION_COUNT = COMPOSITION_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.AttributeCollectionDeletionImpl <em>Attribute Collection Deletion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AttributeCollectionDeletionImpl + * @see Changes.impl.ChangesPackageImpl#getAttributeCollectionDeletion() + * @generated + */ + int ATTRIBUTE_COLLECTION_DELETION = 9; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_COLLECTION_DELETION__AFFECTED_ELEMENT = ATTRIBUTE_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_COLLECTION_DELETION__FEATURE = ATTRIBUTE_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>Deleted Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_COLLECTION_DELETION__DELETED_VALUE = ATTRIBUTE_CHANGE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Attribute Collection Deletion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_COLLECTION_DELETION_FEATURE_COUNT = ATTRIBUTE_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Attribute Collection Deletion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_COLLECTION_DELETION_OPERATION_COUNT = ATTRIBUTE_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.AssociationCollectionInsertionImpl <em>Association Collection Insertion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AssociationCollectionInsertionImpl + * @see Changes.impl.ChangesPackageImpl#getAssociationCollectionInsertion() + * @generated + */ + int ASSOCIATION_COLLECTION_INSERTION = 10; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_COLLECTION_INSERTION__AFFECTED_ELEMENT = ASSOCIATION_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_COLLECTION_INSERTION__FEATURE = ASSOCIATION_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>Added Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_COLLECTION_INSERTION__ADDED_ELEMENT = ASSOCIATION_CHANGE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Association Collection Insertion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_COLLECTION_INSERTION_FEATURE_COUNT = ASSOCIATION_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Association Collection Insertion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_COLLECTION_INSERTION_OPERATION_COUNT = ASSOCIATION_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.CompositionCollectionInsertionImpl <em>Composition Collection Insertion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionCollectionInsertionImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionCollectionInsertion() + * @generated + */ + int COMPOSITION_COLLECTION_INSERTION = 11; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_COLLECTION_INSERTION__AFFECTED_ELEMENT = COMPOSITION_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_COLLECTION_INSERTION__FEATURE = COMPOSITION_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>Added Element</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_COLLECTION_INSERTION__ADDED_ELEMENT = COMPOSITION_CHANGE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Composition Collection Insertion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_COLLECTION_INSERTION_FEATURE_COUNT = COMPOSITION_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Composition Collection Insertion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_COLLECTION_INSERTION_OPERATION_COUNT = COMPOSITION_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.AttributeCollectionInsertionImpl <em>Attribute Collection Insertion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AttributeCollectionInsertionImpl + * @see Changes.impl.ChangesPackageImpl#getAttributeCollectionInsertion() + * @generated + */ + int ATTRIBUTE_COLLECTION_INSERTION = 12; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_COLLECTION_INSERTION__AFFECTED_ELEMENT = ATTRIBUTE_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_COLLECTION_INSERTION__FEATURE = ATTRIBUTE_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>Added Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_COLLECTION_INSERTION__ADDED_VALUE = ATTRIBUTE_CHANGE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Attribute Collection Insertion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_COLLECTION_INSERTION_FEATURE_COUNT = ATTRIBUTE_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Attribute Collection Insertion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_COLLECTION_INSERTION_OPERATION_COUNT = ATTRIBUTE_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.AssociationCollectionResetImpl <em>Association Collection Reset</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AssociationCollectionResetImpl + * @see Changes.impl.ChangesPackageImpl#getAssociationCollectionReset() + * @generated + */ + int ASSOCIATION_COLLECTION_RESET = 13; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_COLLECTION_RESET__AFFECTED_ELEMENT = ASSOCIATION_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_COLLECTION_RESET__FEATURE = ASSOCIATION_CHANGE__FEATURE; + + /** + * The number of structural features of the '<em>Association Collection Reset</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_COLLECTION_RESET_FEATURE_COUNT = ASSOCIATION_CHANGE_FEATURE_COUNT + 0; + + /** + * The number of operations of the '<em>Association Collection Reset</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_COLLECTION_RESET_OPERATION_COUNT = ASSOCIATION_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.CompositionCollectionResetImpl <em>Composition Collection Reset</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionCollectionResetImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionCollectionReset() + * @generated + */ + int COMPOSITION_COLLECTION_RESET = 14; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_COLLECTION_RESET__AFFECTED_ELEMENT = COMPOSITION_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_COLLECTION_RESET__FEATURE = COMPOSITION_CHANGE__FEATURE; + + /** + * The number of structural features of the '<em>Composition Collection Reset</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_COLLECTION_RESET_FEATURE_COUNT = COMPOSITION_CHANGE_FEATURE_COUNT + 0; + + /** + * The number of operations of the '<em>Composition Collection Reset</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_COLLECTION_RESET_OPERATION_COUNT = COMPOSITION_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.AttributeCollectionResetImpl <em>Attribute Collection Reset</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AttributeCollectionResetImpl + * @see Changes.impl.ChangesPackageImpl#getAttributeCollectionReset() + * @generated + */ + int ATTRIBUTE_COLLECTION_RESET = 15; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_COLLECTION_RESET__AFFECTED_ELEMENT = ATTRIBUTE_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_COLLECTION_RESET__FEATURE = ATTRIBUTE_CHANGE__FEATURE; + + /** + * The number of structural features of the '<em>Attribute Collection Reset</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_COLLECTION_RESET_FEATURE_COUNT = ATTRIBUTE_CHANGE_FEATURE_COUNT + 0; + + /** + * The number of operations of the '<em>Attribute Collection Reset</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_COLLECTION_RESET_OPERATION_COUNT = ATTRIBUTE_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.AssociationListDeletionImpl <em>Association List Deletion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AssociationListDeletionImpl + * @see Changes.impl.ChangesPackageImpl#getAssociationListDeletion() + * @generated + */ + int ASSOCIATION_LIST_DELETION = 16; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_LIST_DELETION__AFFECTED_ELEMENT = ASSOCIATION_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_LIST_DELETION__FEATURE = ASSOCIATION_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>Deleted Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_LIST_DELETION__DELETED_ELEMENT = ASSOCIATION_CHANGE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_LIST_DELETION__INDEX = ASSOCIATION_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Association List Deletion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_LIST_DELETION_FEATURE_COUNT = ASSOCIATION_CHANGE_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Association List Deletion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_LIST_DELETION_OPERATION_COUNT = ASSOCIATION_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.CompositionListDeletionImpl <em>Composition List Deletion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionListDeletionImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionListDeletion() + * @generated + */ + int COMPOSITION_LIST_DELETION = 17; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_LIST_DELETION__AFFECTED_ELEMENT = COMPOSITION_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_LIST_DELETION__FEATURE = COMPOSITION_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>Deleted Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_LIST_DELETION__DELETED_ELEMENT = COMPOSITION_CHANGE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_LIST_DELETION__INDEX = COMPOSITION_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Composition List Deletion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_LIST_DELETION_FEATURE_COUNT = COMPOSITION_CHANGE_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Composition List Deletion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_LIST_DELETION_OPERATION_COUNT = COMPOSITION_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.AttributeListDeletionImpl <em>Attribute List Deletion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AttributeListDeletionImpl + * @see Changes.impl.ChangesPackageImpl#getAttributeListDeletion() + * @generated + */ + int ATTRIBUTE_LIST_DELETION = 18; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_LIST_DELETION__AFFECTED_ELEMENT = ATTRIBUTE_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_LIST_DELETION__FEATURE = ATTRIBUTE_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>Deleted Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_LIST_DELETION__DELETED_VALUE = ATTRIBUTE_CHANGE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_LIST_DELETION__INDEX = ATTRIBUTE_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Attribute List Deletion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_LIST_DELETION_FEATURE_COUNT = ATTRIBUTE_CHANGE_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Attribute List Deletion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_LIST_DELETION_OPERATION_COUNT = ATTRIBUTE_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.AssociationListInsertionImpl <em>Association List Insertion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AssociationListInsertionImpl + * @see Changes.impl.ChangesPackageImpl#getAssociationListInsertion() + * @generated + */ + int ASSOCIATION_LIST_INSERTION = 19; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_LIST_INSERTION__AFFECTED_ELEMENT = ASSOCIATION_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_LIST_INSERTION__FEATURE = ASSOCIATION_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>Added Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_LIST_INSERTION__ADDED_ELEMENT = ASSOCIATION_CHANGE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_LIST_INSERTION__INDEX = ASSOCIATION_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Association List Insertion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_LIST_INSERTION_FEATURE_COUNT = ASSOCIATION_CHANGE_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Association List Insertion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_LIST_INSERTION_OPERATION_COUNT = ASSOCIATION_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.CompositionListInsertionImpl <em>Composition List Insertion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionListInsertionImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionListInsertion() + * @generated + */ + int COMPOSITION_LIST_INSERTION = 20; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_LIST_INSERTION__AFFECTED_ELEMENT = COMPOSITION_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_LIST_INSERTION__FEATURE = COMPOSITION_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>Added Element</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_LIST_INSERTION__ADDED_ELEMENT = COMPOSITION_CHANGE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_LIST_INSERTION__INDEX = COMPOSITION_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Composition List Insertion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_LIST_INSERTION_FEATURE_COUNT = COMPOSITION_CHANGE_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Composition List Insertion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_LIST_INSERTION_OPERATION_COUNT = COMPOSITION_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.AttributeListInsertionImpl <em>Attribute List Insertion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AttributeListInsertionImpl + * @see Changes.impl.ChangesPackageImpl#getAttributeListInsertion() + * @generated + */ + int ATTRIBUTE_LIST_INSERTION = 21; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_LIST_INSERTION__AFFECTED_ELEMENT = ATTRIBUTE_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_LIST_INSERTION__FEATURE = ATTRIBUTE_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>Added Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_LIST_INSERTION__ADDED_VALUE = ATTRIBUTE_CHANGE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_LIST_INSERTION__INDEX = ATTRIBUTE_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Attribute List Insertion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_LIST_INSERTION_FEATURE_COUNT = ATTRIBUTE_CHANGE_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Attribute List Insertion</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_LIST_INSERTION_OPERATION_COUNT = ATTRIBUTE_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.AttributePropertyChangeImpl <em>Attribute Property Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AttributePropertyChangeImpl + * @see Changes.impl.ChangesPackageImpl#getAttributePropertyChange() + * @generated + */ + int ATTRIBUTE_PROPERTY_CHANGE = 22; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_PROPERTY_CHANGE__AFFECTED_ELEMENT = ATTRIBUTE_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_PROPERTY_CHANGE__FEATURE = ATTRIBUTE_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>New Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_PROPERTY_CHANGE__NEW_VALUE = ATTRIBUTE_CHANGE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Old Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_PROPERTY_CHANGE__OLD_VALUE = ATTRIBUTE_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Attribute Property Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_PROPERTY_CHANGE_FEATURE_COUNT = ATTRIBUTE_CHANGE_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Attribute Property Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_PROPERTY_CHANGE_OPERATION_COUNT = ATTRIBUTE_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.AssociationPropertyChangeImpl <em>Association Property Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AssociationPropertyChangeImpl + * @see Changes.impl.ChangesPackageImpl#getAssociationPropertyChange() + * @generated + */ + int ASSOCIATION_PROPERTY_CHANGE = 23; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_PROPERTY_CHANGE__AFFECTED_ELEMENT = ASSOCIATION_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_PROPERTY_CHANGE__FEATURE = ASSOCIATION_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>New Value</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_PROPERTY_CHANGE__NEW_VALUE = ASSOCIATION_CHANGE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Old Value</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_PROPERTY_CHANGE__OLD_VALUE = ASSOCIATION_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Association Property Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_PROPERTY_CHANGE_FEATURE_COUNT = ASSOCIATION_CHANGE_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Association Property Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ASSOCIATION_PROPERTY_CHANGE_OPERATION_COUNT = ASSOCIATION_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.CompositionPropertyChangeImpl <em>Composition Property Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionPropertyChangeImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionPropertyChange() + * @generated + */ + int COMPOSITION_PROPERTY_CHANGE = 24; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_PROPERTY_CHANGE__AFFECTED_ELEMENT = COMPOSITION_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_PROPERTY_CHANGE__FEATURE = COMPOSITION_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>New Value</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_PROPERTY_CHANGE__NEW_VALUE = COMPOSITION_CHANGE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Old Value</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_PROPERTY_CHANGE__OLD_VALUE = COMPOSITION_CHANGE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Composition Property Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_PROPERTY_CHANGE_FEATURE_COUNT = COMPOSITION_CHANGE_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Composition Property Change</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_PROPERTY_CHANGE_OPERATION_COUNT = COMPOSITION_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.CompositionMoveIntoPropertyImpl <em>Composition Move Into Property</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionMoveIntoPropertyImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionMoveIntoProperty() + * @generated + */ + int COMPOSITION_MOVE_INTO_PROPERTY = 25; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_INTO_PROPERTY__AFFECTED_ELEMENT = COMPOSITION_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_INTO_PROPERTY__FEATURE = COMPOSITION_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>New Value</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_INTO_PROPERTY__NEW_VALUE = COMPOSITION_CHANGE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Old Value</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_INTO_PROPERTY__OLD_VALUE = COMPOSITION_CHANGE_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Origin</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_INTO_PROPERTY__ORIGIN = COMPOSITION_CHANGE_FEATURE_COUNT + 2; + + /** + * The number of structural features of the '<em>Composition Move Into Property</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_INTO_PROPERTY_FEATURE_COUNT = COMPOSITION_CHANGE_FEATURE_COUNT + 3; + + /** + * The number of operations of the '<em>Composition Move Into Property</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_INTO_PROPERTY_OPERATION_COUNT = COMPOSITION_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.CompositionMoveToListImpl <em>Composition Move To List</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionMoveToListImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionMoveToList() + * @generated + */ + int COMPOSITION_MOVE_TO_LIST = 26; + + /** + * The feature id for the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_TO_LIST__AFFECTED_ELEMENT = COMPOSITION_CHANGE__AFFECTED_ELEMENT; + + /** + * The feature id for the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_TO_LIST__FEATURE = COMPOSITION_CHANGE__FEATURE; + + /** + * The feature id for the '<em><b>Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_TO_LIST__INDEX = COMPOSITION_CHANGE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Moved Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_TO_LIST__MOVED_ELEMENT = COMPOSITION_CHANGE_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Origin</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_TO_LIST__ORIGIN = COMPOSITION_CHANGE_FEATURE_COUNT + 2; + + /** + * The number of structural features of the '<em>Composition Move To List</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_TO_LIST_FEATURE_COUNT = COMPOSITION_CHANGE_FEATURE_COUNT + 3; + + /** + * The number of operations of the '<em>Composition Move To List</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_TO_LIST_OPERATION_COUNT = COMPOSITION_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.CompositionMoveToCollectionImpl <em>Composition Move To Collection</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionMoveToCollectionImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionMoveToCollection() + * @generated + */ + int COMPOSITION_MOVE_TO_COLLECTION = 27; + + /** + * The feature id for the '<em><b>Moved Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_TO_COLLECTION__MOVED_ELEMENT = 0; + + /** + * The feature id for the '<em><b>Origin</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_TO_COLLECTION__ORIGIN = 1; + + /** + * The number of structural features of the '<em>Composition Move To Collection</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_TO_COLLECTION_FEATURE_COUNT = 2; + + /** + * The number of operations of the '<em>Composition Move To Collection</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPOSITION_MOVE_TO_COLLECTION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link Changes.impl.OperationCallImpl <em>Operation Call</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.OperationCallImpl + * @see Changes.impl.ChangesPackageImpl#getOperationCall() + * @generated + */ + int OPERATION_CALL = 28; + + /** + * The feature id for the '<em><b>Operation</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int OPERATION_CALL__OPERATION = MODEL_CHANGE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Target Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int OPERATION_CALL__TARGET_ELEMENT = MODEL_CHANGE_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Arguments</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int OPERATION_CALL__ARGUMENTS = MODEL_CHANGE_FEATURE_COUNT + 2; + + /** + * The number of structural features of the '<em>Operation Call</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int OPERATION_CALL_FEATURE_COUNT = MODEL_CHANGE_FEATURE_COUNT + 3; + + /** + * The number of operations of the '<em>Operation Call</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int OPERATION_CALL_OPERATION_COUNT = MODEL_CHANGE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.OperationArgumentImpl <em>Operation Argument</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.OperationArgumentImpl + * @see Changes.impl.ChangesPackageImpl#getOperationArgument() + * @generated + */ + int OPERATION_ARGUMENT = 29; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int OPERATION_ARGUMENT__NAME = 0; + + /** + * The number of structural features of the '<em>Operation Argument</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int OPERATION_ARGUMENT_FEATURE_COUNT = 1; + + /** + * The number of operations of the '<em>Operation Argument</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int OPERATION_ARGUMENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link Changes.impl.ValueArgumentImpl <em>Value Argument</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.ValueArgumentImpl + * @see Changes.impl.ChangesPackageImpl#getValueArgument() + * @generated + */ + int VALUE_ARGUMENT = 30; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VALUE_ARGUMENT__NAME = OPERATION_ARGUMENT__NAME; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VALUE_ARGUMENT__VALUE = OPERATION_ARGUMENT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Value Argument</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VALUE_ARGUMENT_FEATURE_COUNT = OPERATION_ARGUMENT_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Value Argument</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VALUE_ARGUMENT_OPERATION_COUNT = OPERATION_ARGUMENT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link Changes.impl.ReferenceArgumentImpl <em>Reference Argument</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.ReferenceArgumentImpl + * @see Changes.impl.ChangesPackageImpl#getReferenceArgument() + * @generated + */ + int REFERENCE_ARGUMENT = 31; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int REFERENCE_ARGUMENT__NAME = OPERATION_ARGUMENT__NAME; + + /** + * The feature id for the '<em><b>Value</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int REFERENCE_ARGUMENT__VALUE = OPERATION_ARGUMENT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Reference Argument</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int REFERENCE_ARGUMENT_FEATURE_COUNT = OPERATION_ARGUMENT_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Reference Argument</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int REFERENCE_ARGUMENT_OPERATION_COUNT = OPERATION_ARGUMENT_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link Changes.ModelChangeSet <em>Model Change Set</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Model Change Set</em>'. + * @see Changes.ModelChangeSet + * @generated + */ + EClass getModelChangeSet(); + + /** + * Returns the meta object for the containment reference list '{@link Changes.ModelChangeSet#getChanges <em>Changes</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Changes</em>'. + * @see Changes.ModelChangeSet#getChanges() + * @see #getModelChangeSet() + * @generated + */ + EReference getModelChangeSet_Changes(); + + /** + * Returns the meta object for class '{@link Changes.ModelChange <em>Model Change</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Model Change</em>'. + * @see Changes.ModelChange + * @generated + */ + EClass getModelChange(); + + /** + * Returns the meta object for class '{@link Changes.ElementaryChange <em>Elementary Change</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Elementary Change</em>'. + * @see Changes.ElementaryChange + * @generated + */ + EClass getElementaryChange(); + + /** + * Returns the meta object for the reference '{@link Changes.ElementaryChange#getAffectedElement <em>Affected Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Affected Element</em>'. + * @see Changes.ElementaryChange#getAffectedElement() + * @see #getElementaryChange() + * @generated + */ + EReference getElementaryChange_AffectedElement(); + + /** + * Returns the meta object for the reference '{@link Changes.ElementaryChange#getFeature <em>Feature</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Feature</em>'. + * @see Changes.ElementaryChange#getFeature() + * @see #getElementaryChange() + * @generated + */ + EReference getElementaryChange_Feature(); + + /** + * Returns the meta object for class '{@link Changes.ChangeTransaction <em>Change Transaction</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Change Transaction</em>'. + * @see Changes.ChangeTransaction + * @generated + */ + EClass getChangeTransaction(); + + /** + * Returns the meta object for the containment reference '{@link Changes.ChangeTransaction#getSourceChange <em>Source Change</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Source Change</em>'. + * @see Changes.ChangeTransaction#getSourceChange() + * @see #getChangeTransaction() + * @generated + */ + EReference getChangeTransaction_SourceChange(); + + /** + * Returns the meta object for the containment reference list '{@link Changes.ChangeTransaction#getNestedChanges <em>Nested Changes</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Nested Changes</em>'. + * @see Changes.ChangeTransaction#getNestedChanges() + * @see #getChangeTransaction() + * @generated + */ + EReference getChangeTransaction_NestedChanges(); + + /** + * Returns the meta object for class '{@link Changes.CompositionChange <em>Composition Change</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Composition Change</em>'. + * @see Changes.CompositionChange + * @generated + */ + EClass getCompositionChange(); + + /** + * Returns the meta object for class '{@link Changes.AssociationChange <em>Association Change</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Association Change</em>'. + * @see Changes.AssociationChange + * @generated + */ + EClass getAssociationChange(); + + /** + * Returns the meta object for class '{@link Changes.AttributeChange <em>Attribute Change</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Attribute Change</em>'. + * @see Changes.AttributeChange + * @generated + */ + EClass getAttributeChange(); + + /** + * Returns the meta object for class '{@link Changes.AssociationCollectionDeletion <em>Association Collection Deletion</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Association Collection Deletion</em>'. + * @see Changes.AssociationCollectionDeletion + * @generated + */ + EClass getAssociationCollectionDeletion(); + + /** + * Returns the meta object for the reference '{@link Changes.AssociationCollectionDeletion#getDeletedElement <em>Deleted Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Deleted Element</em>'. + * @see Changes.AssociationCollectionDeletion#getDeletedElement() + * @see #getAssociationCollectionDeletion() + * @generated + */ + EReference getAssociationCollectionDeletion_DeletedElement(); + + /** + * Returns the meta object for class '{@link Changes.CompositionCollectionDeletion <em>Composition Collection Deletion</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Composition Collection Deletion</em>'. + * @see Changes.CompositionCollectionDeletion + * @generated + */ + EClass getCompositionCollectionDeletion(); + + /** + * Returns the meta object for the reference '{@link Changes.CompositionCollectionDeletion#getDeletedElement <em>Deleted Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Deleted Element</em>'. + * @see Changes.CompositionCollectionDeletion#getDeletedElement() + * @see #getCompositionCollectionDeletion() + * @generated + */ + EReference getCompositionCollectionDeletion_DeletedElement(); + + /** + * Returns the meta object for class '{@link Changes.AttributeCollectionDeletion <em>Attribute Collection Deletion</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Attribute Collection Deletion</em>'. + * @see Changes.AttributeCollectionDeletion + * @generated + */ + EClass getAttributeCollectionDeletion(); + + /** + * Returns the meta object for the attribute '{@link Changes.AttributeCollectionDeletion#getDeletedValue <em>Deleted Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Deleted Value</em>'. + * @see Changes.AttributeCollectionDeletion#getDeletedValue() + * @see #getAttributeCollectionDeletion() + * @generated + */ + EAttribute getAttributeCollectionDeletion_DeletedValue(); + + /** + * Returns the meta object for class '{@link Changes.AssociationCollectionInsertion <em>Association Collection Insertion</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Association Collection Insertion</em>'. + * @see Changes.AssociationCollectionInsertion + * @generated + */ + EClass getAssociationCollectionInsertion(); + + /** + * Returns the meta object for the reference '{@link Changes.AssociationCollectionInsertion#getAddedElement <em>Added Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Added Element</em>'. + * @see Changes.AssociationCollectionInsertion#getAddedElement() + * @see #getAssociationCollectionInsertion() + * @generated + */ + EReference getAssociationCollectionInsertion_AddedElement(); + + /** + * Returns the meta object for class '{@link Changes.CompositionCollectionInsertion <em>Composition Collection Insertion</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Composition Collection Insertion</em>'. + * @see Changes.CompositionCollectionInsertion + * @generated + */ + EClass getCompositionCollectionInsertion(); + + /** + * Returns the meta object for the containment reference '{@link Changes.CompositionCollectionInsertion#getAddedElement <em>Added Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Added Element</em>'. + * @see Changes.CompositionCollectionInsertion#getAddedElement() + * @see #getCompositionCollectionInsertion() + * @generated + */ + EReference getCompositionCollectionInsertion_AddedElement(); + + /** + * Returns the meta object for class '{@link Changes.AttributeCollectionInsertion <em>Attribute Collection Insertion</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Attribute Collection Insertion</em>'. + * @see Changes.AttributeCollectionInsertion + * @generated + */ + EClass getAttributeCollectionInsertion(); + + /** + * Returns the meta object for the attribute '{@link Changes.AttributeCollectionInsertion#getAddedValue <em>Added Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Added Value</em>'. + * @see Changes.AttributeCollectionInsertion#getAddedValue() + * @see #getAttributeCollectionInsertion() + * @generated + */ + EAttribute getAttributeCollectionInsertion_AddedValue(); + + /** + * Returns the meta object for class '{@link Changes.AssociationCollectionReset <em>Association Collection Reset</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Association Collection Reset</em>'. + * @see Changes.AssociationCollectionReset + * @generated + */ + EClass getAssociationCollectionReset(); + + /** + * Returns the meta object for class '{@link Changes.CompositionCollectionReset <em>Composition Collection Reset</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Composition Collection Reset</em>'. + * @see Changes.CompositionCollectionReset + * @generated + */ + EClass getCompositionCollectionReset(); + + /** + * Returns the meta object for class '{@link Changes.AttributeCollectionReset <em>Attribute Collection Reset</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Attribute Collection Reset</em>'. + * @see Changes.AttributeCollectionReset + * @generated + */ + EClass getAttributeCollectionReset(); + + /** + * Returns the meta object for class '{@link Changes.AssociationListDeletion <em>Association List Deletion</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Association List Deletion</em>'. + * @see Changes.AssociationListDeletion + * @generated + */ + EClass getAssociationListDeletion(); + + /** + * Returns the meta object for the reference '{@link Changes.AssociationListDeletion#getDeletedElement <em>Deleted Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Deleted Element</em>'. + * @see Changes.AssociationListDeletion#getDeletedElement() + * @see #getAssociationListDeletion() + * @generated + */ + EReference getAssociationListDeletion_DeletedElement(); + + /** + * Returns the meta object for the attribute '{@link Changes.AssociationListDeletion#getIndex <em>Index</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Index</em>'. + * @see Changes.AssociationListDeletion#getIndex() + * @see #getAssociationListDeletion() + * @generated + */ + EAttribute getAssociationListDeletion_Index(); + + /** + * Returns the meta object for class '{@link Changes.CompositionListDeletion <em>Composition List Deletion</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Composition List Deletion</em>'. + * @see Changes.CompositionListDeletion + * @generated + */ + EClass getCompositionListDeletion(); + + /** + * Returns the meta object for the reference '{@link Changes.CompositionListDeletion#getDeletedElement <em>Deleted Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Deleted Element</em>'. + * @see Changes.CompositionListDeletion#getDeletedElement() + * @see #getCompositionListDeletion() + * @generated + */ + EReference getCompositionListDeletion_DeletedElement(); + + /** + * Returns the meta object for the attribute '{@link Changes.CompositionListDeletion#getIndex <em>Index</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Index</em>'. + * @see Changes.CompositionListDeletion#getIndex() + * @see #getCompositionListDeletion() + * @generated + */ + EAttribute getCompositionListDeletion_Index(); + + /** + * Returns the meta object for class '{@link Changes.AttributeListDeletion <em>Attribute List Deletion</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Attribute List Deletion</em>'. + * @see Changes.AttributeListDeletion + * @generated + */ + EClass getAttributeListDeletion(); + + /** + * Returns the meta object for the attribute '{@link Changes.AttributeListDeletion#getDeletedValue <em>Deleted Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Deleted Value</em>'. + * @see Changes.AttributeListDeletion#getDeletedValue() + * @see #getAttributeListDeletion() + * @generated + */ + EAttribute getAttributeListDeletion_DeletedValue(); + + /** + * Returns the meta object for the attribute '{@link Changes.AttributeListDeletion#getIndex <em>Index</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Index</em>'. + * @see Changes.AttributeListDeletion#getIndex() + * @see #getAttributeListDeletion() + * @generated + */ + EAttribute getAttributeListDeletion_Index(); + + /** + * Returns the meta object for class '{@link Changes.AssociationListInsertion <em>Association List Insertion</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Association List Insertion</em>'. + * @see Changes.AssociationListInsertion + * @generated + */ + EClass getAssociationListInsertion(); + + /** + * Returns the meta object for the reference '{@link Changes.AssociationListInsertion#getAddedElement <em>Added Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Added Element</em>'. + * @see Changes.AssociationListInsertion#getAddedElement() + * @see #getAssociationListInsertion() + * @generated + */ + EReference getAssociationListInsertion_AddedElement(); + + /** + * Returns the meta object for the attribute '{@link Changes.AssociationListInsertion#getIndex <em>Index</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Index</em>'. + * @see Changes.AssociationListInsertion#getIndex() + * @see #getAssociationListInsertion() + * @generated + */ + EAttribute getAssociationListInsertion_Index(); + + /** + * Returns the meta object for class '{@link Changes.CompositionListInsertion <em>Composition List Insertion</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Composition List Insertion</em>'. + * @see Changes.CompositionListInsertion + * @generated + */ + EClass getCompositionListInsertion(); + + /** + * Returns the meta object for the containment reference '{@link Changes.CompositionListInsertion#getAddedElement <em>Added Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Added Element</em>'. + * @see Changes.CompositionListInsertion#getAddedElement() + * @see #getCompositionListInsertion() + * @generated + */ + EReference getCompositionListInsertion_AddedElement(); + + /** + * Returns the meta object for the attribute '{@link Changes.CompositionListInsertion#getIndex <em>Index</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Index</em>'. + * @see Changes.CompositionListInsertion#getIndex() + * @see #getCompositionListInsertion() + * @generated + */ + EAttribute getCompositionListInsertion_Index(); + + /** + * Returns the meta object for class '{@link Changes.AttributeListInsertion <em>Attribute List Insertion</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Attribute List Insertion</em>'. + * @see Changes.AttributeListInsertion + * @generated + */ + EClass getAttributeListInsertion(); + + /** + * Returns the meta object for the attribute '{@link Changes.AttributeListInsertion#getAddedValue <em>Added Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Added Value</em>'. + * @see Changes.AttributeListInsertion#getAddedValue() + * @see #getAttributeListInsertion() + * @generated + */ + EAttribute getAttributeListInsertion_AddedValue(); + + /** + * Returns the meta object for the attribute '{@link Changes.AttributeListInsertion#getIndex <em>Index</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Index</em>'. + * @see Changes.AttributeListInsertion#getIndex() + * @see #getAttributeListInsertion() + * @generated + */ + EAttribute getAttributeListInsertion_Index(); + + /** + * Returns the meta object for class '{@link Changes.AttributePropertyChange <em>Attribute Property Change</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Attribute Property Change</em>'. + * @see Changes.AttributePropertyChange + * @generated + */ + EClass getAttributePropertyChange(); + + /** + * Returns the meta object for the attribute '{@link Changes.AttributePropertyChange#getNewValue <em>New Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>New Value</em>'. + * @see Changes.AttributePropertyChange#getNewValue() + * @see #getAttributePropertyChange() + * @generated + */ + EAttribute getAttributePropertyChange_NewValue(); + + /** + * Returns the meta object for the attribute '{@link Changes.AttributePropertyChange#getOldValue <em>Old Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Old Value</em>'. + * @see Changes.AttributePropertyChange#getOldValue() + * @see #getAttributePropertyChange() + * @generated + */ + EAttribute getAttributePropertyChange_OldValue(); + + /** + * Returns the meta object for class '{@link Changes.AssociationPropertyChange <em>Association Property Change</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Association Property Change</em>'. + * @see Changes.AssociationPropertyChange + * @generated + */ + EClass getAssociationPropertyChange(); + + /** + * Returns the meta object for the reference '{@link Changes.AssociationPropertyChange#getNewValue <em>New Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>New Value</em>'. + * @see Changes.AssociationPropertyChange#getNewValue() + * @see #getAssociationPropertyChange() + * @generated + */ + EReference getAssociationPropertyChange_NewValue(); + + /** + * Returns the meta object for the reference '{@link Changes.AssociationPropertyChange#getOldValue <em>Old Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Old Value</em>'. + * @see Changes.AssociationPropertyChange#getOldValue() + * @see #getAssociationPropertyChange() + * @generated + */ + EReference getAssociationPropertyChange_OldValue(); + + /** + * Returns the meta object for class '{@link Changes.CompositionPropertyChange <em>Composition Property Change</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Composition Property Change</em>'. + * @see Changes.CompositionPropertyChange + * @generated + */ + EClass getCompositionPropertyChange(); + + /** + * Returns the meta object for the containment reference '{@link Changes.CompositionPropertyChange#getNewValue <em>New Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>New Value</em>'. + * @see Changes.CompositionPropertyChange#getNewValue() + * @see #getCompositionPropertyChange() + * @generated + */ + EReference getCompositionPropertyChange_NewValue(); + + /** + * Returns the meta object for the reference '{@link Changes.CompositionPropertyChange#getOldValue <em>Old Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Old Value</em>'. + * @see Changes.CompositionPropertyChange#getOldValue() + * @see #getCompositionPropertyChange() + * @generated + */ + EReference getCompositionPropertyChange_OldValue(); + + /** + * Returns the meta object for class '{@link Changes.CompositionMoveIntoProperty <em>Composition Move Into Property</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Composition Move Into Property</em>'. + * @see Changes.CompositionMoveIntoProperty + * @generated + */ + EClass getCompositionMoveIntoProperty(); + + /** + * Returns the meta object for the reference '{@link Changes.CompositionMoveIntoProperty#getNewValue <em>New Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>New Value</em>'. + * @see Changes.CompositionMoveIntoProperty#getNewValue() + * @see #getCompositionMoveIntoProperty() + * @generated + */ + EReference getCompositionMoveIntoProperty_NewValue(); + + /** + * Returns the meta object for the reference '{@link Changes.CompositionMoveIntoProperty#getOldValue <em>Old Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Old Value</em>'. + * @see Changes.CompositionMoveIntoProperty#getOldValue() + * @see #getCompositionMoveIntoProperty() + * @generated + */ + EReference getCompositionMoveIntoProperty_OldValue(); + + /** + * Returns the meta object for the containment reference '{@link Changes.CompositionMoveIntoProperty#getOrigin <em>Origin</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Origin</em>'. + * @see Changes.CompositionMoveIntoProperty#getOrigin() + * @see #getCompositionMoveIntoProperty() + * @generated + */ + EReference getCompositionMoveIntoProperty_Origin(); + + /** + * Returns the meta object for class '{@link Changes.CompositionMoveToList <em>Composition Move To List</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Composition Move To List</em>'. + * @see Changes.CompositionMoveToList + * @generated + */ + EClass getCompositionMoveToList(); + + /** + * Returns the meta object for the attribute '{@link Changes.CompositionMoveToList#getIndex <em>Index</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Index</em>'. + * @see Changes.CompositionMoveToList#getIndex() + * @see #getCompositionMoveToList() + * @generated + */ + EAttribute getCompositionMoveToList_Index(); + + /** + * Returns the meta object for the reference '{@link Changes.CompositionMoveToList#getMovedElement <em>Moved Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Moved Element</em>'. + * @see Changes.CompositionMoveToList#getMovedElement() + * @see #getCompositionMoveToList() + * @generated + */ + EReference getCompositionMoveToList_MovedElement(); + + /** + * Returns the meta object for the containment reference '{@link Changes.CompositionMoveToList#getOrigin <em>Origin</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Origin</em>'. + * @see Changes.CompositionMoveToList#getOrigin() + * @see #getCompositionMoveToList() + * @generated + */ + EReference getCompositionMoveToList_Origin(); + + /** + * Returns the meta object for class '{@link Changes.CompositionMoveToCollection <em>Composition Move To Collection</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Composition Move To Collection</em>'. + * @see Changes.CompositionMoveToCollection + * @generated + */ + EClass getCompositionMoveToCollection(); + + /** + * Returns the meta object for the reference '{@link Changes.CompositionMoveToCollection#getMovedElement <em>Moved Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Moved Element</em>'. + * @see Changes.CompositionMoveToCollection#getMovedElement() + * @see #getCompositionMoveToCollection() + * @generated + */ + EReference getCompositionMoveToCollection_MovedElement(); + + /** + * Returns the meta object for the containment reference '{@link Changes.CompositionMoveToCollection#getOrigin <em>Origin</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Origin</em>'. + * @see Changes.CompositionMoveToCollection#getOrigin() + * @see #getCompositionMoveToCollection() + * @generated + */ + EReference getCompositionMoveToCollection_Origin(); + + /** + * Returns the meta object for class '{@link Changes.OperationCall <em>Operation Call</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Operation Call</em>'. + * @see Changes.OperationCall + * @generated + */ + EClass getOperationCall(); + + /** + * Returns the meta object for the reference '{@link Changes.OperationCall#getOperation <em>Operation</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Operation</em>'. + * @see Changes.OperationCall#getOperation() + * @see #getOperationCall() + * @generated + */ + EReference getOperationCall_Operation(); + + /** + * Returns the meta object for the reference '{@link Changes.OperationCall#getTargetElement <em>Target Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Target Element</em>'. + * @see Changes.OperationCall#getTargetElement() + * @see #getOperationCall() + * @generated + */ + EReference getOperationCall_TargetElement(); + + /** + * Returns the meta object for the containment reference list '{@link Changes.OperationCall#getArguments <em>Arguments</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Arguments</em>'. + * @see Changes.OperationCall#getArguments() + * @see #getOperationCall() + * @generated + */ + EReference getOperationCall_Arguments(); + + /** + * Returns the meta object for class '{@link Changes.OperationArgument <em>Operation Argument</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Operation Argument</em>'. + * @see Changes.OperationArgument + * @generated + */ + EClass getOperationArgument(); + + /** + * Returns the meta object for the attribute '{@link Changes.OperationArgument#getName <em>Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Name</em>'. + * @see Changes.OperationArgument#getName() + * @see #getOperationArgument() + * @generated + */ + EAttribute getOperationArgument_Name(); + + /** + * Returns the meta object for class '{@link Changes.ValueArgument <em>Value Argument</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Value Argument</em>'. + * @see Changes.ValueArgument + * @generated + */ + EClass getValueArgument(); + + /** + * Returns the meta object for the attribute '{@link Changes.ValueArgument#getValue <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @see Changes.ValueArgument#getValue() + * @see #getValueArgument() + * @generated + */ + EAttribute getValueArgument_Value(); + + /** + * Returns the meta object for class '{@link Changes.ReferenceArgument <em>Reference Argument</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Reference Argument</em>'. + * @see Changes.ReferenceArgument + * @generated + */ + EClass getReferenceArgument(); + + /** + * Returns the meta object for the reference '{@link Changes.ReferenceArgument#getValue <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Value</em>'. + * @see Changes.ReferenceArgument#getValue() + * @see #getReferenceArgument() + * @generated + */ + EReference getReferenceArgument_Value(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + ChangesFactory getChangesFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link Changes.impl.ModelChangeSetImpl <em>Model Change Set</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.ModelChangeSetImpl + * @see Changes.impl.ChangesPackageImpl#getModelChangeSet() + * @generated + */ + EClass MODEL_CHANGE_SET = eINSTANCE.getModelChangeSet(); + + /** + * The meta object literal for the '<em><b>Changes</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference MODEL_CHANGE_SET__CHANGES = eINSTANCE.getModelChangeSet_Changes(); + + /** + * The meta object literal for the '{@link Changes.impl.ModelChangeImpl <em>Model Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.ModelChangeImpl + * @see Changes.impl.ChangesPackageImpl#getModelChange() + * @generated + */ + EClass MODEL_CHANGE = eINSTANCE.getModelChange(); + + /** + * The meta object literal for the '{@link Changes.impl.ElementaryChangeImpl <em>Elementary Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.ElementaryChangeImpl + * @see Changes.impl.ChangesPackageImpl#getElementaryChange() + * @generated + */ + EClass ELEMENTARY_CHANGE = eINSTANCE.getElementaryChange(); + + /** + * The meta object literal for the '<em><b>Affected Element</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ELEMENTARY_CHANGE__AFFECTED_ELEMENT = eINSTANCE.getElementaryChange_AffectedElement(); + + /** + * The meta object literal for the '<em><b>Feature</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ELEMENTARY_CHANGE__FEATURE = eINSTANCE.getElementaryChange_Feature(); + + /** + * The meta object literal for the '{@link Changes.impl.ChangeTransactionImpl <em>Change Transaction</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.ChangeTransactionImpl + * @see Changes.impl.ChangesPackageImpl#getChangeTransaction() + * @generated + */ + EClass CHANGE_TRANSACTION = eINSTANCE.getChangeTransaction(); + + /** + * The meta object literal for the '<em><b>Source Change</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CHANGE_TRANSACTION__SOURCE_CHANGE = eINSTANCE.getChangeTransaction_SourceChange(); + + /** + * The meta object literal for the '<em><b>Nested Changes</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CHANGE_TRANSACTION__NESTED_CHANGES = eINSTANCE.getChangeTransaction_NestedChanges(); + + /** + * The meta object literal for the '{@link Changes.impl.CompositionChangeImpl <em>Composition Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionChangeImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionChange() + * @generated + */ + EClass COMPOSITION_CHANGE = eINSTANCE.getCompositionChange(); + + /** + * The meta object literal for the '{@link Changes.impl.AssociationChangeImpl <em>Association Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AssociationChangeImpl + * @see Changes.impl.ChangesPackageImpl#getAssociationChange() + * @generated + */ + EClass ASSOCIATION_CHANGE = eINSTANCE.getAssociationChange(); + + /** + * The meta object literal for the '{@link Changes.impl.AttributeChangeImpl <em>Attribute Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AttributeChangeImpl + * @see Changes.impl.ChangesPackageImpl#getAttributeChange() + * @generated + */ + EClass ATTRIBUTE_CHANGE = eINSTANCE.getAttributeChange(); + + /** + * The meta object literal for the '{@link Changes.impl.AssociationCollectionDeletionImpl <em>Association Collection Deletion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AssociationCollectionDeletionImpl + * @see Changes.impl.ChangesPackageImpl#getAssociationCollectionDeletion() + * @generated + */ + EClass ASSOCIATION_COLLECTION_DELETION = eINSTANCE.getAssociationCollectionDeletion(); + + /** + * The meta object literal for the '<em><b>Deleted Element</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ASSOCIATION_COLLECTION_DELETION__DELETED_ELEMENT = eINSTANCE.getAssociationCollectionDeletion_DeletedElement(); + + /** + * The meta object literal for the '{@link Changes.impl.CompositionCollectionDeletionImpl <em>Composition Collection Deletion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionCollectionDeletionImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionCollectionDeletion() + * @generated + */ + EClass COMPOSITION_COLLECTION_DELETION = eINSTANCE.getCompositionCollectionDeletion(); + + /** + * The meta object literal for the '<em><b>Deleted Element</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPOSITION_COLLECTION_DELETION__DELETED_ELEMENT = eINSTANCE.getCompositionCollectionDeletion_DeletedElement(); + + /** + * The meta object literal for the '{@link Changes.impl.AttributeCollectionDeletionImpl <em>Attribute Collection Deletion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AttributeCollectionDeletionImpl + * @see Changes.impl.ChangesPackageImpl#getAttributeCollectionDeletion() + * @generated + */ + EClass ATTRIBUTE_COLLECTION_DELETION = eINSTANCE.getAttributeCollectionDeletion(); + + /** + * The meta object literal for the '<em><b>Deleted Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ATTRIBUTE_COLLECTION_DELETION__DELETED_VALUE = eINSTANCE.getAttributeCollectionDeletion_DeletedValue(); + + /** + * The meta object literal for the '{@link Changes.impl.AssociationCollectionInsertionImpl <em>Association Collection Insertion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AssociationCollectionInsertionImpl + * @see Changes.impl.ChangesPackageImpl#getAssociationCollectionInsertion() + * @generated + */ + EClass ASSOCIATION_COLLECTION_INSERTION = eINSTANCE.getAssociationCollectionInsertion(); + + /** + * The meta object literal for the '<em><b>Added Element</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ASSOCIATION_COLLECTION_INSERTION__ADDED_ELEMENT = eINSTANCE.getAssociationCollectionInsertion_AddedElement(); + + /** + * The meta object literal for the '{@link Changes.impl.CompositionCollectionInsertionImpl <em>Composition Collection Insertion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionCollectionInsertionImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionCollectionInsertion() + * @generated + */ + EClass COMPOSITION_COLLECTION_INSERTION = eINSTANCE.getCompositionCollectionInsertion(); + + /** + * The meta object literal for the '<em><b>Added Element</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPOSITION_COLLECTION_INSERTION__ADDED_ELEMENT = eINSTANCE.getCompositionCollectionInsertion_AddedElement(); + + /** + * The meta object literal for the '{@link Changes.impl.AttributeCollectionInsertionImpl <em>Attribute Collection Insertion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AttributeCollectionInsertionImpl + * @see Changes.impl.ChangesPackageImpl#getAttributeCollectionInsertion() + * @generated + */ + EClass ATTRIBUTE_COLLECTION_INSERTION = eINSTANCE.getAttributeCollectionInsertion(); + + /** + * The meta object literal for the '<em><b>Added Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ATTRIBUTE_COLLECTION_INSERTION__ADDED_VALUE = eINSTANCE.getAttributeCollectionInsertion_AddedValue(); + + /** + * The meta object literal for the '{@link Changes.impl.AssociationCollectionResetImpl <em>Association Collection Reset</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AssociationCollectionResetImpl + * @see Changes.impl.ChangesPackageImpl#getAssociationCollectionReset() + * @generated + */ + EClass ASSOCIATION_COLLECTION_RESET = eINSTANCE.getAssociationCollectionReset(); + + /** + * The meta object literal for the '{@link Changes.impl.CompositionCollectionResetImpl <em>Composition Collection Reset</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionCollectionResetImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionCollectionReset() + * @generated + */ + EClass COMPOSITION_COLLECTION_RESET = eINSTANCE.getCompositionCollectionReset(); + + /** + * The meta object literal for the '{@link Changes.impl.AttributeCollectionResetImpl <em>Attribute Collection Reset</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AttributeCollectionResetImpl + * @see Changes.impl.ChangesPackageImpl#getAttributeCollectionReset() + * @generated + */ + EClass ATTRIBUTE_COLLECTION_RESET = eINSTANCE.getAttributeCollectionReset(); + + /** + * The meta object literal for the '{@link Changes.impl.AssociationListDeletionImpl <em>Association List Deletion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AssociationListDeletionImpl + * @see Changes.impl.ChangesPackageImpl#getAssociationListDeletion() + * @generated + */ + EClass ASSOCIATION_LIST_DELETION = eINSTANCE.getAssociationListDeletion(); + + /** + * The meta object literal for the '<em><b>Deleted Element</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ASSOCIATION_LIST_DELETION__DELETED_ELEMENT = eINSTANCE.getAssociationListDeletion_DeletedElement(); + + /** + * The meta object literal for the '<em><b>Index</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ASSOCIATION_LIST_DELETION__INDEX = eINSTANCE.getAssociationListDeletion_Index(); + + /** + * The meta object literal for the '{@link Changes.impl.CompositionListDeletionImpl <em>Composition List Deletion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionListDeletionImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionListDeletion() + * @generated + */ + EClass COMPOSITION_LIST_DELETION = eINSTANCE.getCompositionListDeletion(); + + /** + * The meta object literal for the '<em><b>Deleted Element</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPOSITION_LIST_DELETION__DELETED_ELEMENT = eINSTANCE.getCompositionListDeletion_DeletedElement(); + + /** + * The meta object literal for the '<em><b>Index</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMPOSITION_LIST_DELETION__INDEX = eINSTANCE.getCompositionListDeletion_Index(); + + /** + * The meta object literal for the '{@link Changes.impl.AttributeListDeletionImpl <em>Attribute List Deletion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AttributeListDeletionImpl + * @see Changes.impl.ChangesPackageImpl#getAttributeListDeletion() + * @generated + */ + EClass ATTRIBUTE_LIST_DELETION = eINSTANCE.getAttributeListDeletion(); + + /** + * The meta object literal for the '<em><b>Deleted Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ATTRIBUTE_LIST_DELETION__DELETED_VALUE = eINSTANCE.getAttributeListDeletion_DeletedValue(); + + /** + * The meta object literal for the '<em><b>Index</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ATTRIBUTE_LIST_DELETION__INDEX = eINSTANCE.getAttributeListDeletion_Index(); + + /** + * The meta object literal for the '{@link Changes.impl.AssociationListInsertionImpl <em>Association List Insertion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AssociationListInsertionImpl + * @see Changes.impl.ChangesPackageImpl#getAssociationListInsertion() + * @generated + */ + EClass ASSOCIATION_LIST_INSERTION = eINSTANCE.getAssociationListInsertion(); + + /** + * The meta object literal for the '<em><b>Added Element</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ASSOCIATION_LIST_INSERTION__ADDED_ELEMENT = eINSTANCE.getAssociationListInsertion_AddedElement(); + + /** + * The meta object literal for the '<em><b>Index</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ASSOCIATION_LIST_INSERTION__INDEX = eINSTANCE.getAssociationListInsertion_Index(); + + /** + * The meta object literal for the '{@link Changes.impl.CompositionListInsertionImpl <em>Composition List Insertion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionListInsertionImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionListInsertion() + * @generated + */ + EClass COMPOSITION_LIST_INSERTION = eINSTANCE.getCompositionListInsertion(); + + /** + * The meta object literal for the '<em><b>Added Element</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPOSITION_LIST_INSERTION__ADDED_ELEMENT = eINSTANCE.getCompositionListInsertion_AddedElement(); + + /** + * The meta object literal for the '<em><b>Index</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMPOSITION_LIST_INSERTION__INDEX = eINSTANCE.getCompositionListInsertion_Index(); + + /** + * The meta object literal for the '{@link Changes.impl.AttributeListInsertionImpl <em>Attribute List Insertion</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AttributeListInsertionImpl + * @see Changes.impl.ChangesPackageImpl#getAttributeListInsertion() + * @generated + */ + EClass ATTRIBUTE_LIST_INSERTION = eINSTANCE.getAttributeListInsertion(); + + /** + * The meta object literal for the '<em><b>Added Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ATTRIBUTE_LIST_INSERTION__ADDED_VALUE = eINSTANCE.getAttributeListInsertion_AddedValue(); + + /** + * The meta object literal for the '<em><b>Index</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ATTRIBUTE_LIST_INSERTION__INDEX = eINSTANCE.getAttributeListInsertion_Index(); + + /** + * The meta object literal for the '{@link Changes.impl.AttributePropertyChangeImpl <em>Attribute Property Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AttributePropertyChangeImpl + * @see Changes.impl.ChangesPackageImpl#getAttributePropertyChange() + * @generated + */ + EClass ATTRIBUTE_PROPERTY_CHANGE = eINSTANCE.getAttributePropertyChange(); + + /** + * The meta object literal for the '<em><b>New Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ATTRIBUTE_PROPERTY_CHANGE__NEW_VALUE = eINSTANCE.getAttributePropertyChange_NewValue(); + + /** + * The meta object literal for the '<em><b>Old Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ATTRIBUTE_PROPERTY_CHANGE__OLD_VALUE = eINSTANCE.getAttributePropertyChange_OldValue(); + + /** + * The meta object literal for the '{@link Changes.impl.AssociationPropertyChangeImpl <em>Association Property Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.AssociationPropertyChangeImpl + * @see Changes.impl.ChangesPackageImpl#getAssociationPropertyChange() + * @generated + */ + EClass ASSOCIATION_PROPERTY_CHANGE = eINSTANCE.getAssociationPropertyChange(); + + /** + * The meta object literal for the '<em><b>New Value</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ASSOCIATION_PROPERTY_CHANGE__NEW_VALUE = eINSTANCE.getAssociationPropertyChange_NewValue(); + + /** + * The meta object literal for the '<em><b>Old Value</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ASSOCIATION_PROPERTY_CHANGE__OLD_VALUE = eINSTANCE.getAssociationPropertyChange_OldValue(); + + /** + * The meta object literal for the '{@link Changes.impl.CompositionPropertyChangeImpl <em>Composition Property Change</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionPropertyChangeImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionPropertyChange() + * @generated + */ + EClass COMPOSITION_PROPERTY_CHANGE = eINSTANCE.getCompositionPropertyChange(); + + /** + * The meta object literal for the '<em><b>New Value</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPOSITION_PROPERTY_CHANGE__NEW_VALUE = eINSTANCE.getCompositionPropertyChange_NewValue(); + + /** + * The meta object literal for the '<em><b>Old Value</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPOSITION_PROPERTY_CHANGE__OLD_VALUE = eINSTANCE.getCompositionPropertyChange_OldValue(); + + /** + * The meta object literal for the '{@link Changes.impl.CompositionMoveIntoPropertyImpl <em>Composition Move Into Property</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionMoveIntoPropertyImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionMoveIntoProperty() + * @generated + */ + EClass COMPOSITION_MOVE_INTO_PROPERTY = eINSTANCE.getCompositionMoveIntoProperty(); + + /** + * The meta object literal for the '<em><b>New Value</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPOSITION_MOVE_INTO_PROPERTY__NEW_VALUE = eINSTANCE.getCompositionMoveIntoProperty_NewValue(); + + /** + * The meta object literal for the '<em><b>Old Value</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPOSITION_MOVE_INTO_PROPERTY__OLD_VALUE = eINSTANCE.getCompositionMoveIntoProperty_OldValue(); + + /** + * The meta object literal for the '<em><b>Origin</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPOSITION_MOVE_INTO_PROPERTY__ORIGIN = eINSTANCE.getCompositionMoveIntoProperty_Origin(); + + /** + * The meta object literal for the '{@link Changes.impl.CompositionMoveToListImpl <em>Composition Move To List</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionMoveToListImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionMoveToList() + * @generated + */ + EClass COMPOSITION_MOVE_TO_LIST = eINSTANCE.getCompositionMoveToList(); + + /** + * The meta object literal for the '<em><b>Index</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMPOSITION_MOVE_TO_LIST__INDEX = eINSTANCE.getCompositionMoveToList_Index(); + + /** + * The meta object literal for the '<em><b>Moved Element</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPOSITION_MOVE_TO_LIST__MOVED_ELEMENT = eINSTANCE.getCompositionMoveToList_MovedElement(); + + /** + * The meta object literal for the '<em><b>Origin</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPOSITION_MOVE_TO_LIST__ORIGIN = eINSTANCE.getCompositionMoveToList_Origin(); + + /** + * The meta object literal for the '{@link Changes.impl.CompositionMoveToCollectionImpl <em>Composition Move To Collection</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.CompositionMoveToCollectionImpl + * @see Changes.impl.ChangesPackageImpl#getCompositionMoveToCollection() + * @generated + */ + EClass COMPOSITION_MOVE_TO_COLLECTION = eINSTANCE.getCompositionMoveToCollection(); + + /** + * The meta object literal for the '<em><b>Moved Element</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPOSITION_MOVE_TO_COLLECTION__MOVED_ELEMENT = eINSTANCE.getCompositionMoveToCollection_MovedElement(); + + /** + * The meta object literal for the '<em><b>Origin</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPOSITION_MOVE_TO_COLLECTION__ORIGIN = eINSTANCE.getCompositionMoveToCollection_Origin(); + + /** + * The meta object literal for the '{@link Changes.impl.OperationCallImpl <em>Operation Call</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.OperationCallImpl + * @see Changes.impl.ChangesPackageImpl#getOperationCall() + * @generated + */ + EClass OPERATION_CALL = eINSTANCE.getOperationCall(); + + /** + * The meta object literal for the '<em><b>Operation</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference OPERATION_CALL__OPERATION = eINSTANCE.getOperationCall_Operation(); + + /** + * The meta object literal for the '<em><b>Target Element</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference OPERATION_CALL__TARGET_ELEMENT = eINSTANCE.getOperationCall_TargetElement(); + + /** + * The meta object literal for the '<em><b>Arguments</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference OPERATION_CALL__ARGUMENTS = eINSTANCE.getOperationCall_Arguments(); + + /** + * The meta object literal for the '{@link Changes.impl.OperationArgumentImpl <em>Operation Argument</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.OperationArgumentImpl + * @see Changes.impl.ChangesPackageImpl#getOperationArgument() + * @generated + */ + EClass OPERATION_ARGUMENT = eINSTANCE.getOperationArgument(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute OPERATION_ARGUMENT__NAME = eINSTANCE.getOperationArgument_Name(); + + /** + * The meta object literal for the '{@link Changes.impl.ValueArgumentImpl <em>Value Argument</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.ValueArgumentImpl + * @see Changes.impl.ChangesPackageImpl#getValueArgument() + * @generated + */ + EClass VALUE_ARGUMENT = eINSTANCE.getValueArgument(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VALUE_ARGUMENT__VALUE = eINSTANCE.getValueArgument_Value(); + + /** + * The meta object literal for the '{@link Changes.impl.ReferenceArgumentImpl <em>Reference Argument</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see Changes.impl.ReferenceArgumentImpl + * @see Changes.impl.ChangesPackageImpl#getReferenceArgument() + * @generated + */ + EClass REFERENCE_ARGUMENT = eINSTANCE.getReferenceArgument(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference REFERENCE_ARGUMENT__VALUE = eINSTANCE.getReferenceArgument_Value(); + + } + +} //ChangesPackage diff --git a/solve/src/main/java/Changes/CompositionChange.java b/solve/src/main/java/Changes/CompositionChange.java new file mode 100644 index 0000000000000000000000000000000000000000..55007821a451bae9c92c2d42e9f2fc7f5c0861e2 --- /dev/null +++ b/solve/src/main/java/Changes/CompositionChange.java @@ -0,0 +1,17 @@ +/** + */ +package Changes; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Composition Change</b></em>'. + * <!-- end-user-doc --> + * + * + * @see Changes.ChangesPackage#getCompositionChange() + * @model + * @generated + */ +public interface CompositionChange extends ElementaryChange { +} // CompositionChange diff --git a/solve/src/main/java/Changes/CompositionCollectionDeletion.java b/solve/src/main/java/Changes/CompositionCollectionDeletion.java new file mode 100644 index 0000000000000000000000000000000000000000..bfe0e368a12c5af6da709dd6946439da9a28d31f --- /dev/null +++ b/solve/src/main/java/Changes/CompositionCollectionDeletion.java @@ -0,0 +1,50 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Composition Collection Deletion</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.CompositionCollectionDeletion#getDeletedElement <em>Deleted Element</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getCompositionCollectionDeletion() + * @model + * @generated + */ +public interface CompositionCollectionDeletion extends CompositionChange { + /** + * Returns the value of the '<em><b>Deleted Element</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Deleted Element</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Deleted Element</em>' reference. + * @see #setDeletedElement(EObject) + * @see Changes.ChangesPackage#getCompositionCollectionDeletion_DeletedElement() + * @model + * @generated + */ + EObject getDeletedElement(); + + /** + * Sets the value of the '{@link Changes.CompositionCollectionDeletion#getDeletedElement <em>Deleted Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Deleted Element</em>' reference. + * @see #getDeletedElement() + * @generated + */ + void setDeletedElement(EObject value); + +} // CompositionCollectionDeletion diff --git a/solve/src/main/java/Changes/CompositionCollectionInsertion.java b/solve/src/main/java/Changes/CompositionCollectionInsertion.java new file mode 100644 index 0000000000000000000000000000000000000000..b50499ea8e3c87f8b4a9b4360df867be82fbe90b --- /dev/null +++ b/solve/src/main/java/Changes/CompositionCollectionInsertion.java @@ -0,0 +1,50 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Composition Collection Insertion</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.CompositionCollectionInsertion#getAddedElement <em>Added Element</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getCompositionCollectionInsertion() + * @model + * @generated + */ +public interface CompositionCollectionInsertion extends CompositionChange { + /** + * Returns the value of the '<em><b>Added Element</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Added Element</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Added Element</em>' containment reference. + * @see #setAddedElement(EObject) + * @see Changes.ChangesPackage#getCompositionCollectionInsertion_AddedElement() + * @model containment="true" required="true" + * @generated + */ + EObject getAddedElement(); + + /** + * Sets the value of the '{@link Changes.CompositionCollectionInsertion#getAddedElement <em>Added Element</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Added Element</em>' containment reference. + * @see #getAddedElement() + * @generated + */ + void setAddedElement(EObject value); + +} // CompositionCollectionInsertion diff --git a/solve/src/main/java/Changes/CompositionCollectionReset.java b/solve/src/main/java/Changes/CompositionCollectionReset.java new file mode 100644 index 0000000000000000000000000000000000000000..4c7c5a2afaa8b36ceb3de226c9b38b89c7751025 --- /dev/null +++ b/solve/src/main/java/Changes/CompositionCollectionReset.java @@ -0,0 +1,17 @@ +/** + */ +package Changes; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Composition Collection Reset</b></em>'. + * <!-- end-user-doc --> + * + * + * @see Changes.ChangesPackage#getCompositionCollectionReset() + * @model + * @generated + */ +public interface CompositionCollectionReset extends CompositionChange { +} // CompositionCollectionReset diff --git a/solve/src/main/java/Changes/CompositionListDeletion.java b/solve/src/main/java/Changes/CompositionListDeletion.java new file mode 100644 index 0000000000000000000000000000000000000000..9ce342b2a9678e897344d844f16e09128516e342 --- /dev/null +++ b/solve/src/main/java/Changes/CompositionListDeletion.java @@ -0,0 +1,77 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Composition List Deletion</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.CompositionListDeletion#getDeletedElement <em>Deleted Element</em>}</li> + * <li>{@link Changes.CompositionListDeletion#getIndex <em>Index</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getCompositionListDeletion() + * @model + * @generated + */ +public interface CompositionListDeletion extends CompositionChange { + /** + * Returns the value of the '<em><b>Deleted Element</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Deleted Element</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Deleted Element</em>' reference. + * @see #setDeletedElement(EObject) + * @see Changes.ChangesPackage#getCompositionListDeletion_DeletedElement() + * @model + * @generated + */ + EObject getDeletedElement(); + + /** + * Sets the value of the '{@link Changes.CompositionListDeletion#getDeletedElement <em>Deleted Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Deleted Element</em>' reference. + * @see #getDeletedElement() + * @generated + */ + void setDeletedElement(EObject value); + + /** + * Returns the value of the '<em><b>Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Index</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Index</em>' attribute. + * @see #setIndex(int) + * @see Changes.ChangesPackage#getCompositionListDeletion_Index() + * @model required="true" + * @generated + */ + int getIndex(); + + /** + * Sets the value of the '{@link Changes.CompositionListDeletion#getIndex <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Index</em>' attribute. + * @see #getIndex() + * @generated + */ + void setIndex(int value); + +} // CompositionListDeletion diff --git a/solve/src/main/java/Changes/CompositionListInsertion.java b/solve/src/main/java/Changes/CompositionListInsertion.java new file mode 100644 index 0000000000000000000000000000000000000000..f8e5a0b09b0794e78dc4010dc4bfb1ffad7bb212 --- /dev/null +++ b/solve/src/main/java/Changes/CompositionListInsertion.java @@ -0,0 +1,77 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Composition List Insertion</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.CompositionListInsertion#getAddedElement <em>Added Element</em>}</li> + * <li>{@link Changes.CompositionListInsertion#getIndex <em>Index</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getCompositionListInsertion() + * @model + * @generated + */ +public interface CompositionListInsertion extends CompositionChange { + /** + * Returns the value of the '<em><b>Added Element</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Added Element</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Added Element</em>' containment reference. + * @see #setAddedElement(EObject) + * @see Changes.ChangesPackage#getCompositionListInsertion_AddedElement() + * @model containment="true" required="true" + * @generated + */ + EObject getAddedElement(); + + /** + * Sets the value of the '{@link Changes.CompositionListInsertion#getAddedElement <em>Added Element</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Added Element</em>' containment reference. + * @see #getAddedElement() + * @generated + */ + void setAddedElement(EObject value); + + /** + * Returns the value of the '<em><b>Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Index</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Index</em>' attribute. + * @see #setIndex(int) + * @see Changes.ChangesPackage#getCompositionListInsertion_Index() + * @model required="true" + * @generated + */ + int getIndex(); + + /** + * Sets the value of the '{@link Changes.CompositionListInsertion#getIndex <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Index</em>' attribute. + * @see #getIndex() + * @generated + */ + void setIndex(int value); + +} // CompositionListInsertion diff --git a/solve/src/main/java/Changes/CompositionMoveIntoProperty.java b/solve/src/main/java/Changes/CompositionMoveIntoProperty.java new file mode 100644 index 0000000000000000000000000000000000000000..09feb435769fba3796e731c77db0b53a023f69f0 --- /dev/null +++ b/solve/src/main/java/Changes/CompositionMoveIntoProperty.java @@ -0,0 +1,104 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Composition Move Into Property</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.CompositionMoveIntoProperty#getNewValue <em>New Value</em>}</li> + * <li>{@link Changes.CompositionMoveIntoProperty#getOldValue <em>Old Value</em>}</li> + * <li>{@link Changes.CompositionMoveIntoProperty#getOrigin <em>Origin</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getCompositionMoveIntoProperty() + * @model + * @generated + */ +public interface CompositionMoveIntoProperty extends CompositionChange { + /** + * Returns the value of the '<em><b>New Value</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>New Value</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>New Value</em>' reference. + * @see #setNewValue(EObject) + * @see Changes.ChangesPackage#getCompositionMoveIntoProperty_NewValue() + * @model required="true" + * @generated + */ + EObject getNewValue(); + + /** + * Sets the value of the '{@link Changes.CompositionMoveIntoProperty#getNewValue <em>New Value</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>New Value</em>' reference. + * @see #getNewValue() + * @generated + */ + void setNewValue(EObject value); + + /** + * Returns the value of the '<em><b>Old Value</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Old Value</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Old Value</em>' reference. + * @see #setOldValue(EObject) + * @see Changes.ChangesPackage#getCompositionMoveIntoProperty_OldValue() + * @model + * @generated + */ + EObject getOldValue(); + + /** + * Sets the value of the '{@link Changes.CompositionMoveIntoProperty#getOldValue <em>Old Value</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Old Value</em>' reference. + * @see #getOldValue() + * @generated + */ + void setOldValue(EObject value); + + /** + * Returns the value of the '<em><b>Origin</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Origin</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Origin</em>' containment reference. + * @see #setOrigin(ElementaryChange) + * @see Changes.ChangesPackage#getCompositionMoveIntoProperty_Origin() + * @model containment="true" + * @generated + */ + ElementaryChange getOrigin(); + + /** + * Sets the value of the '{@link Changes.CompositionMoveIntoProperty#getOrigin <em>Origin</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Origin</em>' containment reference. + * @see #getOrigin() + * @generated + */ + void setOrigin(ElementaryChange value); + +} // CompositionMoveIntoProperty diff --git a/solve/src/main/java/Changes/CompositionMoveToCollection.java b/solve/src/main/java/Changes/CompositionMoveToCollection.java new file mode 100644 index 0000000000000000000000000000000000000000..bbad89270603b549dbad6a7eed92e45b71ddbea4 --- /dev/null +++ b/solve/src/main/java/Changes/CompositionMoveToCollection.java @@ -0,0 +1,77 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Composition Move To Collection</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.CompositionMoveToCollection#getMovedElement <em>Moved Element</em>}</li> + * <li>{@link Changes.CompositionMoveToCollection#getOrigin <em>Origin</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getCompositionMoveToCollection() + * @model + * @generated + */ +public interface CompositionMoveToCollection extends EObject { + /** + * Returns the value of the '<em><b>Moved Element</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Moved Element</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Moved Element</em>' reference. + * @see #setMovedElement(EObject) + * @see Changes.ChangesPackage#getCompositionMoveToCollection_MovedElement() + * @model required="true" + * @generated + */ + EObject getMovedElement(); + + /** + * Sets the value of the '{@link Changes.CompositionMoveToCollection#getMovedElement <em>Moved Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Moved Element</em>' reference. + * @see #getMovedElement() + * @generated + */ + void setMovedElement(EObject value); + + /** + * Returns the value of the '<em><b>Origin</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Origin</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Origin</em>' containment reference. + * @see #setOrigin(ElementaryChange) + * @see Changes.ChangesPackage#getCompositionMoveToCollection_Origin() + * @model containment="true" required="true" + * @generated + */ + ElementaryChange getOrigin(); + + /** + * Sets the value of the '{@link Changes.CompositionMoveToCollection#getOrigin <em>Origin</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Origin</em>' containment reference. + * @see #getOrigin() + * @generated + */ + void setOrigin(ElementaryChange value); + +} // CompositionMoveToCollection diff --git a/solve/src/main/java/Changes/CompositionMoveToList.java b/solve/src/main/java/Changes/CompositionMoveToList.java new file mode 100644 index 0000000000000000000000000000000000000000..5799ffeefb07ae16ffdb1c6e973c6d1657315f74 --- /dev/null +++ b/solve/src/main/java/Changes/CompositionMoveToList.java @@ -0,0 +1,104 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Composition Move To List</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.CompositionMoveToList#getIndex <em>Index</em>}</li> + * <li>{@link Changes.CompositionMoveToList#getMovedElement <em>Moved Element</em>}</li> + * <li>{@link Changes.CompositionMoveToList#getOrigin <em>Origin</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getCompositionMoveToList() + * @model + * @generated + */ +public interface CompositionMoveToList extends CompositionChange { + /** + * Returns the value of the '<em><b>Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Index</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Index</em>' attribute. + * @see #setIndex(int) + * @see Changes.ChangesPackage#getCompositionMoveToList_Index() + * @model required="true" + * @generated + */ + int getIndex(); + + /** + * Sets the value of the '{@link Changes.CompositionMoveToList#getIndex <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Index</em>' attribute. + * @see #getIndex() + * @generated + */ + void setIndex(int value); + + /** + * Returns the value of the '<em><b>Moved Element</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Moved Element</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Moved Element</em>' reference. + * @see #setMovedElement(EObject) + * @see Changes.ChangesPackage#getCompositionMoveToList_MovedElement() + * @model required="true" + * @generated + */ + EObject getMovedElement(); + + /** + * Sets the value of the '{@link Changes.CompositionMoveToList#getMovedElement <em>Moved Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Moved Element</em>' reference. + * @see #getMovedElement() + * @generated + */ + void setMovedElement(EObject value); + + /** + * Returns the value of the '<em><b>Origin</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Origin</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Origin</em>' containment reference. + * @see #setOrigin(ElementaryChange) + * @see Changes.ChangesPackage#getCompositionMoveToList_Origin() + * @model containment="true" required="true" + * @generated + */ + ElementaryChange getOrigin(); + + /** + * Sets the value of the '{@link Changes.CompositionMoveToList#getOrigin <em>Origin</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Origin</em>' containment reference. + * @see #getOrigin() + * @generated + */ + void setOrigin(ElementaryChange value); + +} // CompositionMoveToList diff --git a/solve/src/main/java/Changes/CompositionPropertyChange.java b/solve/src/main/java/Changes/CompositionPropertyChange.java new file mode 100644 index 0000000000000000000000000000000000000000..767221c5223885f3c745aa12f1c6ee1e78637c82 --- /dev/null +++ b/solve/src/main/java/Changes/CompositionPropertyChange.java @@ -0,0 +1,77 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Composition Property Change</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.CompositionPropertyChange#getNewValue <em>New Value</em>}</li> + * <li>{@link Changes.CompositionPropertyChange#getOldValue <em>Old Value</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getCompositionPropertyChange() + * @model + * @generated + */ +public interface CompositionPropertyChange extends CompositionChange { + /** + * Returns the value of the '<em><b>New Value</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>New Value</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>New Value</em>' containment reference. + * @see #setNewValue(EObject) + * @see Changes.ChangesPackage#getCompositionPropertyChange_NewValue() + * @model containment="true" + * @generated + */ + EObject getNewValue(); + + /** + * Sets the value of the '{@link Changes.CompositionPropertyChange#getNewValue <em>New Value</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>New Value</em>' containment reference. + * @see #getNewValue() + * @generated + */ + void setNewValue(EObject value); + + /** + * Returns the value of the '<em><b>Old Value</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Old Value</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Old Value</em>' reference. + * @see #setOldValue(EObject) + * @see Changes.ChangesPackage#getCompositionPropertyChange_OldValue() + * @model + * @generated + */ + EObject getOldValue(); + + /** + * Sets the value of the '{@link Changes.CompositionPropertyChange#getOldValue <em>Old Value</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Old Value</em>' reference. + * @see #getOldValue() + * @generated + */ + void setOldValue(EObject value); + +} // CompositionPropertyChange diff --git a/solve/src/main/java/Changes/ElementaryChange.java b/solve/src/main/java/Changes/ElementaryChange.java new file mode 100644 index 0000000000000000000000000000000000000000..87a968d13f0f8b8274065830b9b04d6e600e4c14 --- /dev/null +++ b/solve/src/main/java/Changes/ElementaryChange.java @@ -0,0 +1,78 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Elementary Change</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.ElementaryChange#getAffectedElement <em>Affected Element</em>}</li> + * <li>{@link Changes.ElementaryChange#getFeature <em>Feature</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getElementaryChange() + * @model abstract="true" + * @generated + */ +public interface ElementaryChange extends ModelChange { + /** + * Returns the value of the '<em><b>Affected Element</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Affected Element</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Affected Element</em>' reference. + * @see #setAffectedElement(EObject) + * @see Changes.ChangesPackage#getElementaryChange_AffectedElement() + * @model required="true" + * @generated + */ + EObject getAffectedElement(); + + /** + * Sets the value of the '{@link Changes.ElementaryChange#getAffectedElement <em>Affected Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Affected Element</em>' reference. + * @see #getAffectedElement() + * @generated + */ + void setAffectedElement(EObject value); + + /** + * Returns the value of the '<em><b>Feature</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Feature</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Feature</em>' reference. + * @see #setFeature(EStructuralFeature) + * @see Changes.ChangesPackage#getElementaryChange_Feature() + * @model required="true" + * @generated + */ + EStructuralFeature getFeature(); + + /** + * Sets the value of the '{@link Changes.ElementaryChange#getFeature <em>Feature</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Feature</em>' reference. + * @see #getFeature() + * @generated + */ + void setFeature(EStructuralFeature value); + +} // ElementaryChange diff --git a/solve/src/main/java/Changes/ModelChange.java b/solve/src/main/java/Changes/ModelChange.java new file mode 100644 index 0000000000000000000000000000000000000000..868d998813c415498d81c09866675c8889d1546c --- /dev/null +++ b/solve/src/main/java/Changes/ModelChange.java @@ -0,0 +1,19 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Model Change</b></em>'. + * <!-- end-user-doc --> + * + * + * @see Changes.ChangesPackage#getModelChange() + * @model abstract="true" + * @generated + */ +public interface ModelChange extends EObject { + void apply(); +} // ModelChange diff --git a/solve/src/main/java/Changes/ModelChangeSet.java b/solve/src/main/java/Changes/ModelChangeSet.java new file mode 100644 index 0000000000000000000000000000000000000000..92937ae98bd34a87a327a3017ab2d5255fa4699b --- /dev/null +++ b/solve/src/main/java/Changes/ModelChangeSet.java @@ -0,0 +1,42 @@ +/** + */ +package Changes; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Model Change Set</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.ModelChangeSet#getChanges <em>Changes</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getModelChangeSet() + * @model + * @generated + */ +public interface ModelChangeSet extends EObject { + /** + * Returns the value of the '<em><b>Changes</b></em>' containment reference list. + * The list contents are of type {@link Changes.ModelChange}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Changes</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Changes</em>' containment reference list. + * @see Changes.ChangesPackage#getModelChangeSet_Changes() + * @model containment="true" + * @generated + */ + EList<ModelChange> getChanges(); + +} // ModelChangeSet diff --git a/solve/src/main/java/Changes/OperationArgument.java b/solve/src/main/java/Changes/OperationArgument.java new file mode 100644 index 0000000000000000000000000000000000000000..f4f4dd09026f751419b62ef1da3bf21b01261a26 --- /dev/null +++ b/solve/src/main/java/Changes/OperationArgument.java @@ -0,0 +1,50 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Operation Argument</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.OperationArgument#getName <em>Name</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getOperationArgument() + * @model abstract="true" + * @generated + */ +public interface OperationArgument extends EObject { + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see Changes.ChangesPackage#getOperationArgument_Name() + * @model required="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link Changes.OperationArgument#getName <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // OperationArgument diff --git a/solve/src/main/java/Changes/OperationCall.java b/solve/src/main/java/Changes/OperationCall.java new file mode 100644 index 0000000000000000000000000000000000000000..23554f8f6b12e8ccf077fe2e343992865db90760 --- /dev/null +++ b/solve/src/main/java/Changes/OperationCall.java @@ -0,0 +1,97 @@ +/** + */ +package Changes; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EOperation; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Operation Call</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.OperationCall#getOperation <em>Operation</em>}</li> + * <li>{@link Changes.OperationCall#getTargetElement <em>Target Element</em>}</li> + * <li>{@link Changes.OperationCall#getArguments <em>Arguments</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getOperationCall() + * @model + * @generated + */ +public interface OperationCall extends ModelChange { + /** + * Returns the value of the '<em><b>Operation</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Operation</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Operation</em>' reference. + * @see #setOperation(EOperation) + * @see Changes.ChangesPackage#getOperationCall_Operation() + * @model required="true" + * @generated + */ + EOperation getOperation(); + + /** + * Sets the value of the '{@link Changes.OperationCall#getOperation <em>Operation</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Operation</em>' reference. + * @see #getOperation() + * @generated + */ + void setOperation(EOperation value); + + /** + * Returns the value of the '<em><b>Target Element</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Target Element</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Target Element</em>' reference. + * @see #setTargetElement(EObject) + * @see Changes.ChangesPackage#getOperationCall_TargetElement() + * @model + * @generated + */ + EObject getTargetElement(); + + /** + * Sets the value of the '{@link Changes.OperationCall#getTargetElement <em>Target Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Target Element</em>' reference. + * @see #getTargetElement() + * @generated + */ + void setTargetElement(EObject value); + + /** + * Returns the value of the '<em><b>Arguments</b></em>' containment reference list. + * The list contents are of type {@link Changes.OperationArgument}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Arguments</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Arguments</em>' containment reference list. + * @see Changes.ChangesPackage#getOperationCall_Arguments() + * @model containment="true" + * @generated + */ + EList<OperationArgument> getArguments(); + +} // OperationCall diff --git a/solve/src/main/java/Changes/ReferenceArgument.java b/solve/src/main/java/Changes/ReferenceArgument.java new file mode 100644 index 0000000000000000000000000000000000000000..6207c3d3897620800eaee21cadb6c82cb65875cd --- /dev/null +++ b/solve/src/main/java/Changes/ReferenceArgument.java @@ -0,0 +1,50 @@ +/** + */ +package Changes; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Reference Argument</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.ReferenceArgument#getValue <em>Value</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getReferenceArgument() + * @model + * @generated + */ +public interface ReferenceArgument extends OperationArgument { + /** + * Returns the value of the '<em><b>Value</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' reference. + * @see #setValue(EObject) + * @see Changes.ChangesPackage#getReferenceArgument_Value() + * @model required="true" + * @generated + */ + EObject getValue(); + + /** + * Sets the value of the '{@link Changes.ReferenceArgument#getValue <em>Value</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' reference. + * @see #getValue() + * @generated + */ + void setValue(EObject value); + +} // ReferenceArgument diff --git a/solve/src/main/java/Changes/ValueArgument.java b/solve/src/main/java/Changes/ValueArgument.java new file mode 100644 index 0000000000000000000000000000000000000000..417478b53df2735c43789d6b1eba7a5ed04fc4f7 --- /dev/null +++ b/solve/src/main/java/Changes/ValueArgument.java @@ -0,0 +1,49 @@ +/** + */ +package Changes; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Value Argument</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link Changes.ValueArgument#getValue <em>Value</em>}</li> + * </ul> + * + * @see Changes.ChangesPackage#getValueArgument() + * @model + * @generated + */ +public interface ValueArgument extends OperationArgument { + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' attribute. + * @see #setValue(String) + * @see Changes.ChangesPackage#getValueArgument_Value() + * @model required="true" + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link Changes.ValueArgument#getValue <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // ValueArgument diff --git a/solve/src/main/java/Changes/impl/AssociationChangeImpl.java b/solve/src/main/java/Changes/impl/AssociationChangeImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..9329e16c1ad5ee2a47405db03dcd4f9972f920ce --- /dev/null +++ b/solve/src/main/java/Changes/impl/AssociationChangeImpl.java @@ -0,0 +1,37 @@ +/** + */ +package Changes.impl; + +import Changes.AssociationChange; +import Changes.ChangesPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Association Change</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public abstract class AssociationChangeImpl extends ElementaryChangeImpl implements AssociationChange { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AssociationChangeImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ASSOCIATION_CHANGE; + } + +} //AssociationChangeImpl diff --git a/solve/src/main/java/Changes/impl/AssociationCollectionDeletionImpl.java b/solve/src/main/java/Changes/impl/AssociationCollectionDeletionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..2ea631edc4084dcd3f4ff782aa754465b5eb7d04 --- /dev/null +++ b/solve/src/main/java/Changes/impl/AssociationCollectionDeletionImpl.java @@ -0,0 +1,162 @@ +/** + */ +package Changes.impl; + +import Changes.AssociationCollectionDeletion; +import Changes.ChangesPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Association Collection Deletion</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.AssociationCollectionDeletionImpl#getDeletedElement <em>Deleted Element</em>}</li> + * </ul> + * + * @generated + */ +public class AssociationCollectionDeletionImpl extends AssociationChangeImpl implements AssociationCollectionDeletion { + /** + * The cached value of the '{@link #getDeletedElement() <em>Deleted Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDeletedElement() + * @generated + * @ordered + */ + protected EObject deletedElement; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AssociationCollectionDeletionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ASSOCIATION_COLLECTION_DELETION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getDeletedElement() { + if (deletedElement != null && deletedElement.eIsProxy()) { + InternalEObject oldDeletedElement = (InternalEObject)deletedElement; + deletedElement = eResolveProxy(oldDeletedElement); + if (deletedElement != oldDeletedElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.ASSOCIATION_COLLECTION_DELETION__DELETED_ELEMENT, oldDeletedElement, deletedElement)); + } + } + return deletedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetDeletedElement() { + return deletedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDeletedElement(EObject newDeletedElement) { + EObject oldDeletedElement = deletedElement; + deletedElement = newDeletedElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ASSOCIATION_COLLECTION_DELETION__DELETED_ELEMENT, oldDeletedElement, deletedElement)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_COLLECTION_DELETION__DELETED_ELEMENT: + if (resolve) return getDeletedElement(); + return basicGetDeletedElement(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_COLLECTION_DELETION__DELETED_ELEMENT: + setDeletedElement((EObject)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_COLLECTION_DELETION__DELETED_ELEMENT: + setDeletedElement((EObject)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_COLLECTION_DELETION__DELETED_ELEMENT: + return deletedElement != null; + } + return super.eIsSet(featureID); + } + + @Override + public void apply() { + EList<?> collection = (EList<?>)this.getAffectedElement().eGet(this.getFeature()); + collection.remove(this.getDeletedElement()); + } + +} //AssociationCollectionDeletionImpl diff --git a/solve/src/main/java/Changes/impl/AssociationCollectionInsertionImpl.java b/solve/src/main/java/Changes/impl/AssociationCollectionInsertionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..531bdf2ad4fd0b6910920ff039baba78bf8ec2f3 --- /dev/null +++ b/solve/src/main/java/Changes/impl/AssociationCollectionInsertionImpl.java @@ -0,0 +1,162 @@ +/** + */ +package Changes.impl; + +import Changes.AssociationCollectionInsertion; +import Changes.ChangesPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Association Collection Insertion</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.AssociationCollectionInsertionImpl#getAddedElement <em>Added Element</em>}</li> + * </ul> + * + * @generated + */ +public class AssociationCollectionInsertionImpl extends AssociationChangeImpl implements AssociationCollectionInsertion { + /** + * The cached value of the '{@link #getAddedElement() <em>Added Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAddedElement() + * @generated + * @ordered + */ + protected EObject addedElement; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AssociationCollectionInsertionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ASSOCIATION_COLLECTION_INSERTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getAddedElement() { + if (addedElement != null && addedElement.eIsProxy()) { + InternalEObject oldAddedElement = (InternalEObject)addedElement; + addedElement = eResolveProxy(oldAddedElement); + if (addedElement != oldAddedElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.ASSOCIATION_COLLECTION_INSERTION__ADDED_ELEMENT, oldAddedElement, addedElement)); + } + } + return addedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetAddedElement() { + return addedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAddedElement(EObject newAddedElement) { + EObject oldAddedElement = addedElement; + addedElement = newAddedElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ASSOCIATION_COLLECTION_INSERTION__ADDED_ELEMENT, oldAddedElement, addedElement)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_COLLECTION_INSERTION__ADDED_ELEMENT: + if (resolve) return getAddedElement(); + return basicGetAddedElement(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_COLLECTION_INSERTION__ADDED_ELEMENT: + setAddedElement((EObject)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_COLLECTION_INSERTION__ADDED_ELEMENT: + setAddedElement((EObject)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_COLLECTION_INSERTION__ADDED_ELEMENT: + return addedElement != null; + } + return super.eIsSet(featureID); + } + + @Override + public void apply() { + EList<EObject> collection = (EList<EObject>)this.getAffectedElement().eGet(this.getFeature()); + collection.add(this.getAddedElement()); + } + +} //AssociationCollectionInsertionImpl diff --git a/solve/src/main/java/Changes/impl/AssociationCollectionResetImpl.java b/solve/src/main/java/Changes/impl/AssociationCollectionResetImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..5f776dcf5fcfd4ac976599a3f1d1b20843259137 --- /dev/null +++ b/solve/src/main/java/Changes/impl/AssociationCollectionResetImpl.java @@ -0,0 +1,44 @@ +/** + */ +package Changes.impl; + +import Changes.AssociationCollectionReset; +import Changes.ChangesPackage; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Association Collection Reset</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class AssociationCollectionResetImpl extends AssociationChangeImpl implements AssociationCollectionReset { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AssociationCollectionResetImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ASSOCIATION_COLLECTION_RESET; + } + + @Override + public void apply() { + EList<?> collection = (EList<?>)this.getAffectedElement().eGet(this.getFeature()); + collection.clear(); + } + +} //AssociationCollectionResetImpl diff --git a/solve/src/main/java/Changes/impl/AssociationListDeletionImpl.java b/solve/src/main/java/Changes/impl/AssociationListDeletionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..e6bb28fc0eb300a3c970ab8efe835d02de8bf6ba --- /dev/null +++ b/solve/src/main/java/Changes/impl/AssociationListDeletionImpl.java @@ -0,0 +1,231 @@ +/** + */ +package Changes.impl; + +import Changes.AssociationListDeletion; +import Changes.ChangesPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Association List Deletion</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.AssociationListDeletionImpl#getDeletedElement <em>Deleted Element</em>}</li> + * <li>{@link Changes.impl.AssociationListDeletionImpl#getIndex <em>Index</em>}</li> + * </ul> + * + * @generated + */ +public class AssociationListDeletionImpl extends AssociationChangeImpl implements AssociationListDeletion { + /** + * The cached value of the '{@link #getDeletedElement() <em>Deleted Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDeletedElement() + * @generated + * @ordered + */ + protected EObject deletedElement; + + /** + * The default value of the '{@link #getIndex() <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIndex() + * @generated + * @ordered + */ + protected static final int INDEX_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getIndex() <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIndex() + * @generated + * @ordered + */ + protected int index = INDEX_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AssociationListDeletionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ASSOCIATION_LIST_DELETION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getDeletedElement() { + if (deletedElement != null && deletedElement.eIsProxy()) { + InternalEObject oldDeletedElement = (InternalEObject)deletedElement; + deletedElement = eResolveProxy(oldDeletedElement); + if (deletedElement != oldDeletedElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.ASSOCIATION_LIST_DELETION__DELETED_ELEMENT, oldDeletedElement, deletedElement)); + } + } + return deletedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetDeletedElement() { + return deletedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDeletedElement(EObject newDeletedElement) { + EObject oldDeletedElement = deletedElement; + deletedElement = newDeletedElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ASSOCIATION_LIST_DELETION__DELETED_ELEMENT, oldDeletedElement, deletedElement)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getIndex() { + return index; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setIndex(int newIndex) { + int oldIndex = index; + index = newIndex; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ASSOCIATION_LIST_DELETION__INDEX, oldIndex, index)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_LIST_DELETION__DELETED_ELEMENT: + if (resolve) return getDeletedElement(); + return basicGetDeletedElement(); + case ChangesPackage.ASSOCIATION_LIST_DELETION__INDEX: + return getIndex(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_LIST_DELETION__DELETED_ELEMENT: + setDeletedElement((EObject)newValue); + return; + case ChangesPackage.ASSOCIATION_LIST_DELETION__INDEX: + setIndex((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_LIST_DELETION__DELETED_ELEMENT: + setDeletedElement((EObject)null); + return; + case ChangesPackage.ASSOCIATION_LIST_DELETION__INDEX: + setIndex(INDEX_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_LIST_DELETION__DELETED_ELEMENT: + return deletedElement != null; + case ChangesPackage.ASSOCIATION_LIST_DELETION__INDEX: + return index != INDEX_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (index: "); + result.append(index); + result.append(')'); + return result.toString(); + } + + @Override + public void apply() { + + EList<?> collection = (EList<?>)this.getAffectedElement().eGet(this.getFeature()); + collection.remove(this.getIndex()); + } + +} //AssociationListDeletionImpl diff --git a/solve/src/main/java/Changes/impl/AssociationListInsertionImpl.java b/solve/src/main/java/Changes/impl/AssociationListInsertionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..f222be0d4a934c99f9532092657615e8abb4efad --- /dev/null +++ b/solve/src/main/java/Changes/impl/AssociationListInsertionImpl.java @@ -0,0 +1,230 @@ +/** + */ +package Changes.impl; + +import Changes.AssociationListInsertion; +import Changes.ChangesPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Association List Insertion</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.AssociationListInsertionImpl#getAddedElement <em>Added Element</em>}</li> + * <li>{@link Changes.impl.AssociationListInsertionImpl#getIndex <em>Index</em>}</li> + * </ul> + * + * @generated + */ +public class AssociationListInsertionImpl extends AssociationChangeImpl implements AssociationListInsertion { + /** + * The cached value of the '{@link #getAddedElement() <em>Added Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAddedElement() + * @generated + * @ordered + */ + protected EObject addedElement; + + /** + * The default value of the '{@link #getIndex() <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIndex() + * @generated + * @ordered + */ + protected static final int INDEX_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getIndex() <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIndex() + * @generated + * @ordered + */ + protected int index = INDEX_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AssociationListInsertionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ASSOCIATION_LIST_INSERTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getAddedElement() { + if (addedElement != null && addedElement.eIsProxy()) { + InternalEObject oldAddedElement = (InternalEObject)addedElement; + addedElement = eResolveProxy(oldAddedElement); + if (addedElement != oldAddedElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.ASSOCIATION_LIST_INSERTION__ADDED_ELEMENT, oldAddedElement, addedElement)); + } + } + return addedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetAddedElement() { + return addedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAddedElement(EObject newAddedElement) { + EObject oldAddedElement = addedElement; + addedElement = newAddedElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ASSOCIATION_LIST_INSERTION__ADDED_ELEMENT, oldAddedElement, addedElement)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getIndex() { + return index; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setIndex(int newIndex) { + int oldIndex = index; + index = newIndex; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ASSOCIATION_LIST_INSERTION__INDEX, oldIndex, index)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_LIST_INSERTION__ADDED_ELEMENT: + if (resolve) return getAddedElement(); + return basicGetAddedElement(); + case ChangesPackage.ASSOCIATION_LIST_INSERTION__INDEX: + return getIndex(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_LIST_INSERTION__ADDED_ELEMENT: + setAddedElement((EObject)newValue); + return; + case ChangesPackage.ASSOCIATION_LIST_INSERTION__INDEX: + setIndex((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_LIST_INSERTION__ADDED_ELEMENT: + setAddedElement((EObject)null); + return; + case ChangesPackage.ASSOCIATION_LIST_INSERTION__INDEX: + setIndex(INDEX_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_LIST_INSERTION__ADDED_ELEMENT: + return addedElement != null; + case ChangesPackage.ASSOCIATION_LIST_INSERTION__INDEX: + return index != INDEX_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (index: "); + result.append(index); + result.append(')'); + return result.toString(); + } + + @Override + public void apply() { + EList<EObject> collection = (EList<EObject>)this.getAffectedElement().eGet(this.getFeature()); + collection.add(this.getIndex(), this.basicGetAddedElement()); + } + +} //AssociationListInsertionImpl diff --git a/solve/src/main/java/Changes/impl/AssociationPropertyChangeImpl.java b/solve/src/main/java/Changes/impl/AssociationPropertyChangeImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..9637b0c1d32a2798e726130d7717dffdca9d632e --- /dev/null +++ b/solve/src/main/java/Changes/impl/AssociationPropertyChangeImpl.java @@ -0,0 +1,221 @@ +/** + */ +package Changes.impl; + +import Changes.AssociationPropertyChange; +import Changes.ChangesPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Association Property Change</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.AssociationPropertyChangeImpl#getNewValue <em>New Value</em>}</li> + * <li>{@link Changes.impl.AssociationPropertyChangeImpl#getOldValue <em>Old Value</em>}</li> + * </ul> + * + * @generated + */ +public class AssociationPropertyChangeImpl extends AssociationChangeImpl implements AssociationPropertyChange { + /** + * The cached value of the '{@link #getNewValue() <em>New Value</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNewValue() + * @generated + * @ordered + */ + protected EObject newValue; + + /** + * The cached value of the '{@link #getOldValue() <em>Old Value</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOldValue() + * @generated + * @ordered + */ + protected EObject oldValue; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AssociationPropertyChangeImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ASSOCIATION_PROPERTY_CHANGE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getNewValue() { + if (newValue != null && newValue.eIsProxy()) { + InternalEObject oldNewValue = (InternalEObject)newValue; + newValue = eResolveProxy(oldNewValue); + if (newValue != oldNewValue) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.ASSOCIATION_PROPERTY_CHANGE__NEW_VALUE, oldNewValue, newValue)); + } + } + return newValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetNewValue() { + return newValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setNewValue(EObject newNewValue) { + EObject oldNewValue = newValue; + newValue = newNewValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ASSOCIATION_PROPERTY_CHANGE__NEW_VALUE, oldNewValue, newValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getOldValue() { + if (oldValue != null && oldValue.eIsProxy()) { + InternalEObject oldOldValue = (InternalEObject)oldValue; + oldValue = eResolveProxy(oldOldValue); + if (oldValue != oldOldValue) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.ASSOCIATION_PROPERTY_CHANGE__OLD_VALUE, oldOldValue, oldValue)); + } + } + return oldValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetOldValue() { + return oldValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setOldValue(EObject newOldValue) { + EObject oldOldValue = oldValue; + oldValue = newOldValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ASSOCIATION_PROPERTY_CHANGE__OLD_VALUE, oldOldValue, oldValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_PROPERTY_CHANGE__NEW_VALUE: + if (resolve) return getNewValue(); + return basicGetNewValue(); + case ChangesPackage.ASSOCIATION_PROPERTY_CHANGE__OLD_VALUE: + if (resolve) return getOldValue(); + return basicGetOldValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_PROPERTY_CHANGE__NEW_VALUE: + setNewValue((EObject)newValue); + return; + case ChangesPackage.ASSOCIATION_PROPERTY_CHANGE__OLD_VALUE: + setOldValue((EObject)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_PROPERTY_CHANGE__NEW_VALUE: + setNewValue((EObject)null); + return; + case ChangesPackage.ASSOCIATION_PROPERTY_CHANGE__OLD_VALUE: + setOldValue((EObject)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.ASSOCIATION_PROPERTY_CHANGE__NEW_VALUE: + return newValue != null; + case ChangesPackage.ASSOCIATION_PROPERTY_CHANGE__OLD_VALUE: + return oldValue != null; + } + return super.eIsSet(featureID); + } + + @Override + public void apply() { + this.getAffectedElement().eSet(this.getFeature(), this.getNewValue()); + } + +} //AssociationPropertyChangeImpl diff --git a/solve/src/main/java/Changes/impl/AttributeChangeImpl.java b/solve/src/main/java/Changes/impl/AttributeChangeImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..e5aed6c23a5b5f2866a4576896695e959ff0aa5a --- /dev/null +++ b/solve/src/main/java/Changes/impl/AttributeChangeImpl.java @@ -0,0 +1,37 @@ +/** + */ +package Changes.impl; + +import Changes.AttributeChange; +import Changes.ChangesPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Attribute Change</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public abstract class AttributeChangeImpl extends ElementaryChangeImpl implements AttributeChange { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AttributeChangeImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ATTRIBUTE_CHANGE; + } + +} //AttributeChangeImpl diff --git a/solve/src/main/java/Changes/impl/AttributeCollectionDeletionImpl.java b/solve/src/main/java/Changes/impl/AttributeCollectionDeletionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..6d2ab8a455b07cfd013f126e752179d2363696d8 --- /dev/null +++ b/solve/src/main/java/Changes/impl/AttributeCollectionDeletionImpl.java @@ -0,0 +1,168 @@ +/** + */ +package Changes.impl; + +import Changes.AttributeCollectionDeletion; +import Changes.ChangesPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Attribute Collection Deletion</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.AttributeCollectionDeletionImpl#getDeletedValue <em>Deleted Value</em>}</li> + * </ul> + * + * @generated + */ +public class AttributeCollectionDeletionImpl extends AttributeChangeImpl implements AttributeCollectionDeletion { + /** + * The default value of the '{@link #getDeletedValue() <em>Deleted Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDeletedValue() + * @generated + * @ordered + */ + protected static final String DELETED_VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDeletedValue() <em>Deleted Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDeletedValue() + * @generated + * @ordered + */ + protected String deletedValue = DELETED_VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AttributeCollectionDeletionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ATTRIBUTE_COLLECTION_DELETION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDeletedValue() { + return deletedValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDeletedValue(String newDeletedValue) { + String oldDeletedValue = deletedValue; + deletedValue = newDeletedValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ATTRIBUTE_COLLECTION_DELETION__DELETED_VALUE, oldDeletedValue, deletedValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_COLLECTION_DELETION__DELETED_VALUE: + return getDeletedValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_COLLECTION_DELETION__DELETED_VALUE: + setDeletedValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_COLLECTION_DELETION__DELETED_VALUE: + setDeletedValue(DELETED_VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_COLLECTION_DELETION__DELETED_VALUE: + return DELETED_VALUE_EDEFAULT == null ? deletedValue != null : !DELETED_VALUE_EDEFAULT.equals(deletedValue); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (deletedValue: "); + result.append(deletedValue); + result.append(')'); + return result.toString(); + } + + @Override + public void apply() { + EList<?> collection = (EList<?>)this.getAffectedElement().eGet(this.getFeature()); + collection.remove(this.getDeletedValue()); + } + +} //AttributeCollectionDeletionImpl diff --git a/solve/src/main/java/Changes/impl/AttributeCollectionInsertionImpl.java b/solve/src/main/java/Changes/impl/AttributeCollectionInsertionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..a2f6e153439b98260301b043900a5a81ea9b8e72 --- /dev/null +++ b/solve/src/main/java/Changes/impl/AttributeCollectionInsertionImpl.java @@ -0,0 +1,169 @@ +/** + */ +package Changes.impl; + +import Changes.AttributeCollectionInsertion; +import Changes.ChangesPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Attribute Collection Insertion</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.AttributeCollectionInsertionImpl#getAddedValue <em>Added Value</em>}</li> + * </ul> + * + * @generated + */ +public class AttributeCollectionInsertionImpl extends AttributeChangeImpl implements AttributeCollectionInsertion { + /** + * The default value of the '{@link #getAddedValue() <em>Added Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAddedValue() + * @generated + * @ordered + */ + protected static final String ADDED_VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAddedValue() <em>Added Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAddedValue() + * @generated + * @ordered + */ + protected String addedValue = ADDED_VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AttributeCollectionInsertionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ATTRIBUTE_COLLECTION_INSERTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getAddedValue() { + return addedValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAddedValue(String newAddedValue) { + String oldAddedValue = addedValue; + addedValue = newAddedValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ATTRIBUTE_COLLECTION_INSERTION__ADDED_VALUE, oldAddedValue, addedValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_COLLECTION_INSERTION__ADDED_VALUE: + return getAddedValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_COLLECTION_INSERTION__ADDED_VALUE: + setAddedValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_COLLECTION_INSERTION__ADDED_VALUE: + setAddedValue(ADDED_VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_COLLECTION_INSERTION__ADDED_VALUE: + return ADDED_VALUE_EDEFAULT == null ? addedValue != null : !ADDED_VALUE_EDEFAULT.equals(addedValue); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (addedValue: "); + result.append(addedValue); + result.append(')'); + return result.toString(); + } + + @Override + public void apply() { + + EList<String> collection = (EList<String>)this.getAffectedElement().eGet(this.getFeature()); + collection.add(this.getAddedValue()); + } + +} //AttributeCollectionInsertionImpl diff --git a/solve/src/main/java/Changes/impl/AttributeCollectionResetImpl.java b/solve/src/main/java/Changes/impl/AttributeCollectionResetImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..6ad19a512af6dfddecd578c0910d3a115c885a9e --- /dev/null +++ b/solve/src/main/java/Changes/impl/AttributeCollectionResetImpl.java @@ -0,0 +1,45 @@ +/** + */ +package Changes.impl; + +import Changes.AttributeCollectionReset; +import Changes.ChangesPackage; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Attribute Collection Reset</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class AttributeCollectionResetImpl extends AttributeChangeImpl implements AttributeCollectionReset { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AttributeCollectionResetImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ATTRIBUTE_COLLECTION_RESET; + } + + @Override + public void apply() { + + EList<?> collection = (EList<?>)this.getAffectedElement().eGet(this.getFeature()); + collection.clear(); + } + +} //AttributeCollectionResetImpl diff --git a/solve/src/main/java/Changes/impl/AttributeListDeletionImpl.java b/solve/src/main/java/Changes/impl/AttributeListDeletionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..26da8734b41c99741890858b644c50a30036e663 --- /dev/null +++ b/solve/src/main/java/Changes/impl/AttributeListDeletionImpl.java @@ -0,0 +1,223 @@ +/** + */ +package Changes.impl; + +import Changes.AttributeListDeletion; +import Changes.ChangesPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Attribute List Deletion</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.AttributeListDeletionImpl#getDeletedValue <em>Deleted Value</em>}</li> + * <li>{@link Changes.impl.AttributeListDeletionImpl#getIndex <em>Index</em>}</li> + * </ul> + * + * @generated + */ +public class AttributeListDeletionImpl extends AttributeChangeImpl implements AttributeListDeletion { + /** + * The default value of the '{@link #getDeletedValue() <em>Deleted Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDeletedValue() + * @generated + * @ordered + */ + protected static final String DELETED_VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDeletedValue() <em>Deleted Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDeletedValue() + * @generated + * @ordered + */ + protected String deletedValue = DELETED_VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getIndex() <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIndex() + * @generated + * @ordered + */ + protected static final int INDEX_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getIndex() <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIndex() + * @generated + * @ordered + */ + protected int index = INDEX_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AttributeListDeletionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ATTRIBUTE_LIST_DELETION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDeletedValue() { + return deletedValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDeletedValue(String newDeletedValue) { + String oldDeletedValue = deletedValue; + deletedValue = newDeletedValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ATTRIBUTE_LIST_DELETION__DELETED_VALUE, oldDeletedValue, deletedValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getIndex() { + return index; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setIndex(int newIndex) { + int oldIndex = index; + index = newIndex; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ATTRIBUTE_LIST_DELETION__INDEX, oldIndex, index)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_LIST_DELETION__DELETED_VALUE: + return getDeletedValue(); + case ChangesPackage.ATTRIBUTE_LIST_DELETION__INDEX: + return getIndex(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_LIST_DELETION__DELETED_VALUE: + setDeletedValue((String)newValue); + return; + case ChangesPackage.ATTRIBUTE_LIST_DELETION__INDEX: + setIndex((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_LIST_DELETION__DELETED_VALUE: + setDeletedValue(DELETED_VALUE_EDEFAULT); + return; + case ChangesPackage.ATTRIBUTE_LIST_DELETION__INDEX: + setIndex(INDEX_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_LIST_DELETION__DELETED_VALUE: + return DELETED_VALUE_EDEFAULT == null ? deletedValue != null : !DELETED_VALUE_EDEFAULT.equals(deletedValue); + case ChangesPackage.ATTRIBUTE_LIST_DELETION__INDEX: + return index != INDEX_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (deletedValue: "); + result.append(deletedValue); + result.append(", index: "); + result.append(index); + result.append(')'); + return result.toString(); + } + + @Override + public void apply() { + + EList<?> collection = (EList<?>)this.getAffectedElement().eGet(this.getFeature()); + collection.remove(this.getIndex()); + } + +} //AttributeListDeletionImpl diff --git a/solve/src/main/java/Changes/impl/AttributeListInsertionImpl.java b/solve/src/main/java/Changes/impl/AttributeListInsertionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..0c378488f7ecbd23b4e446f4bfb0ae156723612e --- /dev/null +++ b/solve/src/main/java/Changes/impl/AttributeListInsertionImpl.java @@ -0,0 +1,223 @@ +/** + */ +package Changes.impl; + +import Changes.AttributeListInsertion; +import Changes.ChangesPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Attribute List Insertion</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.AttributeListInsertionImpl#getAddedValue <em>Added Value</em>}</li> + * <li>{@link Changes.impl.AttributeListInsertionImpl#getIndex <em>Index</em>}</li> + * </ul> + * + * @generated + */ +public class AttributeListInsertionImpl extends AttributeChangeImpl implements AttributeListInsertion { + /** + * The default value of the '{@link #getAddedValue() <em>Added Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAddedValue() + * @generated + * @ordered + */ + protected static final String ADDED_VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAddedValue() <em>Added Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAddedValue() + * @generated + * @ordered + */ + protected String addedValue = ADDED_VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getIndex() <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIndex() + * @generated + * @ordered + */ + protected static final int INDEX_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getIndex() <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIndex() + * @generated + * @ordered + */ + protected int index = INDEX_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AttributeListInsertionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ATTRIBUTE_LIST_INSERTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getAddedValue() { + return addedValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAddedValue(String newAddedValue) { + String oldAddedValue = addedValue; + addedValue = newAddedValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ATTRIBUTE_LIST_INSERTION__ADDED_VALUE, oldAddedValue, addedValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getIndex() { + return index; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setIndex(int newIndex) { + int oldIndex = index; + index = newIndex; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ATTRIBUTE_LIST_INSERTION__INDEX, oldIndex, index)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_LIST_INSERTION__ADDED_VALUE: + return getAddedValue(); + case ChangesPackage.ATTRIBUTE_LIST_INSERTION__INDEX: + return getIndex(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_LIST_INSERTION__ADDED_VALUE: + setAddedValue((String)newValue); + return; + case ChangesPackage.ATTRIBUTE_LIST_INSERTION__INDEX: + setIndex((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_LIST_INSERTION__ADDED_VALUE: + setAddedValue(ADDED_VALUE_EDEFAULT); + return; + case ChangesPackage.ATTRIBUTE_LIST_INSERTION__INDEX: + setIndex(INDEX_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_LIST_INSERTION__ADDED_VALUE: + return ADDED_VALUE_EDEFAULT == null ? addedValue != null : !ADDED_VALUE_EDEFAULT.equals(addedValue); + case ChangesPackage.ATTRIBUTE_LIST_INSERTION__INDEX: + return index != INDEX_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (addedValue: "); + result.append(addedValue); + result.append(", index: "); + result.append(index); + result.append(')'); + return result.toString(); + } + + @Override + public void apply() { + + EList<String> collection = (EList<String>)this.getAffectedElement().eGet(this.getFeature()); + collection.add(this.getIndex(), this.getAddedValue()); + } + +} //AttributeListInsertionImpl diff --git a/solve/src/main/java/Changes/impl/AttributePropertyChangeImpl.java b/solve/src/main/java/Changes/impl/AttributePropertyChangeImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..551e3fc09456ce2b0770b6c805daf84cc1b85bb9 --- /dev/null +++ b/solve/src/main/java/Changes/impl/AttributePropertyChangeImpl.java @@ -0,0 +1,221 @@ +/** + */ +package Changes.impl; + +import Changes.AttributePropertyChange; +import Changes.ChangesPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Attribute Property Change</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.AttributePropertyChangeImpl#getNewValue <em>New Value</em>}</li> + * <li>{@link Changes.impl.AttributePropertyChangeImpl#getOldValue <em>Old Value</em>}</li> + * </ul> + * + * @generated + */ +public class AttributePropertyChangeImpl extends AttributeChangeImpl implements AttributePropertyChange { + /** + * The default value of the '{@link #getNewValue() <em>New Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNewValue() + * @generated + * @ordered + */ + protected static final String NEW_VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNewValue() <em>New Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNewValue() + * @generated + * @ordered + */ + protected String newValue = NEW_VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getOldValue() <em>Old Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOldValue() + * @generated + * @ordered + */ + protected static final String OLD_VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getOldValue() <em>Old Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOldValue() + * @generated + * @ordered + */ + protected String oldValue = OLD_VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AttributePropertyChangeImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ATTRIBUTE_PROPERTY_CHANGE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getNewValue() { + return newValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setNewValue(String newNewValue) { + String oldNewValue = newValue; + newValue = newNewValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ATTRIBUTE_PROPERTY_CHANGE__NEW_VALUE, oldNewValue, newValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getOldValue() { + return oldValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setOldValue(String newOldValue) { + String oldOldValue = oldValue; + oldValue = newOldValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ATTRIBUTE_PROPERTY_CHANGE__OLD_VALUE, oldOldValue, oldValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_PROPERTY_CHANGE__NEW_VALUE: + return getNewValue(); + case ChangesPackage.ATTRIBUTE_PROPERTY_CHANGE__OLD_VALUE: + return getOldValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_PROPERTY_CHANGE__NEW_VALUE: + setNewValue((String)newValue); + return; + case ChangesPackage.ATTRIBUTE_PROPERTY_CHANGE__OLD_VALUE: + setOldValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_PROPERTY_CHANGE__NEW_VALUE: + setNewValue(NEW_VALUE_EDEFAULT); + return; + case ChangesPackage.ATTRIBUTE_PROPERTY_CHANGE__OLD_VALUE: + setOldValue(OLD_VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.ATTRIBUTE_PROPERTY_CHANGE__NEW_VALUE: + return NEW_VALUE_EDEFAULT == null ? newValue != null : !NEW_VALUE_EDEFAULT.equals(newValue); + case ChangesPackage.ATTRIBUTE_PROPERTY_CHANGE__OLD_VALUE: + return OLD_VALUE_EDEFAULT == null ? oldValue != null : !OLD_VALUE_EDEFAULT.equals(oldValue); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (newValue: "); + result.append(newValue); + result.append(", oldValue: "); + result.append(oldValue); + result.append(')'); + return result.toString(); + } + + @Override + public void apply() { + this.getAffectedElement().eSet(this.getFeature(), this.getNewValue()); + } + +} //AttributePropertyChangeImpl diff --git a/solve/src/main/java/Changes/impl/ChangeTransactionImpl.java b/solve/src/main/java/Changes/impl/ChangeTransactionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..f27590f4ed82eadf2dff05c93fc9b79a6ecc7277 --- /dev/null +++ b/solve/src/main/java/Changes/impl/ChangeTransactionImpl.java @@ -0,0 +1,224 @@ +/** + */ +package Changes.impl; + +import Changes.ChangeTransaction; +import Changes.ChangesPackage; +import Changes.ModelChange; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Change Transaction</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.ChangeTransactionImpl#getSourceChange <em>Source Change</em>}</li> + * <li>{@link Changes.impl.ChangeTransactionImpl#getNestedChanges <em>Nested Changes</em>}</li> + * </ul> + * + * @generated + */ +public class ChangeTransactionImpl extends ModelChangeImpl implements ChangeTransaction { + /** + * The cached value of the '{@link #getSourceChange() <em>Source Change</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSourceChange() + * @generated + * @ordered + */ + protected ModelChange sourceChange; + + /** + * The cached value of the '{@link #getNestedChanges() <em>Nested Changes</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNestedChanges() + * @generated + * @ordered + */ + protected EList<ModelChange> nestedChanges; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ChangeTransactionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.CHANGE_TRANSACTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ModelChange getSourceChange() { + return sourceChange; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetSourceChange(ModelChange newSourceChange, NotificationChain msgs) { + ModelChange oldSourceChange = sourceChange; + sourceChange = newSourceChange; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ChangesPackage.CHANGE_TRANSACTION__SOURCE_CHANGE, oldSourceChange, newSourceChange); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSourceChange(ModelChange newSourceChange) { + if (newSourceChange != sourceChange) { + NotificationChain msgs = null; + if (sourceChange != null) + msgs = ((InternalEObject)sourceChange).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ChangesPackage.CHANGE_TRANSACTION__SOURCE_CHANGE, null, msgs); + if (newSourceChange != null) + msgs = ((InternalEObject)newSourceChange).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ChangesPackage.CHANGE_TRANSACTION__SOURCE_CHANGE, null, msgs); + msgs = basicSetSourceChange(newSourceChange, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.CHANGE_TRANSACTION__SOURCE_CHANGE, newSourceChange, newSourceChange)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<ModelChange> getNestedChanges() { + if (nestedChanges == null) { + nestedChanges = new EObjectContainmentEList<ModelChange>(ModelChange.class, this, ChangesPackage.CHANGE_TRANSACTION__NESTED_CHANGES); + } + return nestedChanges; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ChangesPackage.CHANGE_TRANSACTION__SOURCE_CHANGE: + return basicSetSourceChange(null, msgs); + case ChangesPackage.CHANGE_TRANSACTION__NESTED_CHANGES: + return ((InternalEList<?>)getNestedChanges()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.CHANGE_TRANSACTION__SOURCE_CHANGE: + return getSourceChange(); + case ChangesPackage.CHANGE_TRANSACTION__NESTED_CHANGES: + return getNestedChanges(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.CHANGE_TRANSACTION__SOURCE_CHANGE: + setSourceChange((ModelChange)newValue); + return; + case ChangesPackage.CHANGE_TRANSACTION__NESTED_CHANGES: + getNestedChanges().clear(); + getNestedChanges().addAll((Collection<? extends ModelChange>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.CHANGE_TRANSACTION__SOURCE_CHANGE: + setSourceChange((ModelChange)null); + return; + case ChangesPackage.CHANGE_TRANSACTION__NESTED_CHANGES: + getNestedChanges().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.CHANGE_TRANSACTION__SOURCE_CHANGE: + return sourceChange != null; + case ChangesPackage.CHANGE_TRANSACTION__NESTED_CHANGES: + return nestedChanges != null && !nestedChanges.isEmpty(); + } + return super.eIsSet(featureID); + } + + @Override + public void apply() { + this.getSourceChange().apply(); + } + +} //ChangeTransactionImpl diff --git a/solve/src/main/java/Changes/impl/ChangesFactoryImpl.java b/solve/src/main/java/Changes/impl/ChangesFactoryImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..479971535c76799294d1300de365b63cda16e736 --- /dev/null +++ b/solve/src/main/java/Changes/impl/ChangesFactoryImpl.java @@ -0,0 +1,370 @@ +/** + */ +package Changes.impl; + +import Changes.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ChangesFactoryImpl extends EFactoryImpl implements ChangesFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static ChangesFactory init() { + try { + ChangesFactory theChangesFactory = (ChangesFactory)EPackage.Registry.INSTANCE.getEFactory(ChangesPackage.eNS_URI); + if (theChangesFactory != null) { + return theChangesFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ChangesFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ChangesFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ChangesPackage.MODEL_CHANGE_SET: return createModelChangeSet(); + case ChangesPackage.CHANGE_TRANSACTION: return createChangeTransaction(); + case ChangesPackage.ASSOCIATION_COLLECTION_DELETION: return createAssociationCollectionDeletion(); + case ChangesPackage.COMPOSITION_COLLECTION_DELETION: return createCompositionCollectionDeletion(); + case ChangesPackage.ATTRIBUTE_COLLECTION_DELETION: return createAttributeCollectionDeletion(); + case ChangesPackage.ASSOCIATION_COLLECTION_INSERTION: return createAssociationCollectionInsertion(); + case ChangesPackage.COMPOSITION_COLLECTION_INSERTION: return createCompositionCollectionInsertion(); + case ChangesPackage.ATTRIBUTE_COLLECTION_INSERTION: return createAttributeCollectionInsertion(); + case ChangesPackage.ASSOCIATION_COLLECTION_RESET: return createAssociationCollectionReset(); + case ChangesPackage.COMPOSITION_COLLECTION_RESET: return createCompositionCollectionReset(); + case ChangesPackage.ATTRIBUTE_COLLECTION_RESET: return createAttributeCollectionReset(); + case ChangesPackage.ASSOCIATION_LIST_DELETION: return createAssociationListDeletion(); + case ChangesPackage.COMPOSITION_LIST_DELETION: return createCompositionListDeletion(); + case ChangesPackage.ATTRIBUTE_LIST_DELETION: return createAttributeListDeletion(); + case ChangesPackage.ASSOCIATION_LIST_INSERTION: return createAssociationListInsertion(); + case ChangesPackage.COMPOSITION_LIST_INSERTION: return createCompositionListInsertion(); + case ChangesPackage.ATTRIBUTE_LIST_INSERTION: return createAttributeListInsertion(); + case ChangesPackage.ATTRIBUTE_PROPERTY_CHANGE: return createAttributePropertyChange(); + case ChangesPackage.ASSOCIATION_PROPERTY_CHANGE: return createAssociationPropertyChange(); + case ChangesPackage.COMPOSITION_PROPERTY_CHANGE: return createCompositionPropertyChange(); + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY: return createCompositionMoveIntoProperty(); + case ChangesPackage.COMPOSITION_MOVE_TO_LIST: return createCompositionMoveToList(); + case ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION: return createCompositionMoveToCollection(); + case ChangesPackage.OPERATION_CALL: return createOperationCall(); + case ChangesPackage.VALUE_ARGUMENT: return createValueArgument(); + case ChangesPackage.REFERENCE_ARGUMENT: return createReferenceArgument(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ModelChangeSet createModelChangeSet() { + ModelChangeSetImpl modelChangeSet = new ModelChangeSetImpl(); + return modelChangeSet; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ChangeTransaction createChangeTransaction() { + ChangeTransactionImpl changeTransaction = new ChangeTransactionImpl(); + return changeTransaction; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AssociationCollectionDeletion createAssociationCollectionDeletion() { + AssociationCollectionDeletionImpl associationCollectionDeletion = new AssociationCollectionDeletionImpl(); + return associationCollectionDeletion; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CompositionCollectionDeletion createCompositionCollectionDeletion() { + CompositionCollectionDeletionImpl compositionCollectionDeletion = new CompositionCollectionDeletionImpl(); + return compositionCollectionDeletion; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AttributeCollectionDeletion createAttributeCollectionDeletion() { + AttributeCollectionDeletionImpl attributeCollectionDeletion = new AttributeCollectionDeletionImpl(); + return attributeCollectionDeletion; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AssociationCollectionInsertion createAssociationCollectionInsertion() { + AssociationCollectionInsertionImpl associationCollectionInsertion = new AssociationCollectionInsertionImpl(); + return associationCollectionInsertion; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CompositionCollectionInsertion createCompositionCollectionInsertion() { + CompositionCollectionInsertionImpl compositionCollectionInsertion = new CompositionCollectionInsertionImpl(); + return compositionCollectionInsertion; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AttributeCollectionInsertion createAttributeCollectionInsertion() { + AttributeCollectionInsertionImpl attributeCollectionInsertion = new AttributeCollectionInsertionImpl(); + return attributeCollectionInsertion; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AssociationCollectionReset createAssociationCollectionReset() { + AssociationCollectionResetImpl associationCollectionReset = new AssociationCollectionResetImpl(); + return associationCollectionReset; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CompositionCollectionReset createCompositionCollectionReset() { + CompositionCollectionResetImpl compositionCollectionReset = new CompositionCollectionResetImpl(); + return compositionCollectionReset; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AttributeCollectionReset createAttributeCollectionReset() { + AttributeCollectionResetImpl attributeCollectionReset = new AttributeCollectionResetImpl(); + return attributeCollectionReset; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AssociationListDeletion createAssociationListDeletion() { + AssociationListDeletionImpl associationListDeletion = new AssociationListDeletionImpl(); + return associationListDeletion; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CompositionListDeletion createCompositionListDeletion() { + CompositionListDeletionImpl compositionListDeletion = new CompositionListDeletionImpl(); + return compositionListDeletion; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AttributeListDeletion createAttributeListDeletion() { + AttributeListDeletionImpl attributeListDeletion = new AttributeListDeletionImpl(); + return attributeListDeletion; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AssociationListInsertion createAssociationListInsertion() { + AssociationListInsertionImpl associationListInsertion = new AssociationListInsertionImpl(); + return associationListInsertion; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CompositionListInsertion createCompositionListInsertion() { + CompositionListInsertionImpl compositionListInsertion = new CompositionListInsertionImpl(); + return compositionListInsertion; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AttributeListInsertion createAttributeListInsertion() { + AttributeListInsertionImpl attributeListInsertion = new AttributeListInsertionImpl(); + return attributeListInsertion; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AttributePropertyChange createAttributePropertyChange() { + AttributePropertyChangeImpl attributePropertyChange = new AttributePropertyChangeImpl(); + return attributePropertyChange; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AssociationPropertyChange createAssociationPropertyChange() { + AssociationPropertyChangeImpl associationPropertyChange = new AssociationPropertyChangeImpl(); + return associationPropertyChange; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CompositionPropertyChange createCompositionPropertyChange() { + CompositionPropertyChangeImpl compositionPropertyChange = new CompositionPropertyChangeImpl(); + return compositionPropertyChange; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CompositionMoveIntoProperty createCompositionMoveIntoProperty() { + CompositionMoveIntoPropertyImpl compositionMoveIntoProperty = new CompositionMoveIntoPropertyImpl(); + return compositionMoveIntoProperty; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CompositionMoveToList createCompositionMoveToList() { + CompositionMoveToListImpl compositionMoveToList = new CompositionMoveToListImpl(); + return compositionMoveToList; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CompositionMoveToCollection createCompositionMoveToCollection() { + CompositionMoveToCollectionImpl compositionMoveToCollection = new CompositionMoveToCollectionImpl(); + return compositionMoveToCollection; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public OperationCall createOperationCall() { + OperationCallImpl operationCall = new OperationCallImpl(); + return operationCall; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ValueArgument createValueArgument() { + ValueArgumentImpl valueArgument = new ValueArgumentImpl(); + return valueArgument; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ReferenceArgument createReferenceArgument() { + ReferenceArgumentImpl referenceArgument = new ReferenceArgumentImpl(); + return referenceArgument; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ChangesPackage getChangesPackage() { + return (ChangesPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static ChangesPackage getPackage() { + return ChangesPackage.eINSTANCE; + } + +} //ChangesFactoryImpl diff --git a/solve/src/main/java/Changes/impl/ChangesPackageImpl.java b/solve/src/main/java/Changes/impl/ChangesPackageImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..ed352703c09a4214b71ba0f38f64b2526ff14ffa --- /dev/null +++ b/solve/src/main/java/Changes/impl/ChangesPackageImpl.java @@ -0,0 +1,1319 @@ +/** + */ +package Changes.impl; + +import Changes.AssociationChange; +import Changes.AssociationCollectionDeletion; +import Changes.AssociationCollectionInsertion; +import Changes.AssociationCollectionReset; +import Changes.AssociationListDeletion; +import Changes.AssociationListInsertion; +import Changes.AssociationPropertyChange; +import Changes.AttributeChange; +import Changes.AttributeCollectionDeletion; +import Changes.AttributeCollectionInsertion; +import Changes.AttributeCollectionReset; +import Changes.AttributeListDeletion; +import Changes.AttributeListInsertion; +import Changes.AttributePropertyChange; +import Changes.ChangeTransaction; +import Changes.ChangesFactory; +import Changes.ChangesPackage; +import Changes.CompositionChange; +import Changes.CompositionCollectionDeletion; +import Changes.CompositionCollectionInsertion; +import Changes.CompositionCollectionReset; +import Changes.CompositionListDeletion; +import Changes.CompositionListInsertion; +import Changes.CompositionMoveIntoProperty; +import Changes.CompositionMoveToCollection; +import Changes.CompositionMoveToList; +import Changes.CompositionPropertyChange; +import Changes.ElementaryChange; +import Changes.ModelChange; +import Changes.ModelChangeSet; +import Changes.OperationArgument; +import Changes.OperationCall; +import Changes.ReferenceArgument; +import Changes.ValueArgument; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ChangesPackageImpl extends EPackageImpl implements ChangesPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass modelChangeSetEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass modelChangeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass elementaryChangeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass changeTransactionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass compositionChangeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass associationChangeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass attributeChangeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass associationCollectionDeletionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass compositionCollectionDeletionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass attributeCollectionDeletionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass associationCollectionInsertionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass compositionCollectionInsertionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass attributeCollectionInsertionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass associationCollectionResetEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass compositionCollectionResetEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass attributeCollectionResetEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass associationListDeletionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass compositionListDeletionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass attributeListDeletionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass associationListInsertionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass compositionListInsertionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass attributeListInsertionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass attributePropertyChangeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass associationPropertyChangeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass compositionPropertyChangeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass compositionMoveIntoPropertyEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass compositionMoveToListEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass compositionMoveToCollectionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass operationCallEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass operationArgumentEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass valueArgumentEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass referenceArgumentEClass = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see Changes.ChangesPackage#eNS_URI + * @see #init() + * @generated + */ + private ChangesPackageImpl() { + super(eNS_URI, ChangesFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>This method is used to initialize {@link ChangesPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ChangesPackage init() { + if (isInited) return (ChangesPackage)EPackage.Registry.INSTANCE.getEPackage(ChangesPackage.eNS_URI); + + // Obtain or create and register package + ChangesPackageImpl theChangesPackage = (ChangesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ChangesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ChangesPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theChangesPackage.createPackageContents(); + + // Initialize created meta-data + theChangesPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theChangesPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ChangesPackage.eNS_URI, theChangesPackage); + return theChangesPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getModelChangeSet() { + return modelChangeSetEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getModelChangeSet_Changes() { + return (EReference)modelChangeSetEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getModelChange() { + return modelChangeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getElementaryChange() { + return elementaryChangeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getElementaryChange_AffectedElement() { + return (EReference)elementaryChangeEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getElementaryChange_Feature() { + return (EReference)elementaryChangeEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getChangeTransaction() { + return changeTransactionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getChangeTransaction_SourceChange() { + return (EReference)changeTransactionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getChangeTransaction_NestedChanges() { + return (EReference)changeTransactionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCompositionChange() { + return compositionChangeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAssociationChange() { + return associationChangeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAttributeChange() { + return attributeChangeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAssociationCollectionDeletion() { + return associationCollectionDeletionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAssociationCollectionDeletion_DeletedElement() { + return (EReference)associationCollectionDeletionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCompositionCollectionDeletion() { + return compositionCollectionDeletionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCompositionCollectionDeletion_DeletedElement() { + return (EReference)compositionCollectionDeletionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAttributeCollectionDeletion() { + return attributeCollectionDeletionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAttributeCollectionDeletion_DeletedValue() { + return (EAttribute)attributeCollectionDeletionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAssociationCollectionInsertion() { + return associationCollectionInsertionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAssociationCollectionInsertion_AddedElement() { + return (EReference)associationCollectionInsertionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCompositionCollectionInsertion() { + return compositionCollectionInsertionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCompositionCollectionInsertion_AddedElement() { + return (EReference)compositionCollectionInsertionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAttributeCollectionInsertion() { + return attributeCollectionInsertionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAttributeCollectionInsertion_AddedValue() { + return (EAttribute)attributeCollectionInsertionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAssociationCollectionReset() { + return associationCollectionResetEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCompositionCollectionReset() { + return compositionCollectionResetEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAttributeCollectionReset() { + return attributeCollectionResetEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAssociationListDeletion() { + return associationListDeletionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAssociationListDeletion_DeletedElement() { + return (EReference)associationListDeletionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAssociationListDeletion_Index() { + return (EAttribute)associationListDeletionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCompositionListDeletion() { + return compositionListDeletionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCompositionListDeletion_DeletedElement() { + return (EReference)compositionListDeletionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCompositionListDeletion_Index() { + return (EAttribute)compositionListDeletionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAttributeListDeletion() { + return attributeListDeletionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAttributeListDeletion_DeletedValue() { + return (EAttribute)attributeListDeletionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAttributeListDeletion_Index() { + return (EAttribute)attributeListDeletionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAssociationListInsertion() { + return associationListInsertionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAssociationListInsertion_AddedElement() { + return (EReference)associationListInsertionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAssociationListInsertion_Index() { + return (EAttribute)associationListInsertionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCompositionListInsertion() { + return compositionListInsertionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCompositionListInsertion_AddedElement() { + return (EReference)compositionListInsertionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCompositionListInsertion_Index() { + return (EAttribute)compositionListInsertionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAttributeListInsertion() { + return attributeListInsertionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAttributeListInsertion_AddedValue() { + return (EAttribute)attributeListInsertionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAttributeListInsertion_Index() { + return (EAttribute)attributeListInsertionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAttributePropertyChange() { + return attributePropertyChangeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAttributePropertyChange_NewValue() { + return (EAttribute)attributePropertyChangeEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAttributePropertyChange_OldValue() { + return (EAttribute)attributePropertyChangeEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAssociationPropertyChange() { + return associationPropertyChangeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAssociationPropertyChange_NewValue() { + return (EReference)associationPropertyChangeEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAssociationPropertyChange_OldValue() { + return (EReference)associationPropertyChangeEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCompositionPropertyChange() { + return compositionPropertyChangeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCompositionPropertyChange_NewValue() { + return (EReference)compositionPropertyChangeEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCompositionPropertyChange_OldValue() { + return (EReference)compositionPropertyChangeEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCompositionMoveIntoProperty() { + return compositionMoveIntoPropertyEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCompositionMoveIntoProperty_NewValue() { + return (EReference)compositionMoveIntoPropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCompositionMoveIntoProperty_OldValue() { + return (EReference)compositionMoveIntoPropertyEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCompositionMoveIntoProperty_Origin() { + return (EReference)compositionMoveIntoPropertyEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCompositionMoveToList() { + return compositionMoveToListEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCompositionMoveToList_Index() { + return (EAttribute)compositionMoveToListEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCompositionMoveToList_MovedElement() { + return (EReference)compositionMoveToListEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCompositionMoveToList_Origin() { + return (EReference)compositionMoveToListEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCompositionMoveToCollection() { + return compositionMoveToCollectionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCompositionMoveToCollection_MovedElement() { + return (EReference)compositionMoveToCollectionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCompositionMoveToCollection_Origin() { + return (EReference)compositionMoveToCollectionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getOperationCall() { + return operationCallEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getOperationCall_Operation() { + return (EReference)operationCallEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getOperationCall_TargetElement() { + return (EReference)operationCallEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getOperationCall_Arguments() { + return (EReference)operationCallEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getOperationArgument() { + return operationArgumentEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getOperationArgument_Name() { + return (EAttribute)operationArgumentEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getValueArgument() { + return valueArgumentEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getValueArgument_Value() { + return (EAttribute)valueArgumentEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getReferenceArgument() { + return referenceArgumentEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getReferenceArgument_Value() { + return (EReference)referenceArgumentEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ChangesFactory getChangesFactory() { + return (ChangesFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + modelChangeSetEClass = createEClass(MODEL_CHANGE_SET); + createEReference(modelChangeSetEClass, MODEL_CHANGE_SET__CHANGES); + + modelChangeEClass = createEClass(MODEL_CHANGE); + + elementaryChangeEClass = createEClass(ELEMENTARY_CHANGE); + createEReference(elementaryChangeEClass, ELEMENTARY_CHANGE__AFFECTED_ELEMENT); + createEReference(elementaryChangeEClass, ELEMENTARY_CHANGE__FEATURE); + + changeTransactionEClass = createEClass(CHANGE_TRANSACTION); + createEReference(changeTransactionEClass, CHANGE_TRANSACTION__SOURCE_CHANGE); + createEReference(changeTransactionEClass, CHANGE_TRANSACTION__NESTED_CHANGES); + + compositionChangeEClass = createEClass(COMPOSITION_CHANGE); + + associationChangeEClass = createEClass(ASSOCIATION_CHANGE); + + attributeChangeEClass = createEClass(ATTRIBUTE_CHANGE); + + associationCollectionDeletionEClass = createEClass(ASSOCIATION_COLLECTION_DELETION); + createEReference(associationCollectionDeletionEClass, ASSOCIATION_COLLECTION_DELETION__DELETED_ELEMENT); + + compositionCollectionDeletionEClass = createEClass(COMPOSITION_COLLECTION_DELETION); + createEReference(compositionCollectionDeletionEClass, COMPOSITION_COLLECTION_DELETION__DELETED_ELEMENT); + + attributeCollectionDeletionEClass = createEClass(ATTRIBUTE_COLLECTION_DELETION); + createEAttribute(attributeCollectionDeletionEClass, ATTRIBUTE_COLLECTION_DELETION__DELETED_VALUE); + + associationCollectionInsertionEClass = createEClass(ASSOCIATION_COLLECTION_INSERTION); + createEReference(associationCollectionInsertionEClass, ASSOCIATION_COLLECTION_INSERTION__ADDED_ELEMENT); + + compositionCollectionInsertionEClass = createEClass(COMPOSITION_COLLECTION_INSERTION); + createEReference(compositionCollectionInsertionEClass, COMPOSITION_COLLECTION_INSERTION__ADDED_ELEMENT); + + attributeCollectionInsertionEClass = createEClass(ATTRIBUTE_COLLECTION_INSERTION); + createEAttribute(attributeCollectionInsertionEClass, ATTRIBUTE_COLLECTION_INSERTION__ADDED_VALUE); + + associationCollectionResetEClass = createEClass(ASSOCIATION_COLLECTION_RESET); + + compositionCollectionResetEClass = createEClass(COMPOSITION_COLLECTION_RESET); + + attributeCollectionResetEClass = createEClass(ATTRIBUTE_COLLECTION_RESET); + + associationListDeletionEClass = createEClass(ASSOCIATION_LIST_DELETION); + createEReference(associationListDeletionEClass, ASSOCIATION_LIST_DELETION__DELETED_ELEMENT); + createEAttribute(associationListDeletionEClass, ASSOCIATION_LIST_DELETION__INDEX); + + compositionListDeletionEClass = createEClass(COMPOSITION_LIST_DELETION); + createEReference(compositionListDeletionEClass, COMPOSITION_LIST_DELETION__DELETED_ELEMENT); + createEAttribute(compositionListDeletionEClass, COMPOSITION_LIST_DELETION__INDEX); + + attributeListDeletionEClass = createEClass(ATTRIBUTE_LIST_DELETION); + createEAttribute(attributeListDeletionEClass, ATTRIBUTE_LIST_DELETION__DELETED_VALUE); + createEAttribute(attributeListDeletionEClass, ATTRIBUTE_LIST_DELETION__INDEX); + + associationListInsertionEClass = createEClass(ASSOCIATION_LIST_INSERTION); + createEReference(associationListInsertionEClass, ASSOCIATION_LIST_INSERTION__ADDED_ELEMENT); + createEAttribute(associationListInsertionEClass, ASSOCIATION_LIST_INSERTION__INDEX); + + compositionListInsertionEClass = createEClass(COMPOSITION_LIST_INSERTION); + createEReference(compositionListInsertionEClass, COMPOSITION_LIST_INSERTION__ADDED_ELEMENT); + createEAttribute(compositionListInsertionEClass, COMPOSITION_LIST_INSERTION__INDEX); + + attributeListInsertionEClass = createEClass(ATTRIBUTE_LIST_INSERTION); + createEAttribute(attributeListInsertionEClass, ATTRIBUTE_LIST_INSERTION__ADDED_VALUE); + createEAttribute(attributeListInsertionEClass, ATTRIBUTE_LIST_INSERTION__INDEX); + + attributePropertyChangeEClass = createEClass(ATTRIBUTE_PROPERTY_CHANGE); + createEAttribute(attributePropertyChangeEClass, ATTRIBUTE_PROPERTY_CHANGE__NEW_VALUE); + createEAttribute(attributePropertyChangeEClass, ATTRIBUTE_PROPERTY_CHANGE__OLD_VALUE); + + associationPropertyChangeEClass = createEClass(ASSOCIATION_PROPERTY_CHANGE); + createEReference(associationPropertyChangeEClass, ASSOCIATION_PROPERTY_CHANGE__NEW_VALUE); + createEReference(associationPropertyChangeEClass, ASSOCIATION_PROPERTY_CHANGE__OLD_VALUE); + + compositionPropertyChangeEClass = createEClass(COMPOSITION_PROPERTY_CHANGE); + createEReference(compositionPropertyChangeEClass, COMPOSITION_PROPERTY_CHANGE__NEW_VALUE); + createEReference(compositionPropertyChangeEClass, COMPOSITION_PROPERTY_CHANGE__OLD_VALUE); + + compositionMoveIntoPropertyEClass = createEClass(COMPOSITION_MOVE_INTO_PROPERTY); + createEReference(compositionMoveIntoPropertyEClass, COMPOSITION_MOVE_INTO_PROPERTY__NEW_VALUE); + createEReference(compositionMoveIntoPropertyEClass, COMPOSITION_MOVE_INTO_PROPERTY__OLD_VALUE); + createEReference(compositionMoveIntoPropertyEClass, COMPOSITION_MOVE_INTO_PROPERTY__ORIGIN); + + compositionMoveToListEClass = createEClass(COMPOSITION_MOVE_TO_LIST); + createEAttribute(compositionMoveToListEClass, COMPOSITION_MOVE_TO_LIST__INDEX); + createEReference(compositionMoveToListEClass, COMPOSITION_MOVE_TO_LIST__MOVED_ELEMENT); + createEReference(compositionMoveToListEClass, COMPOSITION_MOVE_TO_LIST__ORIGIN); + + compositionMoveToCollectionEClass = createEClass(COMPOSITION_MOVE_TO_COLLECTION); + createEReference(compositionMoveToCollectionEClass, COMPOSITION_MOVE_TO_COLLECTION__MOVED_ELEMENT); + createEReference(compositionMoveToCollectionEClass, COMPOSITION_MOVE_TO_COLLECTION__ORIGIN); + + operationCallEClass = createEClass(OPERATION_CALL); + createEReference(operationCallEClass, OPERATION_CALL__OPERATION); + createEReference(operationCallEClass, OPERATION_CALL__TARGET_ELEMENT); + createEReference(operationCallEClass, OPERATION_CALL__ARGUMENTS); + + operationArgumentEClass = createEClass(OPERATION_ARGUMENT); + createEAttribute(operationArgumentEClass, OPERATION_ARGUMENT__NAME); + + valueArgumentEClass = createEClass(VALUE_ARGUMENT); + createEAttribute(valueArgumentEClass, VALUE_ARGUMENT__VALUE); + + referenceArgumentEClass = createEClass(REFERENCE_ARGUMENT); + createEReference(referenceArgumentEClass, REFERENCE_ARGUMENT__VALUE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + elementaryChangeEClass.getESuperTypes().add(this.getModelChange()); + changeTransactionEClass.getESuperTypes().add(this.getModelChange()); + compositionChangeEClass.getESuperTypes().add(this.getElementaryChange()); + associationChangeEClass.getESuperTypes().add(this.getElementaryChange()); + attributeChangeEClass.getESuperTypes().add(this.getElementaryChange()); + associationCollectionDeletionEClass.getESuperTypes().add(this.getAssociationChange()); + compositionCollectionDeletionEClass.getESuperTypes().add(this.getCompositionChange()); + attributeCollectionDeletionEClass.getESuperTypes().add(this.getAttributeChange()); + associationCollectionInsertionEClass.getESuperTypes().add(this.getAssociationChange()); + compositionCollectionInsertionEClass.getESuperTypes().add(this.getCompositionChange()); + attributeCollectionInsertionEClass.getESuperTypes().add(this.getAttributeChange()); + associationCollectionResetEClass.getESuperTypes().add(this.getAssociationChange()); + compositionCollectionResetEClass.getESuperTypes().add(this.getCompositionChange()); + attributeCollectionResetEClass.getESuperTypes().add(this.getAttributeChange()); + associationListDeletionEClass.getESuperTypes().add(this.getAssociationChange()); + compositionListDeletionEClass.getESuperTypes().add(this.getCompositionChange()); + attributeListDeletionEClass.getESuperTypes().add(this.getAttributeChange()); + associationListInsertionEClass.getESuperTypes().add(this.getAssociationChange()); + compositionListInsertionEClass.getESuperTypes().add(this.getCompositionChange()); + attributeListInsertionEClass.getESuperTypes().add(this.getAttributeChange()); + attributePropertyChangeEClass.getESuperTypes().add(this.getAttributeChange()); + associationPropertyChangeEClass.getESuperTypes().add(this.getAssociationChange()); + compositionPropertyChangeEClass.getESuperTypes().add(this.getCompositionChange()); + compositionMoveIntoPropertyEClass.getESuperTypes().add(this.getCompositionChange()); + compositionMoveToListEClass.getESuperTypes().add(this.getCompositionChange()); + operationCallEClass.getESuperTypes().add(this.getModelChange()); + valueArgumentEClass.getESuperTypes().add(this.getOperationArgument()); + referenceArgumentEClass.getESuperTypes().add(this.getOperationArgument()); + + // Initialize classes, features, and operations; add parameters + initEClass(modelChangeSetEClass, ModelChangeSet.class, "ModelChangeSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getModelChangeSet_Changes(), this.getModelChange(), null, "changes", null, 0, -1, ModelChangeSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(modelChangeEClass, ModelChange.class, "ModelChange", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(elementaryChangeEClass, ElementaryChange.class, "ElementaryChange", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getElementaryChange_AffectedElement(), ecorePackage.getEObject(), null, "affectedElement", null, 1, 1, ElementaryChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getElementaryChange_Feature(), ecorePackage.getEStructuralFeature(), null, "feature", null, 1, 1, ElementaryChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(changeTransactionEClass, ChangeTransaction.class, "ChangeTransaction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getChangeTransaction_SourceChange(), this.getModelChange(), null, "sourceChange", null, 1, 1, ChangeTransaction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getChangeTransaction_NestedChanges(), this.getModelChange(), null, "nestedChanges", null, 0, -1, ChangeTransaction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(compositionChangeEClass, CompositionChange.class, "CompositionChange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(associationChangeEClass, AssociationChange.class, "AssociationChange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(attributeChangeEClass, AttributeChange.class, "AttributeChange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(associationCollectionDeletionEClass, AssociationCollectionDeletion.class, "AssociationCollectionDeletion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAssociationCollectionDeletion_DeletedElement(), ecorePackage.getEObject(), null, "deletedElement", null, 1, 1, AssociationCollectionDeletion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(compositionCollectionDeletionEClass, CompositionCollectionDeletion.class, "CompositionCollectionDeletion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompositionCollectionDeletion_DeletedElement(), ecorePackage.getEObject(), null, "deletedElement", null, 0, 1, CompositionCollectionDeletion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(attributeCollectionDeletionEClass, AttributeCollectionDeletion.class, "AttributeCollectionDeletion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAttributeCollectionDeletion_DeletedValue(), ecorePackage.getEString(), "deletedValue", null, 1, 1, AttributeCollectionDeletion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(associationCollectionInsertionEClass, AssociationCollectionInsertion.class, "AssociationCollectionInsertion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAssociationCollectionInsertion_AddedElement(), ecorePackage.getEObject(), null, "addedElement", null, 1, 1, AssociationCollectionInsertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(compositionCollectionInsertionEClass, CompositionCollectionInsertion.class, "CompositionCollectionInsertion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompositionCollectionInsertion_AddedElement(), ecorePackage.getEObject(), null, "addedElement", null, 1, 1, CompositionCollectionInsertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(attributeCollectionInsertionEClass, AttributeCollectionInsertion.class, "AttributeCollectionInsertion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAttributeCollectionInsertion_AddedValue(), ecorePackage.getEString(), "addedValue", null, 1, 1, AttributeCollectionInsertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(associationCollectionResetEClass, AssociationCollectionReset.class, "AssociationCollectionReset", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(compositionCollectionResetEClass, CompositionCollectionReset.class, "CompositionCollectionReset", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(attributeCollectionResetEClass, AttributeCollectionReset.class, "AttributeCollectionReset", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(associationListDeletionEClass, AssociationListDeletion.class, "AssociationListDeletion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAssociationListDeletion_DeletedElement(), ecorePackage.getEObject(), null, "deletedElement", null, 0, 1, AssociationListDeletion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAssociationListDeletion_Index(), ecorePackage.getEInt(), "index", null, 1, 1, AssociationListDeletion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(compositionListDeletionEClass, CompositionListDeletion.class, "CompositionListDeletion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompositionListDeletion_DeletedElement(), ecorePackage.getEObject(), null, "deletedElement", null, 0, 1, CompositionListDeletion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCompositionListDeletion_Index(), ecorePackage.getEInt(), "index", null, 1, 1, CompositionListDeletion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(attributeListDeletionEClass, AttributeListDeletion.class, "AttributeListDeletion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAttributeListDeletion_DeletedValue(), ecorePackage.getEString(), "deletedValue", null, 0, 1, AttributeListDeletion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAttributeListDeletion_Index(), ecorePackage.getEInt(), "index", null, 1, 1, AttributeListDeletion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(associationListInsertionEClass, AssociationListInsertion.class, "AssociationListInsertion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAssociationListInsertion_AddedElement(), ecorePackage.getEObject(), null, "addedElement", null, 1, 1, AssociationListInsertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAssociationListInsertion_Index(), ecorePackage.getEInt(), "index", null, 1, 1, AssociationListInsertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(compositionListInsertionEClass, CompositionListInsertion.class, "CompositionListInsertion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompositionListInsertion_AddedElement(), ecorePackage.getEObject(), null, "addedElement", null, 1, 1, CompositionListInsertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCompositionListInsertion_Index(), ecorePackage.getEInt(), "index", null, 1, 1, CompositionListInsertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(attributeListInsertionEClass, AttributeListInsertion.class, "AttributeListInsertion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAttributeListInsertion_AddedValue(), ecorePackage.getEString(), "addedValue", null, 1, 1, AttributeListInsertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAttributeListInsertion_Index(), ecorePackage.getEInt(), "index", null, 1, 1, AttributeListInsertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(attributePropertyChangeEClass, AttributePropertyChange.class, "AttributePropertyChange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAttributePropertyChange_NewValue(), ecorePackage.getEString(), "newValue", null, 0, 1, AttributePropertyChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAttributePropertyChange_OldValue(), ecorePackage.getEString(), "oldValue", null, 0, 1, AttributePropertyChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(associationPropertyChangeEClass, AssociationPropertyChange.class, "AssociationPropertyChange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAssociationPropertyChange_NewValue(), ecorePackage.getEObject(), null, "newValue", null, 0, 1, AssociationPropertyChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAssociationPropertyChange_OldValue(), ecorePackage.getEObject(), null, "oldValue", null, 0, 1, AssociationPropertyChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(compositionPropertyChangeEClass, CompositionPropertyChange.class, "CompositionPropertyChange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompositionPropertyChange_NewValue(), ecorePackage.getEObject(), null, "newValue", null, 0, 1, CompositionPropertyChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCompositionPropertyChange_OldValue(), ecorePackage.getEObject(), null, "oldValue", null, 0, 1, CompositionPropertyChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(compositionMoveIntoPropertyEClass, CompositionMoveIntoProperty.class, "CompositionMoveIntoProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompositionMoveIntoProperty_NewValue(), ecorePackage.getEObject(), null, "newValue", null, 1, 1, CompositionMoveIntoProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCompositionMoveIntoProperty_OldValue(), ecorePackage.getEObject(), null, "oldValue", null, 0, 1, CompositionMoveIntoProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCompositionMoveIntoProperty_Origin(), this.getElementaryChange(), null, "origin", null, 0, 1, CompositionMoveIntoProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(compositionMoveToListEClass, CompositionMoveToList.class, "CompositionMoveToList", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCompositionMoveToList_Index(), ecorePackage.getEInt(), "index", null, 1, 1, CompositionMoveToList.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCompositionMoveToList_MovedElement(), ecorePackage.getEObject(), null, "movedElement", null, 1, 1, CompositionMoveToList.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCompositionMoveToList_Origin(), this.getElementaryChange(), null, "origin", null, 1, 1, CompositionMoveToList.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(compositionMoveToCollectionEClass, CompositionMoveToCollection.class, "CompositionMoveToCollection", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompositionMoveToCollection_MovedElement(), ecorePackage.getEObject(), null, "movedElement", null, 1, 1, CompositionMoveToCollection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCompositionMoveToCollection_Origin(), this.getElementaryChange(), null, "origin", null, 1, 1, CompositionMoveToCollection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(operationCallEClass, OperationCall.class, "OperationCall", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getOperationCall_Operation(), ecorePackage.getEOperation(), null, "operation", null, 1, 1, OperationCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOperationCall_TargetElement(), ecorePackage.getEObject(), null, "targetElement", null, 0, 1, OperationCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOperationCall_Arguments(), this.getOperationArgument(), null, "arguments", null, 0, -1, OperationCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(operationArgumentEClass, OperationArgument.class, "OperationArgument", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getOperationArgument_Name(), ecorePackage.getEString(), "name", null, 1, 1, OperationArgument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(valueArgumentEClass, ValueArgument.class, "ValueArgument", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getValueArgument_Value(), ecorePackage.getEString(), "value", null, 1, 1, ValueArgument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(referenceArgumentEClass, ReferenceArgument.class, "ReferenceArgument", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getReferenceArgument_Value(), ecorePackage.getEObject(), null, "value", null, 1, 1, ReferenceArgument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //ChangesPackageImpl diff --git a/solve/src/main/java/Changes/impl/CompositionChangeImpl.java b/solve/src/main/java/Changes/impl/CompositionChangeImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..c4dbf8417080125d6fc675ccffa50e86b79f22af --- /dev/null +++ b/solve/src/main/java/Changes/impl/CompositionChangeImpl.java @@ -0,0 +1,37 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.CompositionChange; + +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Composition Change</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public abstract class CompositionChangeImpl extends ElementaryChangeImpl implements CompositionChange { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CompositionChangeImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.COMPOSITION_CHANGE; + } + +} //CompositionChangeImpl diff --git a/solve/src/main/java/Changes/impl/CompositionCollectionDeletionImpl.java b/solve/src/main/java/Changes/impl/CompositionCollectionDeletionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..c584c9e0af8bcdb37ecb6efd8fa8780d96e64786 --- /dev/null +++ b/solve/src/main/java/Changes/impl/CompositionCollectionDeletionImpl.java @@ -0,0 +1,163 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.CompositionCollectionDeletion; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Composition Collection Deletion</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.CompositionCollectionDeletionImpl#getDeletedElement <em>Deleted Element</em>}</li> + * </ul> + * + * @generated + */ +public class CompositionCollectionDeletionImpl extends CompositionChangeImpl implements CompositionCollectionDeletion { + /** + * The cached value of the '{@link #getDeletedElement() <em>Deleted Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDeletedElement() + * @generated + * @ordered + */ + protected EObject deletedElement; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CompositionCollectionDeletionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.COMPOSITION_COLLECTION_DELETION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getDeletedElement() { + if (deletedElement != null && deletedElement.eIsProxy()) { + InternalEObject oldDeletedElement = (InternalEObject)deletedElement; + deletedElement = eResolveProxy(oldDeletedElement); + if (deletedElement != oldDeletedElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.COMPOSITION_COLLECTION_DELETION__DELETED_ELEMENT, oldDeletedElement, deletedElement)); + } + } + return deletedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetDeletedElement() { + return deletedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDeletedElement(EObject newDeletedElement) { + EObject oldDeletedElement = deletedElement; + deletedElement = newDeletedElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_COLLECTION_DELETION__DELETED_ELEMENT, oldDeletedElement, deletedElement)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.COMPOSITION_COLLECTION_DELETION__DELETED_ELEMENT: + if (resolve) return getDeletedElement(); + return basicGetDeletedElement(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.COMPOSITION_COLLECTION_DELETION__DELETED_ELEMENT: + setDeletedElement((EObject)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_COLLECTION_DELETION__DELETED_ELEMENT: + setDeletedElement((EObject)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_COLLECTION_DELETION__DELETED_ELEMENT: + return deletedElement != null; + } + return super.eIsSet(featureID); + } + + @Override + public void apply() { + + EList<?> collection = (EList<?>)this.getAffectedElement().eGet(this.getFeature()); + collection.remove(this.getDeletedElement()); + } + +} //CompositionCollectionDeletionImpl diff --git a/solve/src/main/java/Changes/impl/CompositionCollectionInsertionImpl.java b/solve/src/main/java/Changes/impl/CompositionCollectionInsertionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..c0132dee550ccd114271524235b719e78b0502fa --- /dev/null +++ b/solve/src/main/java/Changes/impl/CompositionCollectionInsertionImpl.java @@ -0,0 +1,182 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.CompositionCollectionInsertion; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Composition Collection Insertion</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.CompositionCollectionInsertionImpl#getAddedElement <em>Added Element</em>}</li> + * </ul> + * + * @generated + */ +public class CompositionCollectionInsertionImpl extends CompositionChangeImpl implements CompositionCollectionInsertion { + /** + * The cached value of the '{@link #getAddedElement() <em>Added Element</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAddedElement() + * @generated + * @ordered + */ + protected EObject addedElement; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CompositionCollectionInsertionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.COMPOSITION_COLLECTION_INSERTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getAddedElement() { + return addedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetAddedElement(EObject newAddedElement, NotificationChain msgs) { + EObject oldAddedElement = addedElement; + addedElement = newAddedElement; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_COLLECTION_INSERTION__ADDED_ELEMENT, oldAddedElement, newAddedElement); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAddedElement(EObject newAddedElement) { + if (newAddedElement != addedElement) { + NotificationChain msgs = null; + if (addedElement != null) + msgs = ((InternalEObject)addedElement).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ChangesPackage.COMPOSITION_COLLECTION_INSERTION__ADDED_ELEMENT, null, msgs); + if (newAddedElement != null) + msgs = ((InternalEObject)newAddedElement).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ChangesPackage.COMPOSITION_COLLECTION_INSERTION__ADDED_ELEMENT, null, msgs); + msgs = basicSetAddedElement(newAddedElement, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_COLLECTION_INSERTION__ADDED_ELEMENT, newAddedElement, newAddedElement)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ChangesPackage.COMPOSITION_COLLECTION_INSERTION__ADDED_ELEMENT: + return basicSetAddedElement(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.COMPOSITION_COLLECTION_INSERTION__ADDED_ELEMENT: + return getAddedElement(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.COMPOSITION_COLLECTION_INSERTION__ADDED_ELEMENT: + setAddedElement((EObject)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_COLLECTION_INSERTION__ADDED_ELEMENT: + setAddedElement((EObject)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_COLLECTION_INSERTION__ADDED_ELEMENT: + return addedElement != null; + } + return super.eIsSet(featureID); + } + + @Override + public void apply() { + + EList<EObject> collection = (EList<EObject>)this.getAffectedElement().eGet(this.getFeature()); + collection.add(this.getAddedElement()); + } + +} //CompositionCollectionInsertionImpl diff --git a/solve/src/main/java/Changes/impl/CompositionCollectionResetImpl.java b/solve/src/main/java/Changes/impl/CompositionCollectionResetImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..c96ee27a27c9dcbdb989c12e3a908ceca3976234 --- /dev/null +++ b/solve/src/main/java/Changes/impl/CompositionCollectionResetImpl.java @@ -0,0 +1,45 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.CompositionCollectionReset; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Composition Collection Reset</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class CompositionCollectionResetImpl extends CompositionChangeImpl implements CompositionCollectionReset { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CompositionCollectionResetImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.COMPOSITION_COLLECTION_RESET; + } + + @Override + public void apply() { + + EList<?> collection = (EList<?>)this.getAffectedElement().eGet(this.getFeature()); + collection.clear(); + } + +} //CompositionCollectionResetImpl diff --git a/solve/src/main/java/Changes/impl/CompositionListDeletionImpl.java b/solve/src/main/java/Changes/impl/CompositionListDeletionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..2f3ea027c359cbb264c7579f59249b4e8313bcb7 --- /dev/null +++ b/solve/src/main/java/Changes/impl/CompositionListDeletionImpl.java @@ -0,0 +1,231 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.CompositionListDeletion; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Composition List Deletion</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.CompositionListDeletionImpl#getDeletedElement <em>Deleted Element</em>}</li> + * <li>{@link Changes.impl.CompositionListDeletionImpl#getIndex <em>Index</em>}</li> + * </ul> + * + * @generated + */ +public class CompositionListDeletionImpl extends CompositionChangeImpl implements CompositionListDeletion { + /** + * The cached value of the '{@link #getDeletedElement() <em>Deleted Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDeletedElement() + * @generated + * @ordered + */ + protected EObject deletedElement; + + /** + * The default value of the '{@link #getIndex() <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIndex() + * @generated + * @ordered + */ + protected static final int INDEX_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getIndex() <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIndex() + * @generated + * @ordered + */ + protected int index = INDEX_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CompositionListDeletionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.COMPOSITION_LIST_DELETION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getDeletedElement() { + if (deletedElement != null && deletedElement.eIsProxy()) { + InternalEObject oldDeletedElement = (InternalEObject)deletedElement; + deletedElement = eResolveProxy(oldDeletedElement); + if (deletedElement != oldDeletedElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.COMPOSITION_LIST_DELETION__DELETED_ELEMENT, oldDeletedElement, deletedElement)); + } + } + return deletedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetDeletedElement() { + return deletedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDeletedElement(EObject newDeletedElement) { + EObject oldDeletedElement = deletedElement; + deletedElement = newDeletedElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_LIST_DELETION__DELETED_ELEMENT, oldDeletedElement, deletedElement)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getIndex() { + return index; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setIndex(int newIndex) { + int oldIndex = index; + index = newIndex; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_LIST_DELETION__INDEX, oldIndex, index)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.COMPOSITION_LIST_DELETION__DELETED_ELEMENT: + if (resolve) return getDeletedElement(); + return basicGetDeletedElement(); + case ChangesPackage.COMPOSITION_LIST_DELETION__INDEX: + return getIndex(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.COMPOSITION_LIST_DELETION__DELETED_ELEMENT: + setDeletedElement((EObject)newValue); + return; + case ChangesPackage.COMPOSITION_LIST_DELETION__INDEX: + setIndex((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_LIST_DELETION__DELETED_ELEMENT: + setDeletedElement((EObject)null); + return; + case ChangesPackage.COMPOSITION_LIST_DELETION__INDEX: + setIndex(INDEX_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_LIST_DELETION__DELETED_ELEMENT: + return deletedElement != null; + case ChangesPackage.COMPOSITION_LIST_DELETION__INDEX: + return index != INDEX_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (index: "); + result.append(index); + result.append(')'); + return result.toString(); + } + + @Override + public void apply() { + + EList<?> collection = (EList<?>)this.getAffectedElement().eGet(this.getFeature()); + collection.remove(this.getIndex()); + } + +} //CompositionListDeletionImpl diff --git a/solve/src/main/java/Changes/impl/CompositionListInsertionImpl.java b/solve/src/main/java/Changes/impl/CompositionListInsertionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..dccf297c46751bcd5785953de17c104720bf1673 --- /dev/null +++ b/solve/src/main/java/Changes/impl/CompositionListInsertionImpl.java @@ -0,0 +1,250 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.CompositionListInsertion; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Composition List Insertion</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.CompositionListInsertionImpl#getAddedElement <em>Added Element</em>}</li> + * <li>{@link Changes.impl.CompositionListInsertionImpl#getIndex <em>Index</em>}</li> + * </ul> + * + * @generated + */ +public class CompositionListInsertionImpl extends CompositionChangeImpl implements CompositionListInsertion { + /** + * The cached value of the '{@link #getAddedElement() <em>Added Element</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAddedElement() + * @generated + * @ordered + */ + protected EObject addedElement; + + /** + * The default value of the '{@link #getIndex() <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIndex() + * @generated + * @ordered + */ + protected static final int INDEX_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getIndex() <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIndex() + * @generated + * @ordered + */ + protected int index = INDEX_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CompositionListInsertionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.COMPOSITION_LIST_INSERTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getAddedElement() { + return addedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetAddedElement(EObject newAddedElement, NotificationChain msgs) { + EObject oldAddedElement = addedElement; + addedElement = newAddedElement; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_LIST_INSERTION__ADDED_ELEMENT, oldAddedElement, newAddedElement); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAddedElement(EObject newAddedElement) { + if (newAddedElement != addedElement) { + NotificationChain msgs = null; + if (addedElement != null) + msgs = ((InternalEObject)addedElement).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ChangesPackage.COMPOSITION_LIST_INSERTION__ADDED_ELEMENT, null, msgs); + if (newAddedElement != null) + msgs = ((InternalEObject)newAddedElement).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ChangesPackage.COMPOSITION_LIST_INSERTION__ADDED_ELEMENT, null, msgs); + msgs = basicSetAddedElement(newAddedElement, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_LIST_INSERTION__ADDED_ELEMENT, newAddedElement, newAddedElement)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getIndex() { + return index; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setIndex(int newIndex) { + int oldIndex = index; + index = newIndex; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_LIST_INSERTION__INDEX, oldIndex, index)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ChangesPackage.COMPOSITION_LIST_INSERTION__ADDED_ELEMENT: + return basicSetAddedElement(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.COMPOSITION_LIST_INSERTION__ADDED_ELEMENT: + return getAddedElement(); + case ChangesPackage.COMPOSITION_LIST_INSERTION__INDEX: + return getIndex(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.COMPOSITION_LIST_INSERTION__ADDED_ELEMENT: + setAddedElement((EObject)newValue); + return; + case ChangesPackage.COMPOSITION_LIST_INSERTION__INDEX: + setIndex((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_LIST_INSERTION__ADDED_ELEMENT: + setAddedElement((EObject)null); + return; + case ChangesPackage.COMPOSITION_LIST_INSERTION__INDEX: + setIndex(INDEX_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_LIST_INSERTION__ADDED_ELEMENT: + return addedElement != null; + case ChangesPackage.COMPOSITION_LIST_INSERTION__INDEX: + return index != INDEX_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (index: "); + result.append(index); + result.append(')'); + return result.toString(); + } + + @Override + public void apply() { + + EList<EObject> collection = (EList<EObject>)this.getAffectedElement().eGet(this.getFeature()); + collection.add(this.getIndex(), this.getAddedElement()); + } + +} //CompositionListInsertionImpl diff --git a/solve/src/main/java/Changes/impl/CompositionMoveIntoPropertyImpl.java b/solve/src/main/java/Changes/impl/CompositionMoveIntoPropertyImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..370e3ed7f2f67d8c61e515aab52dca0346ac1638 --- /dev/null +++ b/solve/src/main/java/Changes/impl/CompositionMoveIntoPropertyImpl.java @@ -0,0 +1,302 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.CompositionMoveIntoProperty; +import Changes.ElementaryChange; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Composition Move Into Property</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.CompositionMoveIntoPropertyImpl#getNewValue <em>New Value</em>}</li> + * <li>{@link Changes.impl.CompositionMoveIntoPropertyImpl#getOldValue <em>Old Value</em>}</li> + * <li>{@link Changes.impl.CompositionMoveIntoPropertyImpl#getOrigin <em>Origin</em>}</li> + * </ul> + * + * @generated + */ +public class CompositionMoveIntoPropertyImpl extends CompositionChangeImpl implements CompositionMoveIntoProperty { + /** + * The cached value of the '{@link #getNewValue() <em>New Value</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNewValue() + * @generated + * @ordered + */ + protected EObject newValue; + + /** + * The cached value of the '{@link #getOldValue() <em>Old Value</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOldValue() + * @generated + * @ordered + */ + protected EObject oldValue; + + /** + * The cached value of the '{@link #getOrigin() <em>Origin</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOrigin() + * @generated + * @ordered + */ + protected ElementaryChange origin; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CompositionMoveIntoPropertyImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.COMPOSITION_MOVE_INTO_PROPERTY; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getNewValue() { + if (newValue != null && newValue.eIsProxy()) { + InternalEObject oldNewValue = (InternalEObject)newValue; + newValue = eResolveProxy(oldNewValue); + if (newValue != oldNewValue) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__NEW_VALUE, oldNewValue, newValue)); + } + } + return newValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetNewValue() { + return newValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setNewValue(EObject newNewValue) { + EObject oldNewValue = newValue; + newValue = newNewValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__NEW_VALUE, oldNewValue, newValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getOldValue() { + if (oldValue != null && oldValue.eIsProxy()) { + InternalEObject oldOldValue = (InternalEObject)oldValue; + oldValue = eResolveProxy(oldOldValue); + if (oldValue != oldOldValue) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__OLD_VALUE, oldOldValue, oldValue)); + } + } + return oldValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetOldValue() { + return oldValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setOldValue(EObject newOldValue) { + EObject oldOldValue = oldValue; + oldValue = newOldValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__OLD_VALUE, oldOldValue, oldValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ElementaryChange getOrigin() { + return origin; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetOrigin(ElementaryChange newOrigin, NotificationChain msgs) { + ElementaryChange oldOrigin = origin; + origin = newOrigin; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__ORIGIN, oldOrigin, newOrigin); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setOrigin(ElementaryChange newOrigin) { + if (newOrigin != origin) { + NotificationChain msgs = null; + if (origin != null) + msgs = ((InternalEObject)origin).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__ORIGIN, null, msgs); + if (newOrigin != null) + msgs = ((InternalEObject)newOrigin).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__ORIGIN, null, msgs); + msgs = basicSetOrigin(newOrigin, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__ORIGIN, newOrigin, newOrigin)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__ORIGIN: + return basicSetOrigin(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__NEW_VALUE: + if (resolve) return getNewValue(); + return basicGetNewValue(); + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__OLD_VALUE: + if (resolve) return getOldValue(); + return basicGetOldValue(); + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__ORIGIN: + return getOrigin(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__NEW_VALUE: + setNewValue((EObject)newValue); + return; + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__OLD_VALUE: + setOldValue((EObject)newValue); + return; + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__ORIGIN: + setOrigin((ElementaryChange)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__NEW_VALUE: + setNewValue((EObject)null); + return; + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__OLD_VALUE: + setOldValue((EObject)null); + return; + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__ORIGIN: + setOrigin((ElementaryChange)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__NEW_VALUE: + return newValue != null; + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__OLD_VALUE: + return oldValue != null; + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY__ORIGIN: + return origin != null; + } + return super.eIsSet(featureID); + } + + @Override + public void apply() { + // TODO Auto-generated method stub + + } + +} //CompositionMoveIntoPropertyImpl diff --git a/solve/src/main/java/Changes/impl/CompositionMoveToCollectionImpl.java b/solve/src/main/java/Changes/impl/CompositionMoveToCollectionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..8a0c76efc697eae8d285bd5b63d2a86cda2dd02d --- /dev/null +++ b/solve/src/main/java/Changes/impl/CompositionMoveToCollectionImpl.java @@ -0,0 +1,237 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.CompositionMoveToCollection; +import Changes.ElementaryChange; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Composition Move To Collection</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.CompositionMoveToCollectionImpl#getMovedElement <em>Moved Element</em>}</li> + * <li>{@link Changes.impl.CompositionMoveToCollectionImpl#getOrigin <em>Origin</em>}</li> + * </ul> + * + * @generated + */ +public class CompositionMoveToCollectionImpl extends MinimalEObjectImpl.Container implements CompositionMoveToCollection { + /** + * The cached value of the '{@link #getMovedElement() <em>Moved Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMovedElement() + * @generated + * @ordered + */ + protected EObject movedElement; + + /** + * The cached value of the '{@link #getOrigin() <em>Origin</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOrigin() + * @generated + * @ordered + */ + protected ElementaryChange origin; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CompositionMoveToCollectionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.COMPOSITION_MOVE_TO_COLLECTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getMovedElement() { + if (movedElement != null && movedElement.eIsProxy()) { + InternalEObject oldMovedElement = (InternalEObject)movedElement; + movedElement = eResolveProxy(oldMovedElement); + if (movedElement != oldMovedElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__MOVED_ELEMENT, oldMovedElement, movedElement)); + } + } + return movedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetMovedElement() { + return movedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setMovedElement(EObject newMovedElement) { + EObject oldMovedElement = movedElement; + movedElement = newMovedElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__MOVED_ELEMENT, oldMovedElement, movedElement)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ElementaryChange getOrigin() { + return origin; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetOrigin(ElementaryChange newOrigin, NotificationChain msgs) { + ElementaryChange oldOrigin = origin; + origin = newOrigin; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__ORIGIN, oldOrigin, newOrigin); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setOrigin(ElementaryChange newOrigin) { + if (newOrigin != origin) { + NotificationChain msgs = null; + if (origin != null) + msgs = ((InternalEObject)origin).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__ORIGIN, null, msgs); + if (newOrigin != null) + msgs = ((InternalEObject)newOrigin).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__ORIGIN, null, msgs); + msgs = basicSetOrigin(newOrigin, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__ORIGIN, newOrigin, newOrigin)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__ORIGIN: + return basicSetOrigin(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__MOVED_ELEMENT: + if (resolve) return getMovedElement(); + return basicGetMovedElement(); + case ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__ORIGIN: + return getOrigin(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__MOVED_ELEMENT: + setMovedElement((EObject)newValue); + return; + case ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__ORIGIN: + setOrigin((ElementaryChange)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__MOVED_ELEMENT: + setMovedElement((EObject)null); + return; + case ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__ORIGIN: + setOrigin((ElementaryChange)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__MOVED_ELEMENT: + return movedElement != null; + case ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION__ORIGIN: + return origin != null; + } + return super.eIsSet(featureID); + } + +} //CompositionMoveToCollectionImpl diff --git a/solve/src/main/java/Changes/impl/CompositionMoveToListImpl.java b/solve/src/main/java/Changes/impl/CompositionMoveToListImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..ff9839650490b1773cfd630777fb22638714278e --- /dev/null +++ b/solve/src/main/java/Changes/impl/CompositionMoveToListImpl.java @@ -0,0 +1,310 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.CompositionMoveToList; +import Changes.ElementaryChange; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Composition Move To List</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.CompositionMoveToListImpl#getIndex <em>Index</em>}</li> + * <li>{@link Changes.impl.CompositionMoveToListImpl#getMovedElement <em>Moved Element</em>}</li> + * <li>{@link Changes.impl.CompositionMoveToListImpl#getOrigin <em>Origin</em>}</li> + * </ul> + * + * @generated + */ +public class CompositionMoveToListImpl extends CompositionChangeImpl implements CompositionMoveToList { + /** + * The default value of the '{@link #getIndex() <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIndex() + * @generated + * @ordered + */ + protected static final int INDEX_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getIndex() <em>Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIndex() + * @generated + * @ordered + */ + protected int index = INDEX_EDEFAULT; + + /** + * The cached value of the '{@link #getMovedElement() <em>Moved Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMovedElement() + * @generated + * @ordered + */ + protected EObject movedElement; + + /** + * The cached value of the '{@link #getOrigin() <em>Origin</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOrigin() + * @generated + * @ordered + */ + protected ElementaryChange origin; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CompositionMoveToListImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.COMPOSITION_MOVE_TO_LIST; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getIndex() { + return index; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setIndex(int newIndex) { + int oldIndex = index; + index = newIndex; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_MOVE_TO_LIST__INDEX, oldIndex, index)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getMovedElement() { + if (movedElement != null && movedElement.eIsProxy()) { + InternalEObject oldMovedElement = (InternalEObject)movedElement; + movedElement = eResolveProxy(oldMovedElement); + if (movedElement != oldMovedElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.COMPOSITION_MOVE_TO_LIST__MOVED_ELEMENT, oldMovedElement, movedElement)); + } + } + return movedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetMovedElement() { + return movedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setMovedElement(EObject newMovedElement) { + EObject oldMovedElement = movedElement; + movedElement = newMovedElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_MOVE_TO_LIST__MOVED_ELEMENT, oldMovedElement, movedElement)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ElementaryChange getOrigin() { + return origin; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetOrigin(ElementaryChange newOrigin, NotificationChain msgs) { + ElementaryChange oldOrigin = origin; + origin = newOrigin; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_MOVE_TO_LIST__ORIGIN, oldOrigin, newOrigin); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setOrigin(ElementaryChange newOrigin) { + if (newOrigin != origin) { + NotificationChain msgs = null; + if (origin != null) + msgs = ((InternalEObject)origin).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ChangesPackage.COMPOSITION_MOVE_TO_LIST__ORIGIN, null, msgs); + if (newOrigin != null) + msgs = ((InternalEObject)newOrigin).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ChangesPackage.COMPOSITION_MOVE_TO_LIST__ORIGIN, null, msgs); + msgs = basicSetOrigin(newOrigin, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_MOVE_TO_LIST__ORIGIN, newOrigin, newOrigin)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_TO_LIST__ORIGIN: + return basicSetOrigin(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_TO_LIST__INDEX: + return getIndex(); + case ChangesPackage.COMPOSITION_MOVE_TO_LIST__MOVED_ELEMENT: + if (resolve) return getMovedElement(); + return basicGetMovedElement(); + case ChangesPackage.COMPOSITION_MOVE_TO_LIST__ORIGIN: + return getOrigin(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_TO_LIST__INDEX: + setIndex((Integer)newValue); + return; + case ChangesPackage.COMPOSITION_MOVE_TO_LIST__MOVED_ELEMENT: + setMovedElement((EObject)newValue); + return; + case ChangesPackage.COMPOSITION_MOVE_TO_LIST__ORIGIN: + setOrigin((ElementaryChange)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_TO_LIST__INDEX: + setIndex(INDEX_EDEFAULT); + return; + case ChangesPackage.COMPOSITION_MOVE_TO_LIST__MOVED_ELEMENT: + setMovedElement((EObject)null); + return; + case ChangesPackage.COMPOSITION_MOVE_TO_LIST__ORIGIN: + setOrigin((ElementaryChange)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_MOVE_TO_LIST__INDEX: + return index != INDEX_EDEFAULT; + case ChangesPackage.COMPOSITION_MOVE_TO_LIST__MOVED_ELEMENT: + return movedElement != null; + case ChangesPackage.COMPOSITION_MOVE_TO_LIST__ORIGIN: + return origin != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (index: "); + result.append(index); + result.append(')'); + return result.toString(); + } + + @Override + public void apply() { + // TODO Auto-generated method stub + + } + +} //CompositionMoveToListImpl diff --git a/solve/src/main/java/Changes/impl/CompositionPropertyChangeImpl.java b/solve/src/main/java/Changes/impl/CompositionPropertyChangeImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..fc8444ce885c1c995fca872fd1540968c820922c --- /dev/null +++ b/solve/src/main/java/Changes/impl/CompositionPropertyChangeImpl.java @@ -0,0 +1,240 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.CompositionPropertyChange; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Composition Property Change</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.CompositionPropertyChangeImpl#getNewValue <em>New Value</em>}</li> + * <li>{@link Changes.impl.CompositionPropertyChangeImpl#getOldValue <em>Old Value</em>}</li> + * </ul> + * + * @generated + */ +public class CompositionPropertyChangeImpl extends CompositionChangeImpl implements CompositionPropertyChange { + /** + * The cached value of the '{@link #getNewValue() <em>New Value</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNewValue() + * @generated + * @ordered + */ + protected EObject newValue; + + /** + * The cached value of the '{@link #getOldValue() <em>Old Value</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOldValue() + * @generated + * @ordered + */ + protected EObject oldValue; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CompositionPropertyChangeImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.COMPOSITION_PROPERTY_CHANGE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getNewValue() { + return newValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetNewValue(EObject newNewValue, NotificationChain msgs) { + EObject oldNewValue = newValue; + newValue = newNewValue; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_PROPERTY_CHANGE__NEW_VALUE, oldNewValue, newNewValue); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setNewValue(EObject newNewValue) { + if (newNewValue != newValue) { + NotificationChain msgs = null; + if (newValue != null) + msgs = ((InternalEObject)newValue).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ChangesPackage.COMPOSITION_PROPERTY_CHANGE__NEW_VALUE, null, msgs); + if (newNewValue != null) + msgs = ((InternalEObject)newNewValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ChangesPackage.COMPOSITION_PROPERTY_CHANGE__NEW_VALUE, null, msgs); + msgs = basicSetNewValue(newNewValue, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_PROPERTY_CHANGE__NEW_VALUE, newNewValue, newNewValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getOldValue() { + if (oldValue != null && oldValue.eIsProxy()) { + InternalEObject oldOldValue = (InternalEObject)oldValue; + oldValue = eResolveProxy(oldOldValue); + if (oldValue != oldOldValue) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.COMPOSITION_PROPERTY_CHANGE__OLD_VALUE, oldOldValue, oldValue)); + } + } + return oldValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetOldValue() { + return oldValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setOldValue(EObject newOldValue) { + EObject oldOldValue = oldValue; + oldValue = newOldValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.COMPOSITION_PROPERTY_CHANGE__OLD_VALUE, oldOldValue, oldValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ChangesPackage.COMPOSITION_PROPERTY_CHANGE__NEW_VALUE: + return basicSetNewValue(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.COMPOSITION_PROPERTY_CHANGE__NEW_VALUE: + return getNewValue(); + case ChangesPackage.COMPOSITION_PROPERTY_CHANGE__OLD_VALUE: + if (resolve) return getOldValue(); + return basicGetOldValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.COMPOSITION_PROPERTY_CHANGE__NEW_VALUE: + setNewValue((EObject)newValue); + return; + case ChangesPackage.COMPOSITION_PROPERTY_CHANGE__OLD_VALUE: + setOldValue((EObject)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_PROPERTY_CHANGE__NEW_VALUE: + setNewValue((EObject)null); + return; + case ChangesPackage.COMPOSITION_PROPERTY_CHANGE__OLD_VALUE: + setOldValue((EObject)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.COMPOSITION_PROPERTY_CHANGE__NEW_VALUE: + return newValue != null; + case ChangesPackage.COMPOSITION_PROPERTY_CHANGE__OLD_VALUE: + return oldValue != null; + } + return super.eIsSet(featureID); + } + + @Override + public void apply() { + this.getAffectedElement().eSet(this.getFeature(), this.getNewValue()); + } + +} //CompositionPropertyChangeImpl diff --git a/solve/src/main/java/Changes/impl/ElementaryChangeImpl.java b/solve/src/main/java/Changes/impl/ElementaryChangeImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..135b9425e0d8d4e3076d6ef4200031786b0520ce --- /dev/null +++ b/solve/src/main/java/Changes/impl/ElementaryChangeImpl.java @@ -0,0 +1,217 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.ElementaryChange; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Elementary Change</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.ElementaryChangeImpl#getAffectedElement <em>Affected Element</em>}</li> + * <li>{@link Changes.impl.ElementaryChangeImpl#getFeature <em>Feature</em>}</li> + * </ul> + * + * @generated + */ +public abstract class ElementaryChangeImpl extends ModelChangeImpl implements ElementaryChange { + /** + * The cached value of the '{@link #getAffectedElement() <em>Affected Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAffectedElement() + * @generated + * @ordered + */ + protected EObject affectedElement; + + /** + * The cached value of the '{@link #getFeature() <em>Feature</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFeature() + * @generated + * @ordered + */ + protected EStructuralFeature feature; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ElementaryChangeImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.ELEMENTARY_CHANGE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getAffectedElement() { + if (affectedElement != null && affectedElement.eIsProxy()) { + InternalEObject oldAffectedElement = (InternalEObject)affectedElement; + affectedElement = eResolveProxy(oldAffectedElement); + if (affectedElement != oldAffectedElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.ELEMENTARY_CHANGE__AFFECTED_ELEMENT, oldAffectedElement, affectedElement)); + } + } + return affectedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetAffectedElement() { + return affectedElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAffectedElement(EObject newAffectedElement) { + EObject oldAffectedElement = affectedElement; + affectedElement = newAffectedElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ELEMENTARY_CHANGE__AFFECTED_ELEMENT, oldAffectedElement, affectedElement)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EStructuralFeature getFeature() { + if (feature != null && feature.eIsProxy()) { + InternalEObject oldFeature = (InternalEObject)feature; + feature = (EStructuralFeature)eResolveProxy(oldFeature); + if (feature != oldFeature) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.ELEMENTARY_CHANGE__FEATURE, oldFeature, feature)); + } + } + return feature; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EStructuralFeature basicGetFeature() { + return feature; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFeature(EStructuralFeature newFeature) { + EStructuralFeature oldFeature = feature; + feature = newFeature; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.ELEMENTARY_CHANGE__FEATURE, oldFeature, feature)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.ELEMENTARY_CHANGE__AFFECTED_ELEMENT: + if (resolve) return getAffectedElement(); + return basicGetAffectedElement(); + case ChangesPackage.ELEMENTARY_CHANGE__FEATURE: + if (resolve) return getFeature(); + return basicGetFeature(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.ELEMENTARY_CHANGE__AFFECTED_ELEMENT: + setAffectedElement((EObject)newValue); + return; + case ChangesPackage.ELEMENTARY_CHANGE__FEATURE: + setFeature((EStructuralFeature)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.ELEMENTARY_CHANGE__AFFECTED_ELEMENT: + setAffectedElement((EObject)null); + return; + case ChangesPackage.ELEMENTARY_CHANGE__FEATURE: + setFeature((EStructuralFeature)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.ELEMENTARY_CHANGE__AFFECTED_ELEMENT: + return affectedElement != null; + case ChangesPackage.ELEMENTARY_CHANGE__FEATURE: + return feature != null; + } + return super.eIsSet(featureID); + } + +} //ElementaryChangeImpl diff --git a/solve/src/main/java/Changes/impl/ModelChangeImpl.java b/solve/src/main/java/Changes/impl/ModelChangeImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..54b6cf39bcab096194f4c8cc778e934fc3bccdf7 --- /dev/null +++ b/solve/src/main/java/Changes/impl/ModelChangeImpl.java @@ -0,0 +1,39 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.ModelChange; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Model Change</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public abstract class ModelChangeImpl extends MinimalEObjectImpl.Container implements ModelChange { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ModelChangeImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.MODEL_CHANGE; + } + +} //ModelChangeImpl diff --git a/solve/src/main/java/Changes/impl/ModelChangeSetImpl.java b/solve/src/main/java/Changes/impl/ModelChangeSetImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..dc2354b28d11a4fc7631cdeb34667938d4cb6c58 --- /dev/null +++ b/solve/src/main/java/Changes/impl/ModelChangeSetImpl.java @@ -0,0 +1,152 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.ModelChange; +import Changes.ModelChangeSet; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Model Change Set</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.ModelChangeSetImpl#getChanges <em>Changes</em>}</li> + * </ul> + * + * @generated + */ +public class ModelChangeSetImpl extends MinimalEObjectImpl.Container implements ModelChangeSet { + /** + * The cached value of the '{@link #getChanges() <em>Changes</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getChanges() + * @generated + * @ordered + */ + protected EList<ModelChange> changes; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ModelChangeSetImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.MODEL_CHANGE_SET; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<ModelChange> getChanges() { + if (changes == null) { + changes = new EObjectContainmentEList<ModelChange>(ModelChange.class, this, ChangesPackage.MODEL_CHANGE_SET__CHANGES); + } + return changes; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ChangesPackage.MODEL_CHANGE_SET__CHANGES: + return ((InternalEList<?>)getChanges()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.MODEL_CHANGE_SET__CHANGES: + return getChanges(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.MODEL_CHANGE_SET__CHANGES: + getChanges().clear(); + getChanges().addAll((Collection<? extends ModelChange>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.MODEL_CHANGE_SET__CHANGES: + getChanges().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.MODEL_CHANGE_SET__CHANGES: + return changes != null && !changes.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ModelChangeSetImpl diff --git a/solve/src/main/java/Changes/impl/OperationArgumentImpl.java b/solve/src/main/java/Changes/impl/OperationArgumentImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..f71f8b90477c7aa1085a24de416bebd73cc036d7 --- /dev/null +++ b/solve/src/main/java/Changes/impl/OperationArgumentImpl.java @@ -0,0 +1,163 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.OperationArgument; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Operation Argument</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.OperationArgumentImpl#getName <em>Name</em>}</li> + * </ul> + * + * @generated + */ +public abstract class OperationArgumentImpl extends MinimalEObjectImpl.Container implements OperationArgument { + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected OperationArgumentImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.OPERATION_ARGUMENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.OPERATION_ARGUMENT__NAME, oldName, name)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.OPERATION_ARGUMENT__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.OPERATION_ARGUMENT__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.OPERATION_ARGUMENT__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.OPERATION_ARGUMENT__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //OperationArgumentImpl diff --git a/solve/src/main/java/Changes/impl/OperationCallImpl.java b/solve/src/main/java/Changes/impl/OperationCallImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..75c5fa043743f84ab21b1ff17bb807c54497ce53 --- /dev/null +++ b/solve/src/main/java/Changes/impl/OperationCallImpl.java @@ -0,0 +1,281 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.OperationArgument; +import Changes.OperationCall; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Operation Call</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.OperationCallImpl#getOperation <em>Operation</em>}</li> + * <li>{@link Changes.impl.OperationCallImpl#getTargetElement <em>Target Element</em>}</li> + * <li>{@link Changes.impl.OperationCallImpl#getArguments <em>Arguments</em>}</li> + * </ul> + * + * @generated + */ +public class OperationCallImpl extends ModelChangeImpl implements OperationCall { + /** + * The cached value of the '{@link #getOperation() <em>Operation</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOperation() + * @generated + * @ordered + */ + protected EOperation operation; + + /** + * The cached value of the '{@link #getTargetElement() <em>Target Element</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTargetElement() + * @generated + * @ordered + */ + protected EObject targetElement; + + /** + * The cached value of the '{@link #getArguments() <em>Arguments</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getArguments() + * @generated + * @ordered + */ + protected EList<OperationArgument> arguments; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected OperationCallImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.OPERATION_CALL; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EOperation getOperation() { + if (operation != null && operation.eIsProxy()) { + InternalEObject oldOperation = (InternalEObject)operation; + operation = (EOperation)eResolveProxy(oldOperation); + if (operation != oldOperation) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.OPERATION_CALL__OPERATION, oldOperation, operation)); + } + } + return operation; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EOperation basicGetOperation() { + return operation; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setOperation(EOperation newOperation) { + EOperation oldOperation = operation; + operation = newOperation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.OPERATION_CALL__OPERATION, oldOperation, operation)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getTargetElement() { + if (targetElement != null && targetElement.eIsProxy()) { + InternalEObject oldTargetElement = (InternalEObject)targetElement; + targetElement = eResolveProxy(oldTargetElement); + if (targetElement != oldTargetElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.OPERATION_CALL__TARGET_ELEMENT, oldTargetElement, targetElement)); + } + } + return targetElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetTargetElement() { + return targetElement; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTargetElement(EObject newTargetElement) { + EObject oldTargetElement = targetElement; + targetElement = newTargetElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.OPERATION_CALL__TARGET_ELEMENT, oldTargetElement, targetElement)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<OperationArgument> getArguments() { + if (arguments == null) { + arguments = new EObjectContainmentEList<OperationArgument>(OperationArgument.class, this, ChangesPackage.OPERATION_CALL__ARGUMENTS); + } + return arguments; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ChangesPackage.OPERATION_CALL__ARGUMENTS: + return ((InternalEList<?>)getArguments()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.OPERATION_CALL__OPERATION: + if (resolve) return getOperation(); + return basicGetOperation(); + case ChangesPackage.OPERATION_CALL__TARGET_ELEMENT: + if (resolve) return getTargetElement(); + return basicGetTargetElement(); + case ChangesPackage.OPERATION_CALL__ARGUMENTS: + return getArguments(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.OPERATION_CALL__OPERATION: + setOperation((EOperation)newValue); + return; + case ChangesPackage.OPERATION_CALL__TARGET_ELEMENT: + setTargetElement((EObject)newValue); + return; + case ChangesPackage.OPERATION_CALL__ARGUMENTS: + getArguments().clear(); + getArguments().addAll((Collection<? extends OperationArgument>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.OPERATION_CALL__OPERATION: + setOperation((EOperation)null); + return; + case ChangesPackage.OPERATION_CALL__TARGET_ELEMENT: + setTargetElement((EObject)null); + return; + case ChangesPackage.OPERATION_CALL__ARGUMENTS: + getArguments().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.OPERATION_CALL__OPERATION: + return operation != null; + case ChangesPackage.OPERATION_CALL__TARGET_ELEMENT: + return targetElement != null; + case ChangesPackage.OPERATION_CALL__ARGUMENTS: + return arguments != null && !arguments.isEmpty(); + } + return super.eIsSet(featureID); + } + + @Override + public void apply() { + // TODO Auto-generated method stub + + } + +} //OperationCallImpl diff --git a/solve/src/main/java/Changes/impl/ReferenceArgumentImpl.java b/solve/src/main/java/Changes/impl/ReferenceArgumentImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..082bf9f21111ea2b4fe241e45e833dbae42bed49 --- /dev/null +++ b/solve/src/main/java/Changes/impl/ReferenceArgumentImpl.java @@ -0,0 +1,156 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.ReferenceArgument; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Reference Argument</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.ReferenceArgumentImpl#getValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +public class ReferenceArgumentImpl extends OperationArgumentImpl implements ReferenceArgument { + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected EObject value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ReferenceArgumentImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.REFERENCE_ARGUMENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getValue() { + if (value != null && value.eIsProxy()) { + InternalEObject oldValue = (InternalEObject)value; + value = eResolveProxy(oldValue); + if (value != oldValue) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangesPackage.REFERENCE_ARGUMENT__VALUE, oldValue, value)); + } + } + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setValue(EObject newValue) { + EObject oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.REFERENCE_ARGUMENT__VALUE, oldValue, value)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.REFERENCE_ARGUMENT__VALUE: + if (resolve) return getValue(); + return basicGetValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.REFERENCE_ARGUMENT__VALUE: + setValue((EObject)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.REFERENCE_ARGUMENT__VALUE: + setValue((EObject)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.REFERENCE_ARGUMENT__VALUE: + return value != null; + } + return super.eIsSet(featureID); + } + +} //ReferenceArgumentImpl diff --git a/solve/src/main/java/Changes/impl/ValueArgumentImpl.java b/solve/src/main/java/Changes/impl/ValueArgumentImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..bc9a8889b6c72642242ac1068171e480aba7e42c --- /dev/null +++ b/solve/src/main/java/Changes/impl/ValueArgumentImpl.java @@ -0,0 +1,162 @@ +/** + */ +package Changes.impl; + +import Changes.ChangesPackage; +import Changes.ValueArgument; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Value Argument</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link Changes.impl.ValueArgumentImpl#getValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +public class ValueArgumentImpl extends OperationArgumentImpl implements ValueArgument { + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ValueArgumentImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ChangesPackage.Literals.VALUE_ARGUMENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ChangesPackage.VALUE_ARGUMENT__VALUE, oldValue, value)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ChangesPackage.VALUE_ARGUMENT__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ChangesPackage.VALUE_ARGUMENT__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ChangesPackage.VALUE_ARGUMENT__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ChangesPackage.VALUE_ARGUMENT__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //ValueArgumentImpl diff --git a/solve/src/main/java/Changes/util/ChangesAdapterFactory.java b/solve/src/main/java/Changes/util/ChangesAdapterFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..3c439c38bf4679b1a83e44098c39e6d850e959b5 --- /dev/null +++ b/solve/src/main/java/Changes/util/ChangesAdapterFactory.java @@ -0,0 +1,678 @@ +/** + */ +package Changes.util; + +import Changes.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see Changes.ChangesPackage + * @generated + */ +public class ChangesAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ChangesPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ChangesAdapterFactory() { + if (modelPackage == null) { + modelPackage = ChangesPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ChangesSwitch<Adapter> modelSwitch = + new ChangesSwitch<Adapter>() { + @Override + public Adapter caseModelChangeSet(ModelChangeSet object) { + return createModelChangeSetAdapter(); + } + @Override + public Adapter caseModelChange(ModelChange object) { + return createModelChangeAdapter(); + } + @Override + public Adapter caseElementaryChange(ElementaryChange object) { + return createElementaryChangeAdapter(); + } + @Override + public Adapter caseChangeTransaction(ChangeTransaction object) { + return createChangeTransactionAdapter(); + } + @Override + public Adapter caseCompositionChange(CompositionChange object) { + return createCompositionChangeAdapter(); + } + @Override + public Adapter caseAssociationChange(AssociationChange object) { + return createAssociationChangeAdapter(); + } + @Override + public Adapter caseAttributeChange(AttributeChange object) { + return createAttributeChangeAdapter(); + } + @Override + public Adapter caseAssociationCollectionDeletion(AssociationCollectionDeletion object) { + return createAssociationCollectionDeletionAdapter(); + } + @Override + public Adapter caseCompositionCollectionDeletion(CompositionCollectionDeletion object) { + return createCompositionCollectionDeletionAdapter(); + } + @Override + public Adapter caseAttributeCollectionDeletion(AttributeCollectionDeletion object) { + return createAttributeCollectionDeletionAdapter(); + } + @Override + public Adapter caseAssociationCollectionInsertion(AssociationCollectionInsertion object) { + return createAssociationCollectionInsertionAdapter(); + } + @Override + public Adapter caseCompositionCollectionInsertion(CompositionCollectionInsertion object) { + return createCompositionCollectionInsertionAdapter(); + } + @Override + public Adapter caseAttributeCollectionInsertion(AttributeCollectionInsertion object) { + return createAttributeCollectionInsertionAdapter(); + } + @Override + public Adapter caseAssociationCollectionReset(AssociationCollectionReset object) { + return createAssociationCollectionResetAdapter(); + } + @Override + public Adapter caseCompositionCollectionReset(CompositionCollectionReset object) { + return createCompositionCollectionResetAdapter(); + } + @Override + public Adapter caseAttributeCollectionReset(AttributeCollectionReset object) { + return createAttributeCollectionResetAdapter(); + } + @Override + public Adapter caseAssociationListDeletion(AssociationListDeletion object) { + return createAssociationListDeletionAdapter(); + } + @Override + public Adapter caseCompositionListDeletion(CompositionListDeletion object) { + return createCompositionListDeletionAdapter(); + } + @Override + public Adapter caseAttributeListDeletion(AttributeListDeletion object) { + return createAttributeListDeletionAdapter(); + } + @Override + public Adapter caseAssociationListInsertion(AssociationListInsertion object) { + return createAssociationListInsertionAdapter(); + } + @Override + public Adapter caseCompositionListInsertion(CompositionListInsertion object) { + return createCompositionListInsertionAdapter(); + } + @Override + public Adapter caseAttributeListInsertion(AttributeListInsertion object) { + return createAttributeListInsertionAdapter(); + } + @Override + public Adapter caseAttributePropertyChange(AttributePropertyChange object) { + return createAttributePropertyChangeAdapter(); + } + @Override + public Adapter caseAssociationPropertyChange(AssociationPropertyChange object) { + return createAssociationPropertyChangeAdapter(); + } + @Override + public Adapter caseCompositionPropertyChange(CompositionPropertyChange object) { + return createCompositionPropertyChangeAdapter(); + } + @Override + public Adapter caseCompositionMoveIntoProperty(CompositionMoveIntoProperty object) { + return createCompositionMoveIntoPropertyAdapter(); + } + @Override + public Adapter caseCompositionMoveToList(CompositionMoveToList object) { + return createCompositionMoveToListAdapter(); + } + @Override + public Adapter caseCompositionMoveToCollection(CompositionMoveToCollection object) { + return createCompositionMoveToCollectionAdapter(); + } + @Override + public Adapter caseOperationCall(OperationCall object) { + return createOperationCallAdapter(); + } + @Override + public Adapter caseOperationArgument(OperationArgument object) { + return createOperationArgumentAdapter(); + } + @Override + public Adapter caseValueArgument(ValueArgument object) { + return createValueArgumentAdapter(); + } + @Override + public Adapter caseReferenceArgument(ReferenceArgument object) { + return createReferenceArgumentAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link Changes.ModelChangeSet <em>Model Change Set</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.ModelChangeSet + * @generated + */ + public Adapter createModelChangeSetAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.ModelChange <em>Model Change</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.ModelChange + * @generated + */ + public Adapter createModelChangeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.ElementaryChange <em>Elementary Change</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.ElementaryChange + * @generated + */ + public Adapter createElementaryChangeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.ChangeTransaction <em>Change Transaction</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.ChangeTransaction + * @generated + */ + public Adapter createChangeTransactionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.CompositionChange <em>Composition Change</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.CompositionChange + * @generated + */ + public Adapter createCompositionChangeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.AssociationChange <em>Association Change</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.AssociationChange + * @generated + */ + public Adapter createAssociationChangeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.AttributeChange <em>Attribute Change</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.AttributeChange + * @generated + */ + public Adapter createAttributeChangeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.AssociationCollectionDeletion <em>Association Collection Deletion</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.AssociationCollectionDeletion + * @generated + */ + public Adapter createAssociationCollectionDeletionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.CompositionCollectionDeletion <em>Composition Collection Deletion</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.CompositionCollectionDeletion + * @generated + */ + public Adapter createCompositionCollectionDeletionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.AttributeCollectionDeletion <em>Attribute Collection Deletion</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.AttributeCollectionDeletion + * @generated + */ + public Adapter createAttributeCollectionDeletionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.AssociationCollectionInsertion <em>Association Collection Insertion</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.AssociationCollectionInsertion + * @generated + */ + public Adapter createAssociationCollectionInsertionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.CompositionCollectionInsertion <em>Composition Collection Insertion</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.CompositionCollectionInsertion + * @generated + */ + public Adapter createCompositionCollectionInsertionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.AttributeCollectionInsertion <em>Attribute Collection Insertion</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.AttributeCollectionInsertion + * @generated + */ + public Adapter createAttributeCollectionInsertionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.AssociationCollectionReset <em>Association Collection Reset</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.AssociationCollectionReset + * @generated + */ + public Adapter createAssociationCollectionResetAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.CompositionCollectionReset <em>Composition Collection Reset</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.CompositionCollectionReset + * @generated + */ + public Adapter createCompositionCollectionResetAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.AttributeCollectionReset <em>Attribute Collection Reset</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.AttributeCollectionReset + * @generated + */ + public Adapter createAttributeCollectionResetAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.AssociationListDeletion <em>Association List Deletion</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.AssociationListDeletion + * @generated + */ + public Adapter createAssociationListDeletionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.CompositionListDeletion <em>Composition List Deletion</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.CompositionListDeletion + * @generated + */ + public Adapter createCompositionListDeletionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.AttributeListDeletion <em>Attribute List Deletion</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.AttributeListDeletion + * @generated + */ + public Adapter createAttributeListDeletionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.AssociationListInsertion <em>Association List Insertion</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.AssociationListInsertion + * @generated + */ + public Adapter createAssociationListInsertionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.CompositionListInsertion <em>Composition List Insertion</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.CompositionListInsertion + * @generated + */ + public Adapter createCompositionListInsertionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.AttributeListInsertion <em>Attribute List Insertion</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.AttributeListInsertion + * @generated + */ + public Adapter createAttributeListInsertionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.AttributePropertyChange <em>Attribute Property Change</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.AttributePropertyChange + * @generated + */ + public Adapter createAttributePropertyChangeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.AssociationPropertyChange <em>Association Property Change</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.AssociationPropertyChange + * @generated + */ + public Adapter createAssociationPropertyChangeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.CompositionPropertyChange <em>Composition Property Change</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.CompositionPropertyChange + * @generated + */ + public Adapter createCompositionPropertyChangeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.CompositionMoveIntoProperty <em>Composition Move Into Property</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.CompositionMoveIntoProperty + * @generated + */ + public Adapter createCompositionMoveIntoPropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.CompositionMoveToList <em>Composition Move To List</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.CompositionMoveToList + * @generated + */ + public Adapter createCompositionMoveToListAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.CompositionMoveToCollection <em>Composition Move To Collection</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.CompositionMoveToCollection + * @generated + */ + public Adapter createCompositionMoveToCollectionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.OperationCall <em>Operation Call</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.OperationCall + * @generated + */ + public Adapter createOperationCallAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.OperationArgument <em>Operation Argument</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.OperationArgument + * @generated + */ + public Adapter createOperationArgumentAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.ValueArgument <em>Value Argument</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.ValueArgument + * @generated + */ + public Adapter createValueArgumentAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link Changes.ReferenceArgument <em>Reference Argument</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see Changes.ReferenceArgument + * @generated + */ + public Adapter createReferenceArgumentAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ChangesAdapterFactory diff --git a/solve/src/main/java/Changes/util/ChangesSwitch.java b/solve/src/main/java/Changes/util/ChangesSwitch.java new file mode 100644 index 0000000000000000000000000000000000000000..5cfa953ad9ce1558b44d171701f7f1f70fb1c84d --- /dev/null +++ b/solve/src/main/java/Changes/util/ChangesSwitch.java @@ -0,0 +1,832 @@ +/** + */ +package Changes.util; + +import Changes.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * <!-- end-user-doc --> + * @see Changes.ChangesPackage + * @generated + */ +public class ChangesSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ChangesPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ChangesSwitch() { + if (modelPackage == null) { + modelPackage = ChangesPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ChangesPackage.MODEL_CHANGE_SET: { + ModelChangeSet modelChangeSet = (ModelChangeSet)theEObject; + T result = caseModelChangeSet(modelChangeSet); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.MODEL_CHANGE: { + ModelChange modelChange = (ModelChange)theEObject; + T result = caseModelChange(modelChange); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ELEMENTARY_CHANGE: { + ElementaryChange elementaryChange = (ElementaryChange)theEObject; + T result = caseElementaryChange(elementaryChange); + if (result == null) result = caseModelChange(elementaryChange); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.CHANGE_TRANSACTION: { + ChangeTransaction changeTransaction = (ChangeTransaction)theEObject; + T result = caseChangeTransaction(changeTransaction); + if (result == null) result = caseModelChange(changeTransaction); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.COMPOSITION_CHANGE: { + CompositionChange compositionChange = (CompositionChange)theEObject; + T result = caseCompositionChange(compositionChange); + if (result == null) result = caseElementaryChange(compositionChange); + if (result == null) result = caseModelChange(compositionChange); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ASSOCIATION_CHANGE: { + AssociationChange associationChange = (AssociationChange)theEObject; + T result = caseAssociationChange(associationChange); + if (result == null) result = caseElementaryChange(associationChange); + if (result == null) result = caseModelChange(associationChange); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ATTRIBUTE_CHANGE: { + AttributeChange attributeChange = (AttributeChange)theEObject; + T result = caseAttributeChange(attributeChange); + if (result == null) result = caseElementaryChange(attributeChange); + if (result == null) result = caseModelChange(attributeChange); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ASSOCIATION_COLLECTION_DELETION: { + AssociationCollectionDeletion associationCollectionDeletion = (AssociationCollectionDeletion)theEObject; + T result = caseAssociationCollectionDeletion(associationCollectionDeletion); + if (result == null) result = caseAssociationChange(associationCollectionDeletion); + if (result == null) result = caseElementaryChange(associationCollectionDeletion); + if (result == null) result = caseModelChange(associationCollectionDeletion); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.COMPOSITION_COLLECTION_DELETION: { + CompositionCollectionDeletion compositionCollectionDeletion = (CompositionCollectionDeletion)theEObject; + T result = caseCompositionCollectionDeletion(compositionCollectionDeletion); + if (result == null) result = caseCompositionChange(compositionCollectionDeletion); + if (result == null) result = caseElementaryChange(compositionCollectionDeletion); + if (result == null) result = caseModelChange(compositionCollectionDeletion); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ATTRIBUTE_COLLECTION_DELETION: { + AttributeCollectionDeletion attributeCollectionDeletion = (AttributeCollectionDeletion)theEObject; + T result = caseAttributeCollectionDeletion(attributeCollectionDeletion); + if (result == null) result = caseAttributeChange(attributeCollectionDeletion); + if (result == null) result = caseElementaryChange(attributeCollectionDeletion); + if (result == null) result = caseModelChange(attributeCollectionDeletion); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ASSOCIATION_COLLECTION_INSERTION: { + AssociationCollectionInsertion associationCollectionInsertion = (AssociationCollectionInsertion)theEObject; + T result = caseAssociationCollectionInsertion(associationCollectionInsertion); + if (result == null) result = caseAssociationChange(associationCollectionInsertion); + if (result == null) result = caseElementaryChange(associationCollectionInsertion); + if (result == null) result = caseModelChange(associationCollectionInsertion); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.COMPOSITION_COLLECTION_INSERTION: { + CompositionCollectionInsertion compositionCollectionInsertion = (CompositionCollectionInsertion)theEObject; + T result = caseCompositionCollectionInsertion(compositionCollectionInsertion); + if (result == null) result = caseCompositionChange(compositionCollectionInsertion); + if (result == null) result = caseElementaryChange(compositionCollectionInsertion); + if (result == null) result = caseModelChange(compositionCollectionInsertion); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ATTRIBUTE_COLLECTION_INSERTION: { + AttributeCollectionInsertion attributeCollectionInsertion = (AttributeCollectionInsertion)theEObject; + T result = caseAttributeCollectionInsertion(attributeCollectionInsertion); + if (result == null) result = caseAttributeChange(attributeCollectionInsertion); + if (result == null) result = caseElementaryChange(attributeCollectionInsertion); + if (result == null) result = caseModelChange(attributeCollectionInsertion); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ASSOCIATION_COLLECTION_RESET: { + AssociationCollectionReset associationCollectionReset = (AssociationCollectionReset)theEObject; + T result = caseAssociationCollectionReset(associationCollectionReset); + if (result == null) result = caseAssociationChange(associationCollectionReset); + if (result == null) result = caseElementaryChange(associationCollectionReset); + if (result == null) result = caseModelChange(associationCollectionReset); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.COMPOSITION_COLLECTION_RESET: { + CompositionCollectionReset compositionCollectionReset = (CompositionCollectionReset)theEObject; + T result = caseCompositionCollectionReset(compositionCollectionReset); + if (result == null) result = caseCompositionChange(compositionCollectionReset); + if (result == null) result = caseElementaryChange(compositionCollectionReset); + if (result == null) result = caseModelChange(compositionCollectionReset); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ATTRIBUTE_COLLECTION_RESET: { + AttributeCollectionReset attributeCollectionReset = (AttributeCollectionReset)theEObject; + T result = caseAttributeCollectionReset(attributeCollectionReset); + if (result == null) result = caseAttributeChange(attributeCollectionReset); + if (result == null) result = caseElementaryChange(attributeCollectionReset); + if (result == null) result = caseModelChange(attributeCollectionReset); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ASSOCIATION_LIST_DELETION: { + AssociationListDeletion associationListDeletion = (AssociationListDeletion)theEObject; + T result = caseAssociationListDeletion(associationListDeletion); + if (result == null) result = caseAssociationChange(associationListDeletion); + if (result == null) result = caseElementaryChange(associationListDeletion); + if (result == null) result = caseModelChange(associationListDeletion); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.COMPOSITION_LIST_DELETION: { + CompositionListDeletion compositionListDeletion = (CompositionListDeletion)theEObject; + T result = caseCompositionListDeletion(compositionListDeletion); + if (result == null) result = caseCompositionChange(compositionListDeletion); + if (result == null) result = caseElementaryChange(compositionListDeletion); + if (result == null) result = caseModelChange(compositionListDeletion); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ATTRIBUTE_LIST_DELETION: { + AttributeListDeletion attributeListDeletion = (AttributeListDeletion)theEObject; + T result = caseAttributeListDeletion(attributeListDeletion); + if (result == null) result = caseAttributeChange(attributeListDeletion); + if (result == null) result = caseElementaryChange(attributeListDeletion); + if (result == null) result = caseModelChange(attributeListDeletion); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ASSOCIATION_LIST_INSERTION: { + AssociationListInsertion associationListInsertion = (AssociationListInsertion)theEObject; + T result = caseAssociationListInsertion(associationListInsertion); + if (result == null) result = caseAssociationChange(associationListInsertion); + if (result == null) result = caseElementaryChange(associationListInsertion); + if (result == null) result = caseModelChange(associationListInsertion); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.COMPOSITION_LIST_INSERTION: { + CompositionListInsertion compositionListInsertion = (CompositionListInsertion)theEObject; + T result = caseCompositionListInsertion(compositionListInsertion); + if (result == null) result = caseCompositionChange(compositionListInsertion); + if (result == null) result = caseElementaryChange(compositionListInsertion); + if (result == null) result = caseModelChange(compositionListInsertion); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ATTRIBUTE_LIST_INSERTION: { + AttributeListInsertion attributeListInsertion = (AttributeListInsertion)theEObject; + T result = caseAttributeListInsertion(attributeListInsertion); + if (result == null) result = caseAttributeChange(attributeListInsertion); + if (result == null) result = caseElementaryChange(attributeListInsertion); + if (result == null) result = caseModelChange(attributeListInsertion); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ATTRIBUTE_PROPERTY_CHANGE: { + AttributePropertyChange attributePropertyChange = (AttributePropertyChange)theEObject; + T result = caseAttributePropertyChange(attributePropertyChange); + if (result == null) result = caseAttributeChange(attributePropertyChange); + if (result == null) result = caseElementaryChange(attributePropertyChange); + if (result == null) result = caseModelChange(attributePropertyChange); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.ASSOCIATION_PROPERTY_CHANGE: { + AssociationPropertyChange associationPropertyChange = (AssociationPropertyChange)theEObject; + T result = caseAssociationPropertyChange(associationPropertyChange); + if (result == null) result = caseAssociationChange(associationPropertyChange); + if (result == null) result = caseElementaryChange(associationPropertyChange); + if (result == null) result = caseModelChange(associationPropertyChange); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.COMPOSITION_PROPERTY_CHANGE: { + CompositionPropertyChange compositionPropertyChange = (CompositionPropertyChange)theEObject; + T result = caseCompositionPropertyChange(compositionPropertyChange); + if (result == null) result = caseCompositionChange(compositionPropertyChange); + if (result == null) result = caseElementaryChange(compositionPropertyChange); + if (result == null) result = caseModelChange(compositionPropertyChange); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.COMPOSITION_MOVE_INTO_PROPERTY: { + CompositionMoveIntoProperty compositionMoveIntoProperty = (CompositionMoveIntoProperty)theEObject; + T result = caseCompositionMoveIntoProperty(compositionMoveIntoProperty); + if (result == null) result = caseCompositionChange(compositionMoveIntoProperty); + if (result == null) result = caseElementaryChange(compositionMoveIntoProperty); + if (result == null) result = caseModelChange(compositionMoveIntoProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.COMPOSITION_MOVE_TO_LIST: { + CompositionMoveToList compositionMoveToList = (CompositionMoveToList)theEObject; + T result = caseCompositionMoveToList(compositionMoveToList); + if (result == null) result = caseCompositionChange(compositionMoveToList); + if (result == null) result = caseElementaryChange(compositionMoveToList); + if (result == null) result = caseModelChange(compositionMoveToList); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.COMPOSITION_MOVE_TO_COLLECTION: { + CompositionMoveToCollection compositionMoveToCollection = (CompositionMoveToCollection)theEObject; + T result = caseCompositionMoveToCollection(compositionMoveToCollection); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.OPERATION_CALL: { + OperationCall operationCall = (OperationCall)theEObject; + T result = caseOperationCall(operationCall); + if (result == null) result = caseModelChange(operationCall); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.OPERATION_ARGUMENT: { + OperationArgument operationArgument = (OperationArgument)theEObject; + T result = caseOperationArgument(operationArgument); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.VALUE_ARGUMENT: { + ValueArgument valueArgument = (ValueArgument)theEObject; + T result = caseValueArgument(valueArgument); + if (result == null) result = caseOperationArgument(valueArgument); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ChangesPackage.REFERENCE_ARGUMENT: { + ReferenceArgument referenceArgument = (ReferenceArgument)theEObject; + T result = caseReferenceArgument(referenceArgument); + if (result == null) result = caseOperationArgument(referenceArgument); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Model Change Set</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Model Change Set</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseModelChangeSet(ModelChangeSet object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Model Change</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Model Change</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseModelChange(ModelChange object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Elementary Change</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Elementary Change</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseElementaryChange(ElementaryChange object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Change Transaction</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Change Transaction</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseChangeTransaction(ChangeTransaction object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Composition Change</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Composition Change</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompositionChange(CompositionChange object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Association Change</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Association Change</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAssociationChange(AssociationChange object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Attribute Change</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Attribute Change</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAttributeChange(AttributeChange object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Association Collection Deletion</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Association Collection Deletion</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAssociationCollectionDeletion(AssociationCollectionDeletion object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Composition Collection Deletion</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Composition Collection Deletion</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompositionCollectionDeletion(CompositionCollectionDeletion object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Attribute Collection Deletion</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Attribute Collection Deletion</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAttributeCollectionDeletion(AttributeCollectionDeletion object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Association Collection Insertion</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Association Collection Insertion</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAssociationCollectionInsertion(AssociationCollectionInsertion object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Composition Collection Insertion</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Composition Collection Insertion</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompositionCollectionInsertion(CompositionCollectionInsertion object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Attribute Collection Insertion</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Attribute Collection Insertion</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAttributeCollectionInsertion(AttributeCollectionInsertion object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Association Collection Reset</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Association Collection Reset</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAssociationCollectionReset(AssociationCollectionReset object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Composition Collection Reset</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Composition Collection Reset</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompositionCollectionReset(CompositionCollectionReset object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Attribute Collection Reset</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Attribute Collection Reset</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAttributeCollectionReset(AttributeCollectionReset object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Association List Deletion</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Association List Deletion</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAssociationListDeletion(AssociationListDeletion object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Composition List Deletion</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Composition List Deletion</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompositionListDeletion(CompositionListDeletion object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Attribute List Deletion</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Attribute List Deletion</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAttributeListDeletion(AttributeListDeletion object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Association List Insertion</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Association List Insertion</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAssociationListInsertion(AssociationListInsertion object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Composition List Insertion</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Composition List Insertion</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompositionListInsertion(CompositionListInsertion object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Attribute List Insertion</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Attribute List Insertion</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAttributeListInsertion(AttributeListInsertion object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Attribute Property Change</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Attribute Property Change</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAttributePropertyChange(AttributePropertyChange object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Association Property Change</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Association Property Change</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAssociationPropertyChange(AssociationPropertyChange object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Composition Property Change</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Composition Property Change</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompositionPropertyChange(CompositionPropertyChange object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Composition Move Into Property</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Composition Move Into Property</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompositionMoveIntoProperty(CompositionMoveIntoProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Composition Move To List</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Composition Move To List</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompositionMoveToList(CompositionMoveToList object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Composition Move To Collection</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Composition Move To Collection</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompositionMoveToCollection(CompositionMoveToCollection object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Operation Call</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Operation Call</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseOperationCall(OperationCall object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Operation Argument</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Operation Argument</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseOperationArgument(OperationArgument object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Value Argument</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Value Argument</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseValueArgument(ValueArgument object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Reference Argument</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Reference Argument</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseReferenceArgument(ReferenceArgument object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ChangesSwitch diff --git a/solve/src/main/java/SocialNetwork/Comment.java b/solve/src/main/java/SocialNetwork/Comment.java new file mode 100644 index 0000000000000000000000000000000000000000..7a2254006936c5715640a4d9bff7298dda40b7c1 --- /dev/null +++ b/solve/src/main/java/SocialNetwork/Comment.java @@ -0,0 +1,87 @@ +/** + */ +package SocialNetwork; + +import org.eclipse.emf.common.util.EList; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Comment</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link SocialNetwork.Comment#getCommented <em>Commented</em>}</li> + * <li>{@link SocialNetwork.Comment#getLikedBy <em>Liked By</em>}</li> + * <li>{@link SocialNetwork.Comment#getPost <em>Post</em>}</li> + * </ul> + * + * @see SocialNetwork.SocialNetworkPackage#getComment() + * @model + * @generated + */ +public interface Comment extends Submission { + /** + * Returns the value of the '<em><b>Commented</b></em>' container reference. + * It is bidirectional and its opposite is '{@link SocialNetwork.Submission#getComments <em>Comments</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Commented</em>' container reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Commented</em>' container reference. + * @see SocialNetwork.SocialNetworkPackage#getComment_Commented() + * @see SocialNetwork.Submission#getComments + * @model opposite="comments" required="true" transient="false" changeable="false" ordered="false" + * @generated + */ + Submission getCommented(); + + /** + * Returns the value of the '<em><b>Liked By</b></em>' reference list. + * The list contents are of type {@link SocialNetwork.User}. + * It is bidirectional and its opposite is '{@link SocialNetwork.User#getLikes <em>Likes</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Liked By</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Liked By</em>' reference list. + * @see SocialNetwork.SocialNetworkPackage#getComment_LikedBy() + * @see SocialNetwork.User#getLikes + * @model opposite="likes" ordered="false" + * @generated + */ + EList<User> getLikedBy(); + + /** + * Returns the value of the '<em><b>Post</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Post</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Post</em>' reference. + * @see #setPost(Post) + * @see SocialNetwork.SocialNetworkPackage#getComment_Post() + * @model required="true" ordered="false" + * @generated + */ + Post getPost(); + + /** + * Sets the value of the '{@link SocialNetwork.Comment#getPost <em>Post</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Post</em>' reference. + * @see #getPost() + * @generated + */ + void setPost(Post value); + +} // Comment diff --git a/solve/src/main/java/SocialNetwork/Post.java b/solve/src/main/java/SocialNetwork/Post.java new file mode 100644 index 0000000000000000000000000000000000000000..b4b8e41f91d89134c7acce3e25969aff5a5101f4 --- /dev/null +++ b/solve/src/main/java/SocialNetwork/Post.java @@ -0,0 +1,17 @@ +/** + */ +package SocialNetwork; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Post</b></em>'. + * <!-- end-user-doc --> + * + * + * @see SocialNetwork.SocialNetworkPackage#getPost() + * @model + * @generated + */ +public interface Post extends Submission { +} // Post diff --git a/solve/src/main/java/SocialNetwork/SocialNetworkFactory.java b/solve/src/main/java/SocialNetwork/SocialNetworkFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..aa5964e62ff47344bc48a47ee029a2c471075e4a --- /dev/null +++ b/solve/src/main/java/SocialNetwork/SocialNetworkFactory.java @@ -0,0 +1,69 @@ +/** + */ +package SocialNetwork; + +import org.eclipse.emf.ecore.EFactory; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see SocialNetwork.SocialNetworkPackage + * @generated + */ +public interface SocialNetworkFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + SocialNetworkFactory eINSTANCE = SocialNetwork.impl.SocialNetworkFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Post</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Post</em>'. + * @generated + */ + Post createPost(); + + /** + * Returns a new object of class '<em>Comment</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Comment</em>'. + * @generated + */ + Comment createComment(); + + /** + * Returns a new object of class '<em>User</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>User</em>'. + * @generated + */ + User createUser(); + + /** + * Returns a new object of class '<em>Root</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Root</em>'. + * @generated + */ + SocialNetworkRoot createSocialNetworkRoot(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + SocialNetworkPackage getSocialNetworkPackage(); + +} //SocialNetworkFactory diff --git a/solve/src/main/java/SocialNetwork/SocialNetworkPackage.java b/solve/src/main/java/SocialNetwork/SocialNetworkPackage.java new file mode 100644 index 0000000000000000000000000000000000000000..c7152793d57b11fabffe8c6ce40fe3986abd0b13 --- /dev/null +++ b/solve/src/main/java/SocialNetwork/SocialNetworkPackage.java @@ -0,0 +1,835 @@ +/** + */ +package SocialNetwork; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @see SocialNetwork.SocialNetworkFactory + * @model kind="package" + * @generated + */ +public interface SocialNetworkPackage extends EPackage { + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "SocialNetwork"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "https://www.transformation-tool-contest.eu/2018/social_media"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "social"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + SocialNetworkPackage eINSTANCE = SocialNetwork.impl.SocialNetworkPackageImpl.init(); + + /** + * The meta object id for the '{@link SocialNetwork.impl.SubmissionImpl <em>Submission</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see SocialNetwork.impl.SubmissionImpl + * @see SocialNetwork.impl.SocialNetworkPackageImpl#getSubmission() + * @generated + */ + int SUBMISSION = 0; + + /** + * The feature id for the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SUBMISSION__ID = 0; + + /** + * The feature id for the '<em><b>Timestamp</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SUBMISSION__TIMESTAMP = 1; + + /** + * The feature id for the '<em><b>Content</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SUBMISSION__CONTENT = 2; + + /** + * The feature id for the '<em><b>Submitter</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SUBMISSION__SUBMITTER = 3; + + /** + * The feature id for the '<em><b>Comments</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SUBMISSION__COMMENTS = 4; + + /** + * The number of structural features of the '<em>Submission</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SUBMISSION_FEATURE_COUNT = 5; + + /** + * The number of operations of the '<em>Submission</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SUBMISSION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link SocialNetwork.impl.PostImpl <em>Post</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see SocialNetwork.impl.PostImpl + * @see SocialNetwork.impl.SocialNetworkPackageImpl#getPost() + * @generated + */ + int POST = 1; + + /** + * The feature id for the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int POST__ID = SUBMISSION__ID; + + /** + * The feature id for the '<em><b>Timestamp</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int POST__TIMESTAMP = SUBMISSION__TIMESTAMP; + + /** + * The feature id for the '<em><b>Content</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int POST__CONTENT = SUBMISSION__CONTENT; + + /** + * The feature id for the '<em><b>Submitter</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int POST__SUBMITTER = SUBMISSION__SUBMITTER; + + /** + * The feature id for the '<em><b>Comments</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int POST__COMMENTS = SUBMISSION__COMMENTS; + + /** + * The number of structural features of the '<em>Post</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int POST_FEATURE_COUNT = SUBMISSION_FEATURE_COUNT + 0; + + /** + * The number of operations of the '<em>Post</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int POST_OPERATION_COUNT = SUBMISSION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link SocialNetwork.impl.CommentImpl <em>Comment</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see SocialNetwork.impl.CommentImpl + * @see SocialNetwork.impl.SocialNetworkPackageImpl#getComment() + * @generated + */ + int COMMENT = 2; + + /** + * The feature id for the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMENT__ID = SUBMISSION__ID; + + /** + * The feature id for the '<em><b>Timestamp</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMENT__TIMESTAMP = SUBMISSION__TIMESTAMP; + + /** + * The feature id for the '<em><b>Content</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMENT__CONTENT = SUBMISSION__CONTENT; + + /** + * The feature id for the '<em><b>Submitter</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMENT__SUBMITTER = SUBMISSION__SUBMITTER; + + /** + * The feature id for the '<em><b>Comments</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMENT__COMMENTS = SUBMISSION__COMMENTS; + + /** + * The feature id for the '<em><b>Commented</b></em>' container reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMENT__COMMENTED = SUBMISSION_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Liked By</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMENT__LIKED_BY = SUBMISSION_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Post</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMENT__POST = SUBMISSION_FEATURE_COUNT + 2; + + /** + * The number of structural features of the '<em>Comment</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMENT_FEATURE_COUNT = SUBMISSION_FEATURE_COUNT + 3; + + /** + * The number of operations of the '<em>Comment</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMENT_OPERATION_COUNT = SUBMISSION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link SocialNetwork.impl.UserImpl <em>User</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see SocialNetwork.impl.UserImpl + * @see SocialNetwork.impl.SocialNetworkPackageImpl#getUser() + * @generated + */ + int USER = 3; + + /** + * The feature id for the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER__ID = 0; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER__NAME = 1; + + /** + * The feature id for the '<em><b>Submissions</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER__SUBMISSIONS = 2; + + /** + * The feature id for the '<em><b>Likes</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER__LIKES = 3; + + /** + * The feature id for the '<em><b>Friends</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER__FRIENDS = 4; + + /** + * The number of structural features of the '<em>User</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER_FEATURE_COUNT = 5; + + /** + * The number of operations of the '<em>User</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link SocialNetwork.impl.SocialNetworkRootImpl <em>Root</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see SocialNetwork.impl.SocialNetworkRootImpl + * @see SocialNetwork.impl.SocialNetworkPackageImpl#getSocialNetworkRoot() + * @generated + */ + int SOCIAL_NETWORK_ROOT = 4; + + /** + * The feature id for the '<em><b>Posts</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SOCIAL_NETWORK_ROOT__POSTS = 0; + + /** + * The feature id for the '<em><b>Users</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SOCIAL_NETWORK_ROOT__USERS = 1; + + /** + * The number of structural features of the '<em>Root</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SOCIAL_NETWORK_ROOT_FEATURE_COUNT = 2; + + /** + * The number of operations of the '<em>Root</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SOCIAL_NETWORK_ROOT_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link SocialNetwork.Submission <em>Submission</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Submission</em>'. + * @see SocialNetwork.Submission + * @generated + */ + EClass getSubmission(); + + /** + * Returns the meta object for the attribute '{@link SocialNetwork.Submission#getId <em>Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Id</em>'. + * @see SocialNetwork.Submission#getId() + * @see #getSubmission() + * @generated + */ + EAttribute getSubmission_Id(); + + /** + * Returns the meta object for the attribute '{@link SocialNetwork.Submission#getTimestamp <em>Timestamp</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Timestamp</em>'. + * @see SocialNetwork.Submission#getTimestamp() + * @see #getSubmission() + * @generated + */ + EAttribute getSubmission_Timestamp(); + + /** + * Returns the meta object for the attribute '{@link SocialNetwork.Submission#getContent <em>Content</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Content</em>'. + * @see SocialNetwork.Submission#getContent() + * @see #getSubmission() + * @generated + */ + EAttribute getSubmission_Content(); + + /** + * Returns the meta object for the reference '{@link SocialNetwork.Submission#getSubmitter <em>Submitter</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Submitter</em>'. + * @see SocialNetwork.Submission#getSubmitter() + * @see #getSubmission() + * @generated + */ + EReference getSubmission_Submitter(); + + /** + * Returns the meta object for the containment reference list '{@link SocialNetwork.Submission#getComments <em>Comments</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Comments</em>'. + * @see SocialNetwork.Submission#getComments() + * @see #getSubmission() + * @generated + */ + EReference getSubmission_Comments(); + + /** + * Returns the meta object for class '{@link SocialNetwork.Post <em>Post</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Post</em>'. + * @see SocialNetwork.Post + * @generated + */ + EClass getPost(); + + /** + * Returns the meta object for class '{@link SocialNetwork.Comment <em>Comment</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Comment</em>'. + * @see SocialNetwork.Comment + * @generated + */ + EClass getComment(); + + /** + * Returns the meta object for the container reference '{@link SocialNetwork.Comment#getCommented <em>Commented</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the container reference '<em>Commented</em>'. + * @see SocialNetwork.Comment#getCommented() + * @see #getComment() + * @generated + */ + EReference getComment_Commented(); + + /** + * Returns the meta object for the reference list '{@link SocialNetwork.Comment#getLikedBy <em>Liked By</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference list '<em>Liked By</em>'. + * @see SocialNetwork.Comment#getLikedBy() + * @see #getComment() + * @generated + */ + EReference getComment_LikedBy(); + + /** + * Returns the meta object for the reference '{@link SocialNetwork.Comment#getPost <em>Post</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Post</em>'. + * @see SocialNetwork.Comment#getPost() + * @see #getComment() + * @generated + */ + EReference getComment_Post(); + + /** + * Returns the meta object for class '{@link SocialNetwork.User <em>User</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>User</em>'. + * @see SocialNetwork.User + * @generated + */ + EClass getUser(); + + /** + * Returns the meta object for the attribute '{@link SocialNetwork.User#getId <em>Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Id</em>'. + * @see SocialNetwork.User#getId() + * @see #getUser() + * @generated + */ + EAttribute getUser_Id(); + + /** + * Returns the meta object for the attribute '{@link SocialNetwork.User#getName <em>Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Name</em>'. + * @see SocialNetwork.User#getName() + * @see #getUser() + * @generated + */ + EAttribute getUser_Name(); + + /** + * Returns the meta object for the reference list '{@link SocialNetwork.User#getSubmissions <em>Submissions</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference list '<em>Submissions</em>'. + * @see SocialNetwork.User#getSubmissions() + * @see #getUser() + * @generated + */ + EReference getUser_Submissions(); + + /** + * Returns the meta object for the reference list '{@link SocialNetwork.User#getLikes <em>Likes</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference list '<em>Likes</em>'. + * @see SocialNetwork.User#getLikes() + * @see #getUser() + * @generated + */ + EReference getUser_Likes(); + + /** + * Returns the meta object for the reference list '{@link SocialNetwork.User#getFriends <em>Friends</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference list '<em>Friends</em>'. + * @see SocialNetwork.User#getFriends() + * @see #getUser() + * @generated + */ + EReference getUser_Friends(); + + /** + * Returns the meta object for class '{@link SocialNetwork.SocialNetworkRoot <em>Root</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Root</em>'. + * @see SocialNetwork.SocialNetworkRoot + * @generated + */ + EClass getSocialNetworkRoot(); + + /** + * Returns the meta object for the containment reference list '{@link SocialNetwork.SocialNetworkRoot#getPosts <em>Posts</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Posts</em>'. + * @see SocialNetwork.SocialNetworkRoot#getPosts() + * @see #getSocialNetworkRoot() + * @generated + */ + EReference getSocialNetworkRoot_Posts(); + + /** + * Returns the meta object for the containment reference list '{@link SocialNetwork.SocialNetworkRoot#getUsers <em>Users</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Users</em>'. + * @see SocialNetwork.SocialNetworkRoot#getUsers() + * @see #getSocialNetworkRoot() + * @generated + */ + EReference getSocialNetworkRoot_Users(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + SocialNetworkFactory getSocialNetworkFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link SocialNetwork.impl.SubmissionImpl <em>Submission</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see SocialNetwork.impl.SubmissionImpl + * @see SocialNetwork.impl.SocialNetworkPackageImpl#getSubmission() + * @generated + */ + EClass SUBMISSION = eINSTANCE.getSubmission(); + + /** + * The meta object literal for the '<em><b>Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute SUBMISSION__ID = eINSTANCE.getSubmission_Id(); + + /** + * The meta object literal for the '<em><b>Timestamp</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute SUBMISSION__TIMESTAMP = eINSTANCE.getSubmission_Timestamp(); + + /** + * The meta object literal for the '<em><b>Content</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute SUBMISSION__CONTENT = eINSTANCE.getSubmission_Content(); + + /** + * The meta object literal for the '<em><b>Submitter</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference SUBMISSION__SUBMITTER = eINSTANCE.getSubmission_Submitter(); + + /** + * The meta object literal for the '<em><b>Comments</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference SUBMISSION__COMMENTS = eINSTANCE.getSubmission_Comments(); + + /** + * The meta object literal for the '{@link SocialNetwork.impl.PostImpl <em>Post</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see SocialNetwork.impl.PostImpl + * @see SocialNetwork.impl.SocialNetworkPackageImpl#getPost() + * @generated + */ + EClass POST = eINSTANCE.getPost(); + + /** + * The meta object literal for the '{@link SocialNetwork.impl.CommentImpl <em>Comment</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see SocialNetwork.impl.CommentImpl + * @see SocialNetwork.impl.SocialNetworkPackageImpl#getComment() + * @generated + */ + EClass COMMENT = eINSTANCE.getComment(); + + /** + * The meta object literal for the '<em><b>Commented</b></em>' container reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMMENT__COMMENTED = eINSTANCE.getComment_Commented(); + + /** + * The meta object literal for the '<em><b>Liked By</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMMENT__LIKED_BY = eINSTANCE.getComment_LikedBy(); + + /** + * The meta object literal for the '<em><b>Post</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMMENT__POST = eINSTANCE.getComment_Post(); + + /** + * The meta object literal for the '{@link SocialNetwork.impl.UserImpl <em>User</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see SocialNetwork.impl.UserImpl + * @see SocialNetwork.impl.SocialNetworkPackageImpl#getUser() + * @generated + */ + EClass USER = eINSTANCE.getUser(); + + /** + * The meta object literal for the '<em><b>Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute USER__ID = eINSTANCE.getUser_Id(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute USER__NAME = eINSTANCE.getUser_Name(); + + /** + * The meta object literal for the '<em><b>Submissions</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference USER__SUBMISSIONS = eINSTANCE.getUser_Submissions(); + + /** + * The meta object literal for the '<em><b>Likes</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference USER__LIKES = eINSTANCE.getUser_Likes(); + + /** + * The meta object literal for the '<em><b>Friends</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference USER__FRIENDS = eINSTANCE.getUser_Friends(); + + /** + * The meta object literal for the '{@link SocialNetwork.impl.SocialNetworkRootImpl <em>Root</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see SocialNetwork.impl.SocialNetworkRootImpl + * @see SocialNetwork.impl.SocialNetworkPackageImpl#getSocialNetworkRoot() + * @generated + */ + EClass SOCIAL_NETWORK_ROOT = eINSTANCE.getSocialNetworkRoot(); + + /** + * The meta object literal for the '<em><b>Posts</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference SOCIAL_NETWORK_ROOT__POSTS = eINSTANCE.getSocialNetworkRoot_Posts(); + + /** + * The meta object literal for the '<em><b>Users</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference SOCIAL_NETWORK_ROOT__USERS = eINSTANCE.getSocialNetworkRoot_Users(); + + } + +} //SocialNetworkPackage diff --git a/solve/src/main/java/SocialNetwork/SocialNetworkRoot.java b/solve/src/main/java/SocialNetwork/SocialNetworkRoot.java new file mode 100644 index 0000000000000000000000000000000000000000..573d4154ccc0d5958b6d6cb86f8a453cd4817a70 --- /dev/null +++ b/solve/src/main/java/SocialNetwork/SocialNetworkRoot.java @@ -0,0 +1,59 @@ +/** + */ +package SocialNetwork; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Root</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link SocialNetwork.SocialNetworkRoot#getPosts <em>Posts</em>}</li> + * <li>{@link SocialNetwork.SocialNetworkRoot#getUsers <em>Users</em>}</li> + * </ul> + * + * @see SocialNetwork.SocialNetworkPackage#getSocialNetworkRoot() + * @model + * @generated + */ +public interface SocialNetworkRoot extends EObject { + /** + * Returns the value of the '<em><b>Posts</b></em>' containment reference list. + * The list contents are of type {@link SocialNetwork.Post}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Posts</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Posts</em>' containment reference list. + * @see SocialNetwork.SocialNetworkPackage#getSocialNetworkRoot_Posts() + * @model containment="true" ordered="false" + * @generated + */ + EList<Post> getPosts(); + + /** + * Returns the value of the '<em><b>Users</b></em>' containment reference list. + * The list contents are of type {@link SocialNetwork.User}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Users</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Users</em>' containment reference list. + * @see SocialNetwork.SocialNetworkPackage#getSocialNetworkRoot_Users() + * @model containment="true" ordered="false" + * @generated + */ + EList<User> getUsers(); + +} // SocialNetworkRoot diff --git a/solve/src/main/java/SocialNetwork/Submission.java b/solve/src/main/java/SocialNetwork/Submission.java new file mode 100644 index 0000000000000000000000000000000000000000..530d99cdd8c6bdf47375ab97d2eecfaef22a977b --- /dev/null +++ b/solve/src/main/java/SocialNetwork/Submission.java @@ -0,0 +1,156 @@ +/** + */ +package SocialNetwork; + +import java.util.Date; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Submission</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link SocialNetwork.Submission#getId <em>Id</em>}</li> + * <li>{@link SocialNetwork.Submission#getTimestamp <em>Timestamp</em>}</li> + * <li>{@link SocialNetwork.Submission#getContent <em>Content</em>}</li> + * <li>{@link SocialNetwork.Submission#getSubmitter <em>Submitter</em>}</li> + * <li>{@link SocialNetwork.Submission#getComments <em>Comments</em>}</li> + * </ul> + * + * @see SocialNetwork.SocialNetworkPackage#getSubmission() + * @model abstract="true" + * @generated + */ +public interface Submission extends EObject { + /** + * Returns the value of the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Id</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Id</em>' attribute. + * @see #setId(String) + * @see SocialNetwork.SocialNetworkPackage#getSubmission_Id() + * @model unique="false" id="true" required="true" ordered="false" + * @generated + */ + String getId(); + + /** + * Sets the value of the '{@link SocialNetwork.Submission#getId <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Id</em>' attribute. + * @see #getId() + * @generated + */ + void setId(String value); + + /** + * Returns the value of the '<em><b>Timestamp</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Timestamp</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Timestamp</em>' attribute. + * @see #setTimestamp(Date) + * @see SocialNetwork.SocialNetworkPackage#getSubmission_Timestamp() + * @model unique="false" required="true" ordered="false" + * @generated + */ + Date getTimestamp(); + + /** + * Sets the value of the '{@link SocialNetwork.Submission#getTimestamp <em>Timestamp</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Timestamp</em>' attribute. + * @see #getTimestamp() + * @generated + */ + void setTimestamp(Date value); + + /** + * Returns the value of the '<em><b>Content</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Content</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Content</em>' attribute. + * @see #setContent(String) + * @see SocialNetwork.SocialNetworkPackage#getSubmission_Content() + * @model unique="false" required="true" ordered="false" + * @generated + */ + String getContent(); + + /** + * Sets the value of the '{@link SocialNetwork.Submission#getContent <em>Content</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Content</em>' attribute. + * @see #getContent() + * @generated + */ + void setContent(String value); + + /** + * Returns the value of the '<em><b>Submitter</b></em>' reference. + * It is bidirectional and its opposite is '{@link SocialNetwork.User#getSubmissions <em>Submissions</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Submitter</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Submitter</em>' reference. + * @see #setSubmitter(User) + * @see SocialNetwork.SocialNetworkPackage#getSubmission_Submitter() + * @see SocialNetwork.User#getSubmissions + * @model opposite="submissions" required="true" ordered="false" + * @generated + */ + User getSubmitter(); + + /** + * Sets the value of the '{@link SocialNetwork.Submission#getSubmitter <em>Submitter</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Submitter</em>' reference. + * @see #getSubmitter() + * @generated + */ + void setSubmitter(User value); + + /** + * Returns the value of the '<em><b>Comments</b></em>' containment reference list. + * The list contents are of type {@link SocialNetwork.Comment}. + * It is bidirectional and its opposite is '{@link SocialNetwork.Comment#getCommented <em>Commented</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Comments</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Comments</em>' containment reference list. + * @see SocialNetwork.SocialNetworkPackage#getSubmission_Comments() + * @see SocialNetwork.Comment#getCommented + * @model opposite="commented" containment="true" ordered="false" + * @generated + */ + EList<Comment> getComments(); + +} // Submission diff --git a/solve/src/main/java/SocialNetwork/User.java b/solve/src/main/java/SocialNetwork/User.java new file mode 100644 index 0000000000000000000000000000000000000000..e09e214b501b01baf40855e6f8e95d590fa0ad4e --- /dev/null +++ b/solve/src/main/java/SocialNetwork/User.java @@ -0,0 +1,134 @@ +/** + */ +package SocialNetwork; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>User</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link SocialNetwork.User#getId <em>Id</em>}</li> + * <li>{@link SocialNetwork.User#getName <em>Name</em>}</li> + * <li>{@link SocialNetwork.User#getSubmissions <em>Submissions</em>}</li> + * <li>{@link SocialNetwork.User#getLikes <em>Likes</em>}</li> + * <li>{@link SocialNetwork.User#getFriends <em>Friends</em>}</li> + * </ul> + * + * @see SocialNetwork.SocialNetworkPackage#getUser() + * @model + * @generated + */ +public interface User extends EObject { + /** + * Returns the value of the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Id</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Id</em>' attribute. + * @see #setId(String) + * @see SocialNetwork.SocialNetworkPackage#getUser_Id() + * @model unique="false" id="true" required="true" ordered="false" + * @generated + */ + String getId(); + + /** + * Sets the value of the '{@link SocialNetwork.User#getId <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Id</em>' attribute. + * @see #getId() + * @generated + */ + void setId(String value); + + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see SocialNetwork.SocialNetworkPackage#getUser_Name() + * @model unique="false" required="true" ordered="false" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link SocialNetwork.User#getName <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Submissions</b></em>' reference list. + * The list contents are of type {@link SocialNetwork.Submission}. + * It is bidirectional and its opposite is '{@link SocialNetwork.Submission#getSubmitter <em>Submitter</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Submissions</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Submissions</em>' reference list. + * @see SocialNetwork.SocialNetworkPackage#getUser_Submissions() + * @see SocialNetwork.Submission#getSubmitter + * @model opposite="submitter" ordered="false" + * @generated + */ + EList<Submission> getSubmissions(); + + /** + * Returns the value of the '<em><b>Likes</b></em>' reference list. + * The list contents are of type {@link SocialNetwork.Comment}. + * It is bidirectional and its opposite is '{@link SocialNetwork.Comment#getLikedBy <em>Liked By</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Likes</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Likes</em>' reference list. + * @see SocialNetwork.SocialNetworkPackage#getUser_Likes() + * @see SocialNetwork.Comment#getLikedBy + * @model opposite="likedBy" ordered="false" + * @generated + */ + EList<Comment> getLikes(); + + /** + * Returns the value of the '<em><b>Friends</b></em>' reference list. + * The list contents are of type {@link SocialNetwork.User}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Friends</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Friends</em>' reference list. + * @see SocialNetwork.SocialNetworkPackage#getUser_Friends() + * @model ordered="false" + * @generated + */ + EList<User> getFriends(); + +} // User diff --git a/solve/src/main/java/SocialNetwork/impl/CommentImpl.java b/solve/src/main/java/SocialNetwork/impl/CommentImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..a0a35cb120d7d1c283c3d38dea07c9e052ef5796 --- /dev/null +++ b/solve/src/main/java/SocialNetwork/impl/CommentImpl.java @@ -0,0 +1,265 @@ +/** + */ +package SocialNetwork.impl; + +import SocialNetwork.Comment; +import SocialNetwork.Post; +import SocialNetwork.SocialNetworkPackage; +import SocialNetwork.Submission; +import SocialNetwork.User; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Comment</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link SocialNetwork.impl.CommentImpl#getCommented <em>Commented</em>}</li> + * <li>{@link SocialNetwork.impl.CommentImpl#getLikedBy <em>Liked By</em>}</li> + * <li>{@link SocialNetwork.impl.CommentImpl#getPost <em>Post</em>}</li> + * </ul> + * + * @generated + */ +public class CommentImpl extends SubmissionImpl implements Comment { + /** + * The cached value of the '{@link #getLikedBy() <em>Liked By</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLikedBy() + * @generated + * @ordered + */ + protected EList<User> likedBy; + + /** + * The cached value of the '{@link #getPost() <em>Post</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPost() + * @generated + * @ordered + */ + protected Post post; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CommentImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return SocialNetworkPackage.Literals.COMMENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Submission getCommented() { + if (eContainerFeatureID() != SocialNetworkPackage.COMMENT__COMMENTED) return null; + return (Submission)eInternalContainer(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<User> getLikedBy() { + if (likedBy == null) { + likedBy = new EObjectWithInverseResolvingEList.ManyInverse<User>(User.class, this, SocialNetworkPackage.COMMENT__LIKED_BY, SocialNetworkPackage.USER__LIKES); + } + return likedBy; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Post getPost() { + if (post != null && post.eIsProxy()) { + InternalEObject oldPost = (InternalEObject)post; + post = (Post)eResolveProxy(oldPost); + if (post != oldPost) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, SocialNetworkPackage.COMMENT__POST, oldPost, post)); + } + } + return post; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Post basicGetPost() { + return post; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPost(Post newPost) { + Post oldPost = post; + post = newPost; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SocialNetworkPackage.COMMENT__POST, oldPost, post)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SocialNetworkPackage.COMMENT__COMMENTED: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return eBasicSetContainer(otherEnd, SocialNetworkPackage.COMMENT__COMMENTED, msgs); + case SocialNetworkPackage.COMMENT__LIKED_BY: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getLikedBy()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SocialNetworkPackage.COMMENT__COMMENTED: + return eBasicSetContainer(null, SocialNetworkPackage.COMMENT__COMMENTED, msgs); + case SocialNetworkPackage.COMMENT__LIKED_BY: + return ((InternalEList<?>)getLikedBy()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case SocialNetworkPackage.COMMENT__COMMENTED: + return eInternalContainer().eInverseRemove(this, SocialNetworkPackage.SUBMISSION__COMMENTS, Submission.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SocialNetworkPackage.COMMENT__COMMENTED: + return getCommented(); + case SocialNetworkPackage.COMMENT__LIKED_BY: + return getLikedBy(); + case SocialNetworkPackage.COMMENT__POST: + if (resolve) return getPost(); + return basicGetPost(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SocialNetworkPackage.COMMENT__LIKED_BY: + getLikedBy().clear(); + getLikedBy().addAll((Collection<? extends User>)newValue); + return; + case SocialNetworkPackage.COMMENT__POST: + setPost((Post)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SocialNetworkPackage.COMMENT__LIKED_BY: + getLikedBy().clear(); + return; + case SocialNetworkPackage.COMMENT__POST: + setPost((Post)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SocialNetworkPackage.COMMENT__COMMENTED: + return getCommented() != null; + case SocialNetworkPackage.COMMENT__LIKED_BY: + return likedBy != null && !likedBy.isEmpty(); + case SocialNetworkPackage.COMMENT__POST: + return post != null; + } + return super.eIsSet(featureID); + } + +} //CommentImpl diff --git a/solve/src/main/java/SocialNetwork/impl/PostImpl.java b/solve/src/main/java/SocialNetwork/impl/PostImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..bbb40c3d2a4012551eec496793ce911a8ba98492 --- /dev/null +++ b/solve/src/main/java/SocialNetwork/impl/PostImpl.java @@ -0,0 +1,37 @@ +/** + */ +package SocialNetwork.impl; + +import SocialNetwork.Post; +import SocialNetwork.SocialNetworkPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Post</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class PostImpl extends SubmissionImpl implements Post { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected PostImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return SocialNetworkPackage.Literals.POST; + } + +} //PostImpl diff --git a/solve/src/main/java/SocialNetwork/impl/SocialNetworkFactoryImpl.java b/solve/src/main/java/SocialNetwork/impl/SocialNetworkFactoryImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..69525e15298272921181cd5000a90cb3213781c2 --- /dev/null +++ b/solve/src/main/java/SocialNetwork/impl/SocialNetworkFactoryImpl.java @@ -0,0 +1,128 @@ +/** + */ +package SocialNetwork.impl; + +import SocialNetwork.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class SocialNetworkFactoryImpl extends EFactoryImpl implements SocialNetworkFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static SocialNetworkFactory init() { + try { + SocialNetworkFactory theSocialNetworkFactory = (SocialNetworkFactory)EPackage.Registry.INSTANCE.getEFactory(SocialNetworkPackage.eNS_URI); + if (theSocialNetworkFactory != null) { + return theSocialNetworkFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new SocialNetworkFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SocialNetworkFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case SocialNetworkPackage.POST: return createPost(); + case SocialNetworkPackage.COMMENT: return createComment(); + case SocialNetworkPackage.USER: return createUser(); + case SocialNetworkPackage.SOCIAL_NETWORK_ROOT: return createSocialNetworkRoot(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Post createPost() { + PostImpl post = new PostImpl(); + return post; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Comment createComment() { + CommentImpl comment = new CommentImpl(); + return comment; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public User createUser() { + UserImpl user = new UserImpl(); + return user; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SocialNetworkRoot createSocialNetworkRoot() { + SocialNetworkRootImpl socialNetworkRoot = new SocialNetworkRootImpl(); + return socialNetworkRoot; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SocialNetworkPackage getSocialNetworkPackage() { + return (SocialNetworkPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static SocialNetworkPackage getPackage() { + return SocialNetworkPackage.eINSTANCE; + } + +} //SocialNetworkFactoryImpl diff --git a/solve/src/main/java/SocialNetwork/impl/SocialNetworkPackageImpl.java b/solve/src/main/java/SocialNetwork/impl/SocialNetworkPackageImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..3ffbe5d66adc7c5bca958d1f9afbe8e92e8a1035 --- /dev/null +++ b/solve/src/main/java/SocialNetwork/impl/SocialNetworkPackageImpl.java @@ -0,0 +1,418 @@ +/** + */ +package SocialNetwork.impl; + +import SocialNetwork.Comment; +import SocialNetwork.Post; +import SocialNetwork.SocialNetworkFactory; +import SocialNetwork.SocialNetworkPackage; +import SocialNetwork.SocialNetworkRoot; +import SocialNetwork.Submission; +import SocialNetwork.User; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class SocialNetworkPackageImpl extends EPackageImpl implements SocialNetworkPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass submissionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass postEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass commentEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass userEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass socialNetworkRootEClass = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see SocialNetwork.SocialNetworkPackage#eNS_URI + * @see #init() + * @generated + */ + private SocialNetworkPackageImpl() { + super(eNS_URI, SocialNetworkFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>This method is used to initialize {@link SocialNetworkPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static SocialNetworkPackage init() { + if (isInited) return (SocialNetworkPackage)EPackage.Registry.INSTANCE.getEPackage(SocialNetworkPackage.eNS_URI); + + // Obtain or create and register package + SocialNetworkPackageImpl theSocialNetworkPackage = (SocialNetworkPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SocialNetworkPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SocialNetworkPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theSocialNetworkPackage.createPackageContents(); + + // Initialize created meta-data + theSocialNetworkPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theSocialNetworkPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(SocialNetworkPackage.eNS_URI, theSocialNetworkPackage); + return theSocialNetworkPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getSubmission() { + return submissionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getSubmission_Id() { + return (EAttribute)submissionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getSubmission_Timestamp() { + return (EAttribute)submissionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getSubmission_Content() { + return (EAttribute)submissionEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getSubmission_Submitter() { + return (EReference)submissionEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getSubmission_Comments() { + return (EReference)submissionEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getPost() { + return postEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getComment() { + return commentEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getComment_Commented() { + return (EReference)commentEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getComment_LikedBy() { + return (EReference)commentEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getComment_Post() { + return (EReference)commentEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getUser() { + return userEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getUser_Id() { + return (EAttribute)userEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getUser_Name() { + return (EAttribute)userEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getUser_Submissions() { + return (EReference)userEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getUser_Likes() { + return (EReference)userEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getUser_Friends() { + return (EReference)userEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getSocialNetworkRoot() { + return socialNetworkRootEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getSocialNetworkRoot_Posts() { + return (EReference)socialNetworkRootEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getSocialNetworkRoot_Users() { + return (EReference)socialNetworkRootEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SocialNetworkFactory getSocialNetworkFactory() { + return (SocialNetworkFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + submissionEClass = createEClass(SUBMISSION); + createEAttribute(submissionEClass, SUBMISSION__ID); + createEAttribute(submissionEClass, SUBMISSION__TIMESTAMP); + createEAttribute(submissionEClass, SUBMISSION__CONTENT); + createEReference(submissionEClass, SUBMISSION__SUBMITTER); + createEReference(submissionEClass, SUBMISSION__COMMENTS); + + postEClass = createEClass(POST); + + commentEClass = createEClass(COMMENT); + createEReference(commentEClass, COMMENT__COMMENTED); + createEReference(commentEClass, COMMENT__LIKED_BY); + createEReference(commentEClass, COMMENT__POST); + + userEClass = createEClass(USER); + createEAttribute(userEClass, USER__ID); + createEAttribute(userEClass, USER__NAME); + createEReference(userEClass, USER__SUBMISSIONS); + createEReference(userEClass, USER__LIKES); + createEReference(userEClass, USER__FRIENDS); + + socialNetworkRootEClass = createEClass(SOCIAL_NETWORK_ROOT); + createEReference(socialNetworkRootEClass, SOCIAL_NETWORK_ROOT__POSTS); + createEReference(socialNetworkRootEClass, SOCIAL_NETWORK_ROOT__USERS); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + postEClass.getESuperTypes().add(this.getSubmission()); + commentEClass.getESuperTypes().add(this.getSubmission()); + + // Initialize classes, features, and operations; add parameters + initEClass(submissionEClass, Submission.class, "Submission", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSubmission_Id(), ecorePackage.getEString(), "id", null, 1, 1, Submission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEAttribute(getSubmission_Timestamp(), ecorePackage.getEDate(), "timestamp", null, 1, 1, Submission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEAttribute(getSubmission_Content(), ecorePackage.getEString(), "content", null, 1, 1, Submission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getSubmission_Submitter(), this.getUser(), this.getUser_Submissions(), "submitter", null, 1, 1, Submission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getSubmission_Comments(), this.getComment(), this.getComment_Commented(), "comments", null, 0, -1, Submission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(postEClass, Post.class, "Post", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(commentEClass, Comment.class, "Comment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getComment_Commented(), this.getSubmission(), this.getSubmission_Comments(), "commented", null, 1, 1, Comment.class, !IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getComment_LikedBy(), this.getUser(), this.getUser_Likes(), "likedBy", null, 0, -1, Comment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getComment_Post(), this.getPost(), null, "post", null, 1, 1, Comment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(userEClass, User.class, "User", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getUser_Id(), ecorePackage.getEString(), "id", null, 1, 1, User.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEAttribute(getUser_Name(), ecorePackage.getEString(), "name", null, 1, 1, User.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getUser_Submissions(), this.getSubmission(), this.getSubmission_Submitter(), "submissions", null, 0, -1, User.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getUser_Likes(), this.getComment(), this.getComment_LikedBy(), "likes", null, 0, -1, User.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getUser_Friends(), this.getUser(), null, "friends", null, 0, -1, User.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(socialNetworkRootEClass, SocialNetworkRoot.class, "SocialNetworkRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getSocialNetworkRoot_Posts(), this.getPost(), null, "posts", null, 0, -1, SocialNetworkRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getSocialNetworkRoot_Users(), this.getUser(), null, "users", null, 0, -1, SocialNetworkRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //SocialNetworkPackageImpl diff --git a/solve/src/main/java/SocialNetwork/impl/SocialNetworkRootImpl.java b/solve/src/main/java/SocialNetwork/impl/SocialNetworkRootImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..ff0ebf9946ce6a3d4eab7e4ca55fa0a1b1386ff3 --- /dev/null +++ b/solve/src/main/java/SocialNetwork/impl/SocialNetworkRootImpl.java @@ -0,0 +1,189 @@ +/** + */ +package SocialNetwork.impl; + +import SocialNetwork.Post; +import SocialNetwork.SocialNetworkPackage; +import SocialNetwork.SocialNetworkRoot; +import SocialNetwork.User; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Root</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link SocialNetwork.impl.SocialNetworkRootImpl#getPosts <em>Posts</em>}</li> + * <li>{@link SocialNetwork.impl.SocialNetworkRootImpl#getUsers <em>Users</em>}</li> + * </ul> + * + * @generated + */ +public class SocialNetworkRootImpl extends MinimalEObjectImpl.Container implements SocialNetworkRoot { + /** + * The cached value of the '{@link #getPosts() <em>Posts</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPosts() + * @generated + * @ordered + */ + protected EList<Post> posts; + + /** + * The cached value of the '{@link #getUsers() <em>Users</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUsers() + * @generated + * @ordered + */ + protected EList<User> users; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected SocialNetworkRootImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return SocialNetworkPackage.Literals.SOCIAL_NETWORK_ROOT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Post> getPosts() { + if (posts == null) { + posts = new EObjectContainmentEList<Post>(Post.class, this, SocialNetworkPackage.SOCIAL_NETWORK_ROOT__POSTS); + } + return posts; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<User> getUsers() { + if (users == null) { + users = new EObjectContainmentEList<User>(User.class, this, SocialNetworkPackage.SOCIAL_NETWORK_ROOT__USERS); + } + return users; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SocialNetworkPackage.SOCIAL_NETWORK_ROOT__POSTS: + return ((InternalEList<?>)getPosts()).basicRemove(otherEnd, msgs); + case SocialNetworkPackage.SOCIAL_NETWORK_ROOT__USERS: + return ((InternalEList<?>)getUsers()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SocialNetworkPackage.SOCIAL_NETWORK_ROOT__POSTS: + return getPosts(); + case SocialNetworkPackage.SOCIAL_NETWORK_ROOT__USERS: + return getUsers(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SocialNetworkPackage.SOCIAL_NETWORK_ROOT__POSTS: + getPosts().clear(); + getPosts().addAll((Collection<? extends Post>)newValue); + return; + case SocialNetworkPackage.SOCIAL_NETWORK_ROOT__USERS: + getUsers().clear(); + getUsers().addAll((Collection<? extends User>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SocialNetworkPackage.SOCIAL_NETWORK_ROOT__POSTS: + getPosts().clear(); + return; + case SocialNetworkPackage.SOCIAL_NETWORK_ROOT__USERS: + getUsers().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SocialNetworkPackage.SOCIAL_NETWORK_ROOT__POSTS: + return posts != null && !posts.isEmpty(); + case SocialNetworkPackage.SOCIAL_NETWORK_ROOT__USERS: + return users != null && !users.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //SocialNetworkRootImpl diff --git a/solve/src/main/java/SocialNetwork/impl/SubmissionImpl.java b/solve/src/main/java/SocialNetwork/impl/SubmissionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..a02cd83c4962760f66a85eba78c9fceb9306e436 --- /dev/null +++ b/solve/src/main/java/SocialNetwork/impl/SubmissionImpl.java @@ -0,0 +1,435 @@ +/** + */ +package SocialNetwork.impl; + +import SocialNetwork.Comment; +import SocialNetwork.SocialNetworkPackage; +import SocialNetwork.Submission; +import SocialNetwork.User; + +import java.util.Collection; +import java.util.Date; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Submission</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link SocialNetwork.impl.SubmissionImpl#getId <em>Id</em>}</li> + * <li>{@link SocialNetwork.impl.SubmissionImpl#getTimestamp <em>Timestamp</em>}</li> + * <li>{@link SocialNetwork.impl.SubmissionImpl#getContent <em>Content</em>}</li> + * <li>{@link SocialNetwork.impl.SubmissionImpl#getSubmitter <em>Submitter</em>}</li> + * <li>{@link SocialNetwork.impl.SubmissionImpl#getComments <em>Comments</em>}</li> + * </ul> + * + * @generated + */ +public abstract class SubmissionImpl extends MinimalEObjectImpl.Container implements Submission { + /** + * The default value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected static final String ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected String id = ID_EDEFAULT; + + /** + * The default value of the '{@link #getTimestamp() <em>Timestamp</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTimestamp() + * @generated + * @ordered + */ + protected static final Date TIMESTAMP_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTimestamp() <em>Timestamp</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTimestamp() + * @generated + * @ordered + */ + protected Date timestamp = TIMESTAMP_EDEFAULT; + + /** + * The default value of the '{@link #getContent() <em>Content</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getContent() + * @generated + * @ordered + */ + protected static final String CONTENT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getContent() <em>Content</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getContent() + * @generated + * @ordered + */ + protected String content = CONTENT_EDEFAULT; + + /** + * The cached value of the '{@link #getSubmitter() <em>Submitter</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSubmitter() + * @generated + * @ordered + */ + protected User submitter; + + /** + * The cached value of the '{@link #getComments() <em>Comments</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getComments() + * @generated + * @ordered + */ + protected EList<Comment> comments; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected SubmissionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return SocialNetworkPackage.Literals.SUBMISSION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getId() { + return id; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setId(String newId) { + String oldId = id; + id = newId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SocialNetworkPackage.SUBMISSION__ID, oldId, id)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Date getTimestamp() { + return timestamp; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTimestamp(Date newTimestamp) { + Date oldTimestamp = timestamp; + timestamp = newTimestamp; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SocialNetworkPackage.SUBMISSION__TIMESTAMP, oldTimestamp, timestamp)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getContent() { + return content; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setContent(String newContent) { + String oldContent = content; + content = newContent; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SocialNetworkPackage.SUBMISSION__CONTENT, oldContent, content)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public User getSubmitter() { + if (submitter != null && submitter.eIsProxy()) { + InternalEObject oldSubmitter = (InternalEObject)submitter; + submitter = (User)eResolveProxy(oldSubmitter); + if (submitter != oldSubmitter) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, SocialNetworkPackage.SUBMISSION__SUBMITTER, oldSubmitter, submitter)); + } + } + return submitter; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public User basicGetSubmitter() { + return submitter; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetSubmitter(User newSubmitter, NotificationChain msgs) { + User oldSubmitter = submitter; + submitter = newSubmitter; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SocialNetworkPackage.SUBMISSION__SUBMITTER, oldSubmitter, newSubmitter); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSubmitter(User newSubmitter) { + if (newSubmitter != submitter) { + NotificationChain msgs = null; + if (submitter != null) + msgs = ((InternalEObject)submitter).eInverseRemove(this, SocialNetworkPackage.USER__SUBMISSIONS, User.class, msgs); + if (newSubmitter != null) + msgs = ((InternalEObject)newSubmitter).eInverseAdd(this, SocialNetworkPackage.USER__SUBMISSIONS, User.class, msgs); + msgs = basicSetSubmitter(newSubmitter, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SocialNetworkPackage.SUBMISSION__SUBMITTER, newSubmitter, newSubmitter)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Comment> getComments() { + if (comments == null) { + comments = new EObjectContainmentWithInverseEList<Comment>(Comment.class, this, SocialNetworkPackage.SUBMISSION__COMMENTS, SocialNetworkPackage.COMMENT__COMMENTED); + } + return comments; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SocialNetworkPackage.SUBMISSION__SUBMITTER: + if (submitter != null) + msgs = ((InternalEObject)submitter).eInverseRemove(this, SocialNetworkPackage.USER__SUBMISSIONS, User.class, msgs); + return basicSetSubmitter((User)otherEnd, msgs); + case SocialNetworkPackage.SUBMISSION__COMMENTS: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getComments()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SocialNetworkPackage.SUBMISSION__SUBMITTER: + return basicSetSubmitter(null, msgs); + case SocialNetworkPackage.SUBMISSION__COMMENTS: + return ((InternalEList<?>)getComments()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SocialNetworkPackage.SUBMISSION__ID: + return getId(); + case SocialNetworkPackage.SUBMISSION__TIMESTAMP: + return getTimestamp(); + case SocialNetworkPackage.SUBMISSION__CONTENT: + return getContent(); + case SocialNetworkPackage.SUBMISSION__SUBMITTER: + if (resolve) return getSubmitter(); + return basicGetSubmitter(); + case SocialNetworkPackage.SUBMISSION__COMMENTS: + return getComments(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SocialNetworkPackage.SUBMISSION__ID: + setId((String)newValue); + return; + case SocialNetworkPackage.SUBMISSION__TIMESTAMP: + setTimestamp((Date)newValue); + return; + case SocialNetworkPackage.SUBMISSION__CONTENT: + setContent((String)newValue); + return; + case SocialNetworkPackage.SUBMISSION__SUBMITTER: + setSubmitter((User)newValue); + return; + case SocialNetworkPackage.SUBMISSION__COMMENTS: + getComments().clear(); + getComments().addAll((Collection<? extends Comment>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SocialNetworkPackage.SUBMISSION__ID: + setId(ID_EDEFAULT); + return; + case SocialNetworkPackage.SUBMISSION__TIMESTAMP: + setTimestamp(TIMESTAMP_EDEFAULT); + return; + case SocialNetworkPackage.SUBMISSION__CONTENT: + setContent(CONTENT_EDEFAULT); + return; + case SocialNetworkPackage.SUBMISSION__SUBMITTER: + setSubmitter((User)null); + return; + case SocialNetworkPackage.SUBMISSION__COMMENTS: + getComments().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SocialNetworkPackage.SUBMISSION__ID: + return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); + case SocialNetworkPackage.SUBMISSION__TIMESTAMP: + return TIMESTAMP_EDEFAULT == null ? timestamp != null : !TIMESTAMP_EDEFAULT.equals(timestamp); + case SocialNetworkPackage.SUBMISSION__CONTENT: + return CONTENT_EDEFAULT == null ? content != null : !CONTENT_EDEFAULT.equals(content); + case SocialNetworkPackage.SUBMISSION__SUBMITTER: + return submitter != null; + case SocialNetworkPackage.SUBMISSION__COMMENTS: + return comments != null && !comments.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (id: "); + result.append(id); + result.append(", timestamp: "); + result.append(timestamp); + result.append(", content: "); + result.append(content); + result.append(')'); + return result.toString(); + } + +} //SubmissionImpl diff --git a/solve/src/main/java/SocialNetwork/impl/UserImpl.java b/solve/src/main/java/SocialNetwork/impl/UserImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..29fb1d94d5f602c79b604ba4e702a2ad0c9a4f38 --- /dev/null +++ b/solve/src/main/java/SocialNetwork/impl/UserImpl.java @@ -0,0 +1,365 @@ +/** + */ +package SocialNetwork.impl; + +import SocialNetwork.Comment; +import SocialNetwork.SocialNetworkPackage; +import SocialNetwork.Submission; +import SocialNetwork.User; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>User</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link SocialNetwork.impl.UserImpl#getId <em>Id</em>}</li> + * <li>{@link SocialNetwork.impl.UserImpl#getName <em>Name</em>}</li> + * <li>{@link SocialNetwork.impl.UserImpl#getSubmissions <em>Submissions</em>}</li> + * <li>{@link SocialNetwork.impl.UserImpl#getLikes <em>Likes</em>}</li> + * <li>{@link SocialNetwork.impl.UserImpl#getFriends <em>Friends</em>}</li> + * </ul> + * + * @generated + */ +public class UserImpl extends MinimalEObjectImpl.Container implements User { + /** + * The default value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected static final String ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected String id = ID_EDEFAULT; + + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getSubmissions() <em>Submissions</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSubmissions() + * @generated + * @ordered + */ + protected EList<Submission> submissions; + + /** + * The cached value of the '{@link #getLikes() <em>Likes</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLikes() + * @generated + * @ordered + */ + protected EList<Comment> likes; + + /** + * The cached value of the '{@link #getFriends() <em>Friends</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFriends() + * @generated + * @ordered + */ + protected EList<User> friends; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected UserImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return SocialNetworkPackage.Literals.USER; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getId() { + return id; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setId(String newId) { + String oldId = id; + id = newId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SocialNetworkPackage.USER__ID, oldId, id)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SocialNetworkPackage.USER__NAME, oldName, name)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Submission> getSubmissions() { + if (submissions == null) { + submissions = new EObjectWithInverseResolvingEList<Submission>(Submission.class, this, SocialNetworkPackage.USER__SUBMISSIONS, SocialNetworkPackage.SUBMISSION__SUBMITTER); + } + return submissions; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Comment> getLikes() { + if (likes == null) { + likes = new EObjectWithInverseResolvingEList.ManyInverse<Comment>(Comment.class, this, SocialNetworkPackage.USER__LIKES, SocialNetworkPackage.COMMENT__LIKED_BY); + } + return likes; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<User> getFriends() { + if (friends == null) { + friends = new EObjectResolvingEList<User>(User.class, this, SocialNetworkPackage.USER__FRIENDS); + } + return friends; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SocialNetworkPackage.USER__SUBMISSIONS: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getSubmissions()).basicAdd(otherEnd, msgs); + case SocialNetworkPackage.USER__LIKES: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getLikes()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SocialNetworkPackage.USER__SUBMISSIONS: + return ((InternalEList<?>)getSubmissions()).basicRemove(otherEnd, msgs); + case SocialNetworkPackage.USER__LIKES: + return ((InternalEList<?>)getLikes()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SocialNetworkPackage.USER__ID: + return getId(); + case SocialNetworkPackage.USER__NAME: + return getName(); + case SocialNetworkPackage.USER__SUBMISSIONS: + return getSubmissions(); + case SocialNetworkPackage.USER__LIKES: + return getLikes(); + case SocialNetworkPackage.USER__FRIENDS: + return getFriends(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SocialNetworkPackage.USER__ID: + setId((String)newValue); + return; + case SocialNetworkPackage.USER__NAME: + setName((String)newValue); + return; + case SocialNetworkPackage.USER__SUBMISSIONS: + getSubmissions().clear(); + getSubmissions().addAll((Collection<? extends Submission>)newValue); + return; + case SocialNetworkPackage.USER__LIKES: + getLikes().clear(); + getLikes().addAll((Collection<? extends Comment>)newValue); + return; + case SocialNetworkPackage.USER__FRIENDS: + getFriends().clear(); + getFriends().addAll((Collection<? extends User>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SocialNetworkPackage.USER__ID: + setId(ID_EDEFAULT); + return; + case SocialNetworkPackage.USER__NAME: + setName(NAME_EDEFAULT); + return; + case SocialNetworkPackage.USER__SUBMISSIONS: + getSubmissions().clear(); + return; + case SocialNetworkPackage.USER__LIKES: + getLikes().clear(); + return; + case SocialNetworkPackage.USER__FRIENDS: + getFriends().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SocialNetworkPackage.USER__ID: + return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); + case SocialNetworkPackage.USER__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case SocialNetworkPackage.USER__SUBMISSIONS: + return submissions != null && !submissions.isEmpty(); + case SocialNetworkPackage.USER__LIKES: + return likes != null && !likes.isEmpty(); + case SocialNetworkPackage.USER__FRIENDS: + return friends != null && !friends.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (id: "); + result.append(id); + result.append(", name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //UserImpl diff --git a/solve/src/main/java/SocialNetwork/util/SocialNetworkAdapterFactory.java b/solve/src/main/java/SocialNetwork/util/SocialNetworkAdapterFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..25b3b34ee966f364668315a6d764b33c1384a13c --- /dev/null +++ b/solve/src/main/java/SocialNetwork/util/SocialNetworkAdapterFactory.java @@ -0,0 +1,192 @@ +/** + */ +package SocialNetwork.util; + +import SocialNetwork.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see SocialNetwork.SocialNetworkPackage + * @generated + */ +public class SocialNetworkAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static SocialNetworkPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SocialNetworkAdapterFactory() { + if (modelPackage == null) { + modelPackage = SocialNetworkPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected SocialNetworkSwitch<Adapter> modelSwitch = + new SocialNetworkSwitch<Adapter>() { + @Override + public Adapter caseSubmission(Submission object) { + return createSubmissionAdapter(); + } + @Override + public Adapter casePost(Post object) { + return createPostAdapter(); + } + @Override + public Adapter caseComment(Comment object) { + return createCommentAdapter(); + } + @Override + public Adapter caseUser(User object) { + return createUserAdapter(); + } + @Override + public Adapter caseSocialNetworkRoot(SocialNetworkRoot object) { + return createSocialNetworkRootAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link SocialNetwork.Submission <em>Submission</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see SocialNetwork.Submission + * @generated + */ + public Adapter createSubmissionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link SocialNetwork.Post <em>Post</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see SocialNetwork.Post + * @generated + */ + public Adapter createPostAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link SocialNetwork.Comment <em>Comment</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see SocialNetwork.Comment + * @generated + */ + public Adapter createCommentAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link SocialNetwork.User <em>User</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see SocialNetwork.User + * @generated + */ + public Adapter createUserAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link SocialNetwork.SocialNetworkRoot <em>Root</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see SocialNetwork.SocialNetworkRoot + * @generated + */ + public Adapter createSocialNetworkRootAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //SocialNetworkAdapterFactory diff --git a/solve/src/main/java/SocialNetwork/util/SocialNetworkSwitch.java b/solve/src/main/java/SocialNetwork/util/SocialNetworkSwitch.java new file mode 100644 index 0000000000000000000000000000000000000000..e610a209db4e4025d6d91affe90c90a684687080 --- /dev/null +++ b/solve/src/main/java/SocialNetwork/util/SocialNetworkSwitch.java @@ -0,0 +1,196 @@ +/** + */ +package SocialNetwork.util; + +import SocialNetwork.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * <!-- end-user-doc --> + * @see SocialNetwork.SocialNetworkPackage + * @generated + */ +public class SocialNetworkSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static SocialNetworkPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SocialNetworkSwitch() { + if (modelPackage == null) { + modelPackage = SocialNetworkPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case SocialNetworkPackage.SUBMISSION: { + Submission submission = (Submission)theEObject; + T result = caseSubmission(submission); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SocialNetworkPackage.POST: { + Post post = (Post)theEObject; + T result = casePost(post); + if (result == null) result = caseSubmission(post); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SocialNetworkPackage.COMMENT: { + Comment comment = (Comment)theEObject; + T result = caseComment(comment); + if (result == null) result = caseSubmission(comment); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SocialNetworkPackage.USER: { + User user = (User)theEObject; + T result = caseUser(user); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SocialNetworkPackage.SOCIAL_NETWORK_ROOT: { + SocialNetworkRoot socialNetworkRoot = (SocialNetworkRoot)theEObject; + T result = caseSocialNetworkRoot(socialNetworkRoot); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Submission</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Submission</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSubmission(Submission object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Post</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Post</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePost(Post object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Comment</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Comment</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseComment(Comment object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>User</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>User</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseUser(User object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Root</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Root</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSocialNetworkRoot(SocialNetworkRoot object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //SocialNetworkSwitch diff --git a/solve/src/main/java/de/tudresden/inf/st/ttc18live/AbstractLiveContestDriver.java b/solve/src/main/java/de/tudresden/inf/st/ttc18live/AbstractLiveContestDriver.java new file mode 100644 index 0000000000000000000000000000000000000000..b4a1fbeed1d8ac97e3dac1bfb1b4d60b56903b5e --- /dev/null +++ b/solve/src/main/java/de/tudresden/inf/st/ttc18live/AbstractLiveContestDriver.java @@ -0,0 +1,177 @@ +package de.tudresden.inf.st.ttc18live; + +import de.tudresden.inf.st.ttc18live.jastadd.model.ModelChangeSet; +import de.tudresden.inf.st.ttc18live.jastadd.model.SocialNetwork; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.core.LoggerContext; +import org.apache.logging.log4j.core.config.Configuration; + +import java.nio.file.Path; + +/** + * Abstract Driver for a JastAdd solution. + * + * @author rschoene - Initial contribution + */ +public abstract class AbstractLiveContestDriver { + + private String ChangePath; + private String RunIndex; + private int Sequences; + private String Tool; + private String ChangeSet; + private String Query; + + private long stopwatch; + + private Solution solution; + private boolean traceEvents; + private Path pathOfEventFile; + + AbstractLiveContestDriver() { + ChangeSet = System.getenv("ChangeSet"); + ChangePath = System.getenv("ChangePath"); + Query = System.getenv("Query").toUpperCase(); + } + + AbstractLiveContestDriver enableTracing(Path pathOfEventFile) { + this.pathOfEventFile = pathOfEventFile; + this.traceEvents = true; + return this; + } + + enum BenchmarkPhase { + Initialization, + Load, + Initial, + Update + } + + void mainImpl() { + // remove console logger + final LoggerContext ctx = (LoggerContext) LogManager.getContext(false); + final Configuration config = ctx.getConfiguration(); + config.getRootLogger().removeAppender("Console"); + ctx.updateLoggers(); + try { + Initialize(); + Load(); + Initial(); + for (int i = 1; i <= Sequences; i++) { + Update(i); + } + if (traceEvents) { + solution.getSocialNetwork().writeTracingEvents(pathOfEventFile); + } + System.err.println(); + } catch (Exception e) { + System.err.println(); + e.printStackTrace(); + } + } + + String getChangePath() { + return ChangePath; + } + + Solution getSolution() { + return solution; + } + + String getChangeSet() { + return ChangeSet; + } + + String getQuery() { + return Query; + } + + private void Initialize() throws Exception { + stopwatch = System.nanoTime(); + RunIndex = System.getenv("RunIndex"); + Sequences = Integer.parseInt(System.getenv("Sequences")); + Tool = System.getenv("Tool"); + + InitializeSpecial(); + + if (Query.contentEquals("Q1")) { + solution = new SolutionQ1(); + } else if (Query.contentEquals("Q2")) { + solution = new SolutionQ2(); + } else { + throw new Exception("Query is unknown"); + } + + stopwatch = System.nanoTime() - stopwatch; + Report(BenchmarkPhase.Initialization, -1, null); + } + + protected abstract void InitializeSpecial(); + + private void Load() throws Exception { + stopwatch = System.nanoTime(); + + SocialNetwork socialNetwork = LoadImpl(); + if (traceEvents) { + socialNetwork.enableTracing(); + } + + solution.setSocialNetwork(socialNetwork); + stopwatch = System.nanoTime() - stopwatch; + Report(BenchmarkPhase.Load, -1, null); + } + + abstract SocialNetwork LoadImpl() throws Exception; + + public void Initial() { + if (traceEvents) { + solution.getSocialNetwork().insertCustomEvent("TTC_INITIAL", ChangeSet); + } + stopwatch = System.nanoTime(); + String result = solution.Initial(); + stopwatch = System.nanoTime() - stopwatch; + Report(BenchmarkPhase.Initial, -1, result); + + } + + private void Update(int iteration) throws Exception { + System.err.print(iteration + " "); + + String size_iteration = ChangeSet + Integer.toString(iteration); + if (traceEvents) { + solution.getSocialNetwork().insertCustomEvent("TTC_TRANSFORMATION", size_iteration); + } + ModelChangeSet modelChangeSet = UpdateImpl(iteration); + + if (traceEvents) { + solution.getSocialNetwork().insertCustomEvent("TTC_RECHECK", size_iteration); + } + stopwatch = System.nanoTime(); + String result = solution.Update(modelChangeSet); + stopwatch = System.nanoTime() - stopwatch; + Report(BenchmarkPhase.Update, iteration, result); + } + + abstract ModelChangeSet UpdateImpl(int iteration) throws Exception; + + private void Report(BenchmarkPhase phase, int iteration, String result) { + String iterationStr; + if (iteration == -1) { + iterationStr = "0"; + } else { + iterationStr = Integer.toString(iteration); + } + System.out.println(String.format("%s;%s;%s;%s;%s;%s;Time;%s", Tool, Query, ChangeSet, RunIndex, iterationStr, phase.toString(), Long.toString(stopwatch))); + Runtime.getRuntime().gc(); + Runtime.getRuntime().gc(); + Runtime.getRuntime().gc(); + Runtime.getRuntime().gc(); + Runtime.getRuntime().gc(); + long memoryUsed = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); + System.out.println(String.format("%s;%s;%s;%s;%s;%s;Memory;%s", Tool, Query, ChangeSet, RunIndex, iterationStr, phase.toString(), Long.toString(memoryUsed))); + if (result != null) { + System.out.println(String.format("%s;%s;%s;%s;%s;%s;Elements;%s", Tool, Query, ChangeSet, RunIndex, iterationStr, phase.toString(), result)); + } + } + +} diff --git a/solve/src/main/java/de/tudresden/inf/st/ttc18live/IntrinsicIDXMIResourceFactoryImpl.java b/solve/src/main/java/de/tudresden/inf/st/ttc18live/IntrinsicIDXMIResourceFactoryImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..396d79814b459c61f690a1ae31b45afc2b329739 --- /dev/null +++ b/solve/src/main/java/de/tudresden/inf/st/ttc18live/IntrinsicIDXMIResourceFactoryImpl.java @@ -0,0 +1,17 @@ +package de.tudresden.inf.st.ttc18live; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl; + +import java.util.HashMap; + +class IntrinsicIDXMIResourceFactoryImpl extends XMIResourceFactoryImpl { + @Override + public Resource createResource(URI uri) { + final XMIResourceImpl r = new XMIResourceImpl(uri); + r.setIntrinsicIDToEObjectMap(new HashMap<>()); + return r; + } +} \ No newline at end of file diff --git a/solve/src/main/java/de/tudresden/inf/st/ttc18live/LiveContestDriver.java b/solve/src/main/java/de/tudresden/inf/st/ttc18live/LiveContestDriver.java deleted file mode 100644 index d6d69bb10a08d3548a9a57be13eb739aada23819..0000000000000000000000000000000000000000 --- a/solve/src/main/java/de/tudresden/inf/st/ttc18live/LiveContestDriver.java +++ /dev/null @@ -1,177 +0,0 @@ -package de.tudresden.inf.st.ttc18live; - -import de.tudresden.inf.st.ttc18live.jastadd.model.ModelChangeSet; -import de.tudresden.inf.st.ttc18live.jastadd.model.SocialNetwork; -import de.tudresden.inf.st.ttc18live.parser.ParsedSocialNetwork; -import de.tudresden.inf.st.ttc18live.parser.change.ParsedModelChangeSet; -import de.tudresden.inf.st.ttc18live.translator.XmlToJastaddTranslator; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.core.LoggerContext; -import org.apache.logging.log4j.core.config.Configuration; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.text.ParseException; -import java.util.Objects; - -/** - * Driver for the JastAdd solution. - * - * @author rschoene - Initial contribution - * @author jmey - Implementation of 2nd query - */ -public class LiveContestDriver { - public static void main(String[] args) { - // remove console logger - final LoggerContext ctx = (LoggerContext) LogManager.getContext(false); - final Configuration config = ctx.getConfiguration(); - config.getRootLogger().removeAppender("Console"); - ctx.updateLoggers(); - try { - Initialize(); - Load(); - Initial(); - for (int i = 1; i <= Sequences; i++) - { - Update(i); - } - } catch(Exception e) { - e.printStackTrace(); - } - } - - -// private static ResourceSet repository; - private static Logger logger = LogManager.getLogger(Main.class); - - private static String ChangePath; - private static String RunIndex; - private static int Sequences; - private static String Tool; - private static String ChangeSet; - private static String Query; - private static SocialNetwork socialNetwork; - - private static long stopwatch; - - private static Solution solution; - - static void Load() throws JAXBException, ParseException { - stopwatch = System.nanoTime(); - JAXBContext jc = JAXBContext.newInstance(ParsedSocialNetwork.class); - Unmarshaller unmarshaller = jc.createUnmarshaller(); - Path model1Content = Paths.get(ChangePath, "initial.xmi"); - ParsedSocialNetwork parsedSocialNetwork = (ParsedSocialNetwork) unmarshaller.unmarshal(model1Content.toFile()); - logger.info("Users: {}, Posts: {}", - parsedSocialNetwork.users.size(), parsedSocialNetwork.posts.size()); - XmlToJastaddTranslator translator = new XmlToJastaddTranslator(); - socialNetwork = translator.translateSocialNetwork(parsedSocialNetwork); - stopwatch = System.nanoTime() - stopwatch; - Report(BenchmarkPhase.Load, -1, null); - } - - static void Initialize() throws Exception - { - stopwatch = System.nanoTime(); - ChangePath = System.getenv("ChangePath"); - RunIndex = System.getenv("RunIndex"); - Sequences = Integer.parseInt(System.getenv("Sequences")); - Tool = System.getenv("Tool"); - ChangeSet = System.getenv("ChangeSet"); - Query = System.getenv("Query").toUpperCase(); - if (Query.contentEquals("Q1")) - { - solution = new SolutionQ1(); - } - else if (Query.contentEquals("Q2")) - { - solution = new SolutionQ2(); - } - else - { - throw new Exception("Query is unknown"); - } - - stopwatch = System.nanoTime() - stopwatch; - Report(BenchmarkPhase.Initialization, -1, null); - } - - static void Initial() - { - stopwatch = System.nanoTime(); - String result = solution.runQuery(socialNetwork); - stopwatch = System.nanoTime() - stopwatch; - Report(BenchmarkPhase.Initial, -1, result); - } - - static void Update(int iteration) throws JAXBException, ParseException { - stopwatch = System.nanoTime(); - System.err.println(iteration); - - JAXBContext jc = JAXBContext.newInstance(ParsedModelChangeSet.class); - Unmarshaller unmarshaller = jc.createUnmarshaller(); - unmarshaller.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler()); - Path modelContent = Paths.get(ChangePath, String.format("change%02d.xmi", iteration)); - logger.debug("Parsing {}", modelContent); - ParsedModelChangeSet parsedModelChangeSet = (ParsedModelChangeSet) unmarshaller.unmarshal(modelContent.toFile()); - - XmlToJastaddTranslator translator = new XmlToJastaddTranslator(); - ModelChangeSet modelChangeSet = translator.translateModelChangeSet(parsedModelChangeSet, socialNetwork); - modelChangeSet.apply(); - socialNetwork.flushTreeCache(); - - String result = solution.runQuery(socialNetwork); - stopwatch = System.nanoTime() - stopwatch; - Report(BenchmarkPhase.Update, iteration, result); - } - - static void Report(BenchmarkPhase phase, int iteration, String result) - { - String iterationStr; - if (iteration == -1) { - iterationStr = "0"; - } else { - iterationStr = Integer.toString(iteration); - } - System.out.println(String.format("%s;%s;%s;%s;%s;%s;Time;%s", Tool, Query, ChangeSet, RunIndex, iterationStr, phase.toString(), Long.toString(stopwatch))); - Runtime.getRuntime().gc(); - Runtime.getRuntime().gc(); - Runtime.getRuntime().gc(); - Runtime.getRuntime().gc(); - Runtime.getRuntime().gc(); - long memoryUsed = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); - System.out.println(String.format("%s;%s;%s;%s;%s;%s;Memory;%s", Tool, Query, ChangeSet, RunIndex, iterationStr, phase.toString(), Long.toString(memoryUsed))); - if (result != null) - { - System.out.println(String.format("%s;%s;%s;%s;%s;%s;Elements;%s", Tool, Query, ChangeSet, RunIndex, iterationStr, phase.toString(), result)); - } - } - - static abstract class Solution { - abstract String runQuery(SocialNetwork socialNetwork); - } - - static class SolutionQ1 extends Solution { - @Override - String runQuery(SocialNetwork socialNetwork) { - return socialNetwork.query1(); - } - } - - static class SolutionQ2 extends Solution { - @Override - String runQuery(SocialNetwork socialNetwork) { - return socialNetwork.query2(); - } - } - - enum BenchmarkPhase { - Initialization, - Load, - Initial, - Update - }} diff --git a/solve/src/main/java/de/tudresden/inf/st/ttc18live/LiveContestDriverEMF.java b/solve/src/main/java/de/tudresden/inf/st/ttc18live/LiveContestDriverEMF.java new file mode 100644 index 0000000000000000000000000000000000000000..154127af8f6b9aa05c36c54581c2222c35623038 --- /dev/null +++ b/solve/src/main/java/de/tudresden/inf/st/ttc18live/LiveContestDriverEMF.java @@ -0,0 +1,80 @@ +package de.tudresden.inf.st.ttc18live; + +import de.tudresden.inf.st.ttc18live.jastadd.model.ModelChangeSet; + +import de.tudresden.inf.st.ttc18live.jastadd.model.SocialNetwork; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.xmi.XMIResource; +import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl; +import Changes.ChangesPackage; +import SocialNetwork.SocialNetworkPackage; +import SocialNetwork.SocialNetworkRoot; +import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl; + + +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.HashMap; +import java.util.Map; + +/** + * Driver for the JastAdd solution with EMF parser. + * + * @author rschoene - Initial contribution + * @author jmey - Implementation of 2nd query + */ +public class LiveContestDriverEMF extends AbstractLiveContestDriver { + + public static void main(String[] args) throws IOException { + LiveContestDriverEMF driver = new LiveContestDriverEMF(); +// Path filename = Paths.get(String.format("events-emf-%s-%s.csv", driver.getChangeSet(), driver.getQuery())); +// driver.enableTracing(filename).mainImpl(); + driver.mainImpl(); + } + + private ResourceSet repository; + private Translator translator; + + private Object loadFile(String path) throws IOException { + repository.getURIConverter().getURIMap().put(URI.createFileURI(path), URI.createFileURI(getChangePath() + "/" + path)); + Resource mRes = repository.createResource(URI.createFileURI(getChangePath() + "/" + path)); + System.err.println(mRes); + Map<String, Object> loadOptions = new HashMap<>(); + loadOptions.put(XMIResource.OPTION_DEFER_IDREF_RESOLUTION, true); + loadOptions.put(XMIResource.OPTION_USE_PARSER_POOL, new XMLParserPoolImpl()); + loadOptions.put(XMIResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, new HashMap<>()); + + mRes.load(loadOptions); + return mRes.getContents().get(0); + } + + @Override + SocialNetwork LoadImpl() throws Exception { + translator = new Translator((SocialNetworkRoot) loadFile("initial.xmi")); + return translator.getSocialNetwork(); + } + + @Override + protected void InitializeSpecial() { + repository = new ResourceSetImpl(); + repository.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xmi", new IntrinsicIDXMIResourceFactoryImpl()); + repository.getResourceFactoryRegistry().getExtensionToFactoryMap().put("ecore", new EcoreResourceFactoryImpl()); + repository.getPackageRegistry().put(SocialNetworkPackage.eINSTANCE.getNsURI(), SocialNetworkPackage.eINSTANCE); + repository.getPackageRegistry().put(ChangesPackage.eINSTANCE.getNsURI(), ChangesPackage.eINSTANCE); + } + + @Override + ModelChangeSet UpdateImpl(int iteration) throws Exception { + Changes.ModelChangeSet emfChanges = (Changes.ModelChangeSet) loadFile(String.format("change%02d.xmi", iteration)); + return translator.translateChangeSet(emfChanges); + } + + @Override + public void Initial() { + throw new RuntimeException(); + } +} diff --git a/solve/src/main/java/de/tudresden/inf/st/ttc18live/LiveContestDriverXml.java b/solve/src/main/java/de/tudresden/inf/st/ttc18live/LiveContestDriverXml.java new file mode 100644 index 0000000000000000000000000000000000000000..a660de8eea80030e605829782c2af379675f7dd7 --- /dev/null +++ b/solve/src/main/java/de/tudresden/inf/st/ttc18live/LiveContestDriverXml.java @@ -0,0 +1,58 @@ +package de.tudresden.inf.st.ttc18live; + +import de.tudresden.inf.st.ttc18live.jastadd.model.ModelChangeSet; +import de.tudresden.inf.st.ttc18live.jastadd.model.SocialNetwork; +import de.tudresden.inf.st.ttc18live.parser.ParsedSocialNetwork; +import de.tudresden.inf.st.ttc18live.parser.change.ParsedModelChangeSet; +import de.tudresden.inf.st.ttc18live.translator.XmlToJastaddTranslator; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.Unmarshaller; +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; + +/** + * Driver for the JastAdd solution with custom XML parser. + * + * @author rschoene - Initial contribution + * @author jmey - Implementation of 2nd query + */ +public class LiveContestDriverXml extends AbstractLiveContestDriver { + + public static void main(String[] args) { + LiveContestDriverXml driver = new LiveContestDriverXml(); + Path filename = Paths.get(String.format("events-xml-%s-%s.csv", driver.getChangeSet(), driver.getQuery())); + driver.enableTracing(filename).mainImpl(); + } + + private XmlToJastaddTranslator translator = new XmlToJastaddTranslator(); + + @Override + SocialNetwork LoadImpl() throws Exception { + JAXBContext jc = JAXBContext.newInstance(ParsedSocialNetwork.class); + Unmarshaller unmarshaller = jc.createUnmarshaller(); + Path model1Content = Paths.get(getChangePath(), "initial.xmi"); + ParsedSocialNetwork parsedSocialNetwork = (ParsedSocialNetwork) unmarshaller.unmarshal(model1Content.toFile()); +// logger.info("Users: {}, Posts: {}", +// parsedSocialNetwork.users.size(), parsedSocialNetwork.posts.size()); + return translator.translateSocialNetwork(parsedSocialNetwork); + } + + @Override + protected void InitializeSpecial() { + // empty + } + + @Override + ModelChangeSet UpdateImpl(int iteration) throws Exception { + JAXBContext jc = JAXBContext.newInstance(ParsedModelChangeSet.class); + Unmarshaller unmarshaller = jc.createUnmarshaller(); + unmarshaller.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler()); + Path modelContent = Paths.get(getChangePath(), String.format("change%02d.xmi", iteration)); +// logger.debug("Parsing {}", modelContent); + ParsedModelChangeSet parsedModelChangeSet = (ParsedModelChangeSet) unmarshaller.unmarshal(modelContent.toFile()); + + return translator.translateModelChangeSet(parsedModelChangeSet); + } +} diff --git a/solve/src/main/java/de/tudresden/inf/st/ttc18live/Main.java b/solve/src/main/java/de/tudresden/inf/st/ttc18live/Main.java index 87a06958cc0b50b5147afa6eb2456703e500c382..57c256b70314e667b0ef0a47c38fe12369a011fd 100644 --- a/solve/src/main/java/de/tudresden/inf/st/ttc18live/Main.java +++ b/solve/src/main/java/de/tudresden/inf/st/ttc18live/Main.java @@ -13,6 +13,7 @@ import javax.xml.bind.Unmarshaller; import java.nio.file.Path; import java.nio.file.Paths; import java.text.ParseException; +import java.util.List; import java.util.stream.Collectors; @SuppressWarnings("FieldCanBeLocal") @@ -20,7 +21,7 @@ public class Main { private static Logger logger = LogManager.getLogger(Main.class); private static boolean splitApply = true; - private static int changeSet = 2; + private static int changeSet = 128; private static int maxChanges = 20; private static User mkUser(long id, SocialNetwork sn, Comment... likes) { @@ -28,48 +29,28 @@ public class Main { result.setId(id); sn.addUser(result); for (Comment comment : likes) { - result.addLike(comment.createCommentRef()); + result.addLike(comment); } return result; } private static void addFriends(User one, User... others) { for (User other : others) { - one.addFriend(other.createUserRef()); - other.addFriend(one.createUserRef()); + one.addFriend(other); } } - private static Post findContainingPost(Comment comment) { - // this should actually be done with an inherited attribute, but attributes needs to be flushed for this - ASTNode parent = comment.getParent(); - while (parent != null && !(parent instanceof Post)) { - parent = parent.getParent(); - } - return (Post) parent; - } - - private static Comment mkComment(@SuppressWarnings("SameParameterValue") long id, Comment parent) { + private static Comment mkComment(long id, Submission parent) { Comment comment = new Comment(); comment.setId(id); - comment.setPost(findContainingPost(parent)); comment.setTimestamp(id); parent.addComment(comment); return comment; } - private static Comment mkComment(long id, Post post) { - Comment comment = new Comment(); - comment.setId(id); - comment.setPost(post); - comment.setTimestamp(id); - post.addComment(comment); - return comment; - } - @SuppressWarnings("unused") private static void test() { - SocialNetwork sn = new SocialNetwork(); + SocialNetwork sn = SocialNetwork.createSocialNetwork(); Post post = new Post(); post.setId(100L); @@ -92,38 +73,6 @@ public class Main { report(sn, u1); } -// private static void testCS2() { -// SocialNetwork sn = new SocialNetwork(); -// -// Post post = new Post(); -// post.setId(123L); -// sn.addPost(post); -// -// Comment c725662 = mkComment(725662, post); -// -// User u4555 = mkUser(4555, sn, c725662); -// User u4755 = mkUser(4755, sn, c725662); -// User u1103 = mkUser(1103, sn, c725662); -// User u768 = mkUser(768, sn, c725662); -// User u1222 = mkUser(1222, sn, c725662); -// User u1050 = mkUser(1050, sn, c725662); -// User u3055 = mkUser(3055, sn, c725662); -// User u1077 = mkUser(1077, sn, c725662); -// User u1922 = mkUser(1922, sn, c725662); -// -// -// -// addFriends(u4555, u2608, u2783, u143, u4644, u2004, u1434, u2269, u1222, u1490); -// addFriends(u4755, u143, u2783); -// addFriends(u1103, u2783, u238, u143); -// addFriends(u768, u2783); -// addFriends(u1222, u2783, u4555); -// addFriends(u1050, u2783); -// addFriends(u3055, u2783); -// addFriends(u1077, u2783); -// addFriends(u1922, u2783); -// } - private static void report(SocialNetwork sn, User interestingUser) { sn.flushTreeCache(); @@ -134,26 +83,28 @@ public class Main { logger.info("{}.score: {}", comment, comment.score()); } - logger.info("sn.query2: {}", sn.query2()); + logger.info("sn.query2: {}", sn.query(2)); System.exit(0); } - public static void main(String[] args) throws JAXBException, ParseException { + public static void main(String[] args) throws Exception { // test(); - SocialNetwork socialNetwork = parseSocialNetwork(); + XmlToJastaddTranslator translator = parseSocialNetwork(); + SocialNetwork socialNetwork = translator.getSocialNetwork(); + socialNetwork.enableTracing(); logger.info("Validity: {}", socialNetwork.isValid()); // JsonSerializer.write(socialNetwork, "serializedModelOne"); logger.info("JastAdd model with {} users and {} posts", socialNetwork.getNumUser(), socialNetwork.getNumPost()); - logger.info("Query1: {}", socialNetwork.query1()); - logger.info("Query2: {}", socialNetwork.query2()); - printQ2Scores(socialNetwork); + logger.info("Query1: {}", socialNetwork.query(1)); + logger.info("Query2: {}", socialNetwork.query(2)); +// printQ2Scores(socialNetwork); for (int index = 1; index <= maxChanges; index++) { - ModelChangeSet modelChangeSet = parseChanges(socialNetwork, index); + ModelChangeSet modelChangeSet = parseChanges(translator, index); if (modelChangeSet == null) { logger.debug("Got null as modelChangeSet, skipping."); continue; @@ -161,8 +112,8 @@ public class Main { logger.info("Validity after parsing of {} changes: {}", modelChangeSet.getNumModelChange(), socialNetwork.isValid()); -// // flush to get ids correct after parsing -// socialNetwork.flushTreeCache(); + // flush to get ids correct after parsing + socialNetwork.flushTreeCache(); if (splitApply) { // copy code of modelChangeSet.apply @@ -182,11 +133,12 @@ public class Main { logger.info("Validity after application of changes: {}", socialNetwork.isValid()); - logger.info("Query1 after change {}: {}", index, socialNetwork.query1()); - logger.info("Query2 after change {}: {}", index, socialNetwork.query2()); + logger.info("Query1 after change {}: {}", index, socialNetwork.query(1)); + logger.info("Query2 after change {}: {}", index, socialNetwork.query(2)); - printQ2Scores(socialNetwork); +// printQ2Scores(socialNetwork); } + socialNetwork.writeTracingEvents(Paths.get("events.txt")); } private static void printQ2Scores(SocialNetwork socialNetwork) { @@ -198,30 +150,29 @@ public class Main { .map(c -> c.toString() + ":(" + c.score() + "." + c.getTimestamp() + ")") .collect(Collectors.joining(", "))); for (Comment comment : scoringComments) { - logger.debug("{} likedBy {}", comment, comment.getLikedBy()); - for (User user : comment.getLikedBy()) { + logger.debug("{} likedBy {}", comment, comment.getLikedByList()); + for (User user : comment.getLikedByList()) { logger.debug("{} and {}: {}", comment, user, user.getCommentLikerFriends(comment)); - logger.debug("{} friends: {}", user, printList(user.getFriendList())); - // check that commentLikers are all friends + logger.debug("{} friends: {}", user, printList(user.getFriends())); } } } - private static String printList(List<UserRef> userRefList) { + private static String printList(List<User> userList) { StringBuilder sb = new StringBuilder("["); boolean first = true; - for (UserRef userRef : userRefList) { + for (User user : userList) { if (first) { first = false; } else { sb.append(", "); } - sb.append(userRef.getUser()); + sb.append(user); } return sb.append("]").toString(); } - private static SocialNetwork parseSocialNetwork() throws JAXBException, ParseException { + private static XmlToJastaddTranslator parseSocialNetwork() throws JAXBException, ParseException { JAXBContext jc = JAXBContext.newInstance(ParsedSocialNetwork.class); Unmarshaller unmarshaller = jc.createUnmarshaller(); Path model1Content = Paths.get("src", "main", "resources", Integer.toString(changeSet), "initial.xmi"); @@ -229,10 +180,11 @@ public class Main { logger.info("Users: {}, Posts: {}", parsedSocialNetwork.users.size(), parsedSocialNetwork.posts.size()); XmlToJastaddTranslator translator = new XmlToJastaddTranslator(); - return translator.translateSocialNetwork(parsedSocialNetwork); + translator.translateSocialNetwork(parsedSocialNetwork); + return translator; } - private static ModelChangeSet parseChanges(SocialNetwork socialNetwork, int index) throws JAXBException, ParseException { + private static ModelChangeSet parseChanges(XmlToJastaddTranslator translator, int index) throws JAXBException, ParseException { String suffix = String.format("change%02d.xmi", index); logger.info("Parsing changes {}", suffix); JAXBContext jc = JAXBContext.newInstance(ParsedModelChangeSet.class); @@ -245,7 +197,6 @@ public class Main { } ParsedModelChangeSet parsedModelChangeSet = (ParsedModelChangeSet) unmarshaller.unmarshal(modelContent.toFile()); - XmlToJastaddTranslator translator = new XmlToJastaddTranslator(); - return translator.translateModelChangeSet(parsedModelChangeSet, socialNetwork); + return translator.translateModelChangeSet(parsedModelChangeSet); } } diff --git a/solve/src/main/java/de/tudresden/inf/st/ttc18live/Solution.java b/solve/src/main/java/de/tudresden/inf/st/ttc18live/Solution.java new file mode 100644 index 0000000000000000000000000000000000000000..ceb14dc3628868d429ebf62acd901aeb49b9b361 --- /dev/null +++ b/solve/src/main/java/de/tudresden/inf/st/ttc18live/Solution.java @@ -0,0 +1,28 @@ +package de.tudresden.inf.st.ttc18live; + + +import de.tudresden.inf.st.ttc18live.jastadd.model.ModelChangeSet; +import de.tudresden.inf.st.ttc18live.jastadd.model.SocialNetwork; + +public abstract class Solution { + + private SocialNetwork socialNetwork; + + public SocialNetwork getSocialNetwork() { + return socialNetwork; + } + + public void setSocialNetwork(SocialNetwork network) { + socialNetwork = network; + } + + void apply(ModelChangeSet changes) { + changes.apply(); + socialNetwork.flushTreeCache(); + } + + public abstract String Initial(); + + public abstract String Update(ModelChangeSet changes); + +} diff --git a/solve/src/main/java/de/tudresden/inf/st/ttc18live/SolutionQ1.java b/solve/src/main/java/de/tudresden/inf/st/ttc18live/SolutionQ1.java new file mode 100644 index 0000000000000000000000000000000000000000..f5d3ccb4eabb5e6aef4732474cf01661c86a2baa --- /dev/null +++ b/solve/src/main/java/de/tudresden/inf/st/ttc18live/SolutionQ1.java @@ -0,0 +1,20 @@ +package de.tudresden.inf.st.ttc18live; + +import de.tudresden.inf.st.ttc18live.jastadd.model.List; +import de.tudresden.inf.st.ttc18live.jastadd.model.ModelChange; +import de.tudresden.inf.st.ttc18live.jastadd.model.ModelChangeSet; + +public class SolutionQ1 extends Solution { + + @Override + public String Initial() { + return this.getSocialNetwork().query(1); + } + + @Override + public String Update(ModelChangeSet changes) { + apply(changes); + return this.getSocialNetwork().query(1); + } + +} diff --git a/solve/src/main/java/de/tudresden/inf/st/ttc18live/SolutionQ2.java b/solve/src/main/java/de/tudresden/inf/st/ttc18live/SolutionQ2.java new file mode 100644 index 0000000000000000000000000000000000000000..1003b6830245222fe50f03c920941dc73df924ce --- /dev/null +++ b/solve/src/main/java/de/tudresden/inf/st/ttc18live/SolutionQ2.java @@ -0,0 +1,18 @@ +package de.tudresden.inf.st.ttc18live; + +import de.tudresden.inf.st.ttc18live.jastadd.model.ModelChangeSet; + +public class SolutionQ2 extends Solution { + + @Override + public String Initial() { + return getSocialNetwork().query(2); + } + + @Override + public String Update(ModelChangeSet changes) { + apply(changes); + return getSocialNetwork().query(2); + } + +} diff --git a/solve/src/main/java/de/tudresden/inf/st/ttc18live/Translator.java b/solve/src/main/java/de/tudresden/inf/st/ttc18live/Translator.java new file mode 100644 index 0000000000000000000000000000000000000000..0c5da4fd713e2eb50134d43123609d1e2a6cbbf4 --- /dev/null +++ b/solve/src/main/java/de/tudresden/inf/st/ttc18live/Translator.java @@ -0,0 +1,293 @@ +package de.tudresden.inf.st.ttc18live; + +import SocialNetwork.SocialNetworkRoot; +import de.tudresden.inf.st.ttc18live.jastadd.model.List; +import de.tudresden.inf.st.ttc18live.jastadd.model.Post; +import de.tudresden.inf.st.ttc18live.jastadd.model.User; +import de.tudresden.inf.st.ttc18live.jastadd.model.Comment; +import de.tudresden.inf.st.ttc18live.jastadd.model.Submission; +import de.tudresden.inf.st.ttc18live.jastadd.model.ModelElement; + +import de.tudresden.inf.st.ttc18live.jastadd.model.ModelChange; +import de.tudresden.inf.st.ttc18live.jastadd.model.ChangeTransaction; +import de.tudresden.inf.st.ttc18live.jastadd.model.ModelChangeSet; +import de.tudresden.inf.st.ttc18live.jastadd.model.AssociationCollectionInsertion; +import de.tudresden.inf.st.ttc18live.jastadd.model.AssociationPropertyChange; +import de.tudresden.inf.st.ttc18live.jastadd.model.AttributionPropertyChange; +import de.tudresden.inf.st.ttc18live.jastadd.model.CompositionListInsertion; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + + +import java.util.HashMap; +import java.util.Map; + +public class Translator { + + private de.tudresden.inf.st.ttc18live.jastadd.model.SocialNetwork socialNetwork; + + private Map<EObject, ModelElement> elementMap = new HashMap<>(); + private Map<SocialNetwork.User,User> userMap = new HashMap<>(); + private Map<SocialNetwork.Submission,Submission> submissionMap = new HashMap<>(); + private Map<SocialNetwork.Comment,Comment> commentMap = new HashMap<>(); + private Map<Long, ModelElement> idMap = new HashMap<>(); + + + public Translator(SocialNetworkRoot emfNetwork) { + + List<User> users = new List<>(); + for (SocialNetwork.User emfUser : emfNetwork.getUsers()) { + User user = new User(); + user.setId(Long.valueOf(emfUser.getId())); + user.setName(emfUser.getName()); + userMap.put(emfUser, user); + elementMap.put(emfUser, user); + idMap.put(user.getId(), user); + users.add(user); + } + + List<Post> posts = new List<>(); + for (SocialNetwork.Post emfPost : emfNetwork.getPosts()) { + Post post = new Post(); + post.setId(Long.valueOf(emfPost.getId())); + post.setTimestamp(emfPost.getTimestamp().getTime()); + post.setContent(emfPost.getContent()); + for (SocialNetwork.Comment subComment : emfPost.getComments()) { + post.addComment(translateComment(subComment)); + } + submissionMap.put(emfPost, post); + elementMap.put(emfPost, post); + idMap.put(post.getId(), post); + posts.add(post); + } + + // fix user non-containment refs + + for (SocialNetwork.User emfUser : emfNetwork.getUsers()) { + // fix friends + User user = userMap.get(emfUser); + for (SocialNetwork.User emfFriend : emfUser.getFriends()) { + User friend = userMap.get(emfFriend); + user.addFriend(friend); + } + + // fix submissions + for (SocialNetwork.Submission emfSubmission : emfUser.getSubmissions()) { + Submission submission = submissionMap.get(emfSubmission); + user.addSubmission(submission); + } + + // fix likes + for (SocialNetwork.Comment emfComment : emfUser.getLikes()) { + Comment comment = commentMap.get(emfComment); + user.addLike(comment); + } + } + + de.tudresden.inf.st.ttc18live.jastadd.model.SocialNetwork network; + this.socialNetwork = new de.tudresden.inf.st.ttc18live.jastadd.model.SocialNetwork(-42L, users, posts); + elementMap.put(emfNetwork, this.socialNetwork); + } + + public de.tudresden.inf.st.ttc18live.jastadd.model.SocialNetwork getSocialNetwork() { + return this.socialNetwork; + } + + private Comment translateComment(SocialNetwork.Comment emfComment) { + Comment comment = new Comment(); + comment.setId(Long.valueOf(emfComment.getId())); + comment.setTimestamp(emfComment.getTimestamp().getTime()); + comment.setContent(emfComment.getContent()); + for (SocialNetwork.Comment subComment : emfComment.getComments()) { + comment.addComment(translateComment(subComment)); + } + + commentMap.put(emfComment, comment); + submissionMap.put(emfComment, comment); + elementMap.put(emfComment, comment); + idMap.put(comment.getId(), comment); + return comment; + } + + public ModelChangeSet translateChangeSet(Changes.ModelChangeSet emfChanges) { + + ModelChangeSet changes = new ModelChangeSet(); + + List<ModelElement> pendingNewElements = new List<>(); + + // translate model changes + for (Changes.ModelChange emfChange : emfChanges.getChanges()) { + changes.addModelChange(translateModelChange(emfChange, pendingNewElements)); + } + + // translate pending new elements + changes.setPendingNewElementList(pendingNewElements); + + // set social network + changes.setSocialNetwork(this.socialNetwork); + + return changes; + } + + private ModelElement addModelElement(EObject addedEmfElement, List<ModelElement> pendingNewElements) { + + // case 1: element is proxy + if (addedEmfElement.eIsProxy()) { + URI proxyURI = ((InternalEObject) addedEmfElement).eProxyURI(); + + // resolve + if (proxyURI.toFileString().endsWith("initial.xmi")) { + return idMap.get(Long.valueOf(proxyURI.fragment())); + } + + throw new RuntimeException(); + + } else { + ModelElement addedElement = elementMap.get(addedEmfElement); + + if (addedElement != null) { + return addedElement; + } + + if (addedEmfElement instanceof SocialNetwork.Post) { + SocialNetwork.Post emfPost = (SocialNetwork.Post) addedEmfElement; + return addPost(emfPost, pendingNewElements); + } else if (addedEmfElement instanceof SocialNetwork.User) { + SocialNetwork.User emfUser = (SocialNetwork.User) addedEmfElement; + return addUser(emfUser, pendingNewElements); + } else if (addedEmfElement instanceof SocialNetwork.Comment) { + SocialNetwork.Comment emfComment = (SocialNetwork.Comment) addedEmfElement; + Comment comment = addComment(emfComment, pendingNewElements); + return comment; + } else { + throw new RuntimeException(); + } + } + + } + + private Comment addComment(SocialNetwork.Comment emfComment, List<ModelElement> pendingNewElements) { + Comment comment = new Comment(); + comment.setId(Long.valueOf(emfComment.getId())); + comment.setTimestamp(emfComment.getTimestamp().getTime()); + comment.setContent(emfComment.getContent()); + elementMap.put(emfComment, comment); + submissionMap.put(emfComment, comment); + idMap.put(comment.getId(), comment); + pendingNewElements.add(comment); + + for (SocialNetwork.Comment emfSubComment : emfComment.getComments()) { + comment.addComment((Comment)addModelElement(emfSubComment, pendingNewElements)); + } + return comment; + } + + private User addUser(SocialNetwork.User emfUser, List<ModelElement> pendingNewElements) { + User user = new User(); + user.setId(Long.valueOf(emfUser.getId())); + user.setName(emfUser.getName()); + elementMap.put(emfUser, user); + userMap.put(emfUser, user); + idMap.put(user.getId(), user); + pendingNewElements.add(user); + return user; + } + + private Post addPost(SocialNetwork.Post emfPost, List<ModelElement> pendingNewElements) { + Post post = new Post(); + post.setId(Long.valueOf(emfPost.getId())); + post.setTimestamp(emfPost.getTimestamp().getTime()); + post.setContent(emfPost.getContent()); + elementMap.put(emfPost, post); + submissionMap.put(emfPost, post); + idMap.put(post.getId(), post); + pendingNewElements.add(post); + for (SocialNetwork.Comment emfSubComment : emfPost.getComments()) { + post.addComment((Comment)addModelElement(emfSubComment, pendingNewElements)); + } + return post; + } + + private ModelChange translateModelChange(Changes.ModelChange emfChange, List<ModelElement> pendingNewElements) { + + if (emfChange instanceof Changes.ChangeTransaction) { + Changes.ChangeTransaction emfChangeTransaction = (Changes.ChangeTransaction) emfChange; + ChangeTransaction change = new ChangeTransaction(); + change.setSourceChange(translateModelChange(emfChangeTransaction.getSourceChange(), pendingNewElements)); + for (Changes.ModelChange emfNestedChange : emfChangeTransaction.getNestedChanges()) { + change.addNestedChange(translateModelChange(emfNestedChange, pendingNewElements)); + } + return change; + } else if (emfChange instanceof Changes.AssociationCollectionInsertion) { + Changes.AssociationCollectionInsertion emfAssociationCollectionInsertion = (Changes.AssociationCollectionInsertion) emfChange; + AssociationCollectionInsertion change = new AssociationCollectionInsertion(); + + // affected element + ModelElement affectedElement = addModelElement(emfAssociationCollectionInsertion.getAffectedElement(), pendingNewElements); + change.setAffectedElement(affectedElement); + + // feature + change.setFeature(emfAssociationCollectionInsertion.getFeature().getName()); + + // added element + EObject addedEmfElement = emfAssociationCollectionInsertion.getAddedElement(); + change.setAddedElement(addModelElement(addedEmfElement, pendingNewElements)); + + return change; + } else if (emfChange instanceof Changes.AssociationPropertyChange) { + Changes.AssociationPropertyChange emfAssociationPropertyChange = (Changes.AssociationPropertyChange) emfChange; + AssociationPropertyChange change = new AssociationPropertyChange(); + + // affected element + ModelElement affectedElement = addModelElement(emfAssociationPropertyChange.getAffectedElement(), pendingNewElements); + change.setAffectedElement(affectedElement); + + // feature + change.setFeature(emfAssociationPropertyChange.getFeature().getName()); + + // new value + ModelElement newValue = addModelElement(emfAssociationPropertyChange.getNewValue(), pendingNewElements); + change.setNewValue(newValue); + + return change; + } else if (emfChange instanceof Changes.AttributePropertyChange) { + Changes.AttributePropertyChange emfAttributePropertyChange = (Changes.AttributePropertyChange) emfChange; + AttributionPropertyChange change = new AttributionPropertyChange(); + + // affected element + ModelElement affectedElement = addModelElement(emfAttributePropertyChange.getAffectedElement(), pendingNewElements); + change.setAffectedElement(affectedElement); + + // feature + change.setFeature(emfAttributePropertyChange.getFeature().getName()); + + // new value + change.setNewValue(emfAttributePropertyChange.getNewValue()); + + return change; + } else if (emfChange instanceof Changes.CompositionListInsertion){ + Changes.CompositionListInsertion emfCompositionListInsertion = (Changes.CompositionListInsertion) emfChange; + CompositionListInsertion change = new CompositionListInsertion(); + + // affected element + ModelElement affectedElement = addModelElement(emfCompositionListInsertion.getAffectedElement(), pendingNewElements); + change.setAffectedElement(affectedElement); + + // feature + change.setFeature(emfCompositionListInsertion.getFeature().getName()); + + // index + change.setIndex(emfCompositionListInsertion.getIndex()); + + // added element + EObject addedEmfElement = emfCompositionListInsertion.getAddedElement(); + change.setAddedElement(addModelElement(addedEmfElement, pendingNewElements)); + + return change; + } + + throw new RuntimeException("unsupported change found!"); + } + +} diff --git a/solve/src/main/java/de/tudresden/inf/st/ttc18live/translator/XmlToJastaddTranslator.java b/solve/src/main/java/de/tudresden/inf/st/ttc18live/translator/XmlToJastaddTranslator.java index 500b28b5a3caa17bcbec5608f1dde9ab965d63b6..3777be70aabb94f27404c3c053cfebe69038b110 100644 --- a/solve/src/main/java/de/tudresden/inf/st/ttc18live/translator/XmlToJastaddTranslator.java +++ b/solve/src/main/java/de/tudresden/inf/st/ttc18live/translator/XmlToJastaddTranslator.java @@ -27,11 +27,21 @@ public class XmlToJastaddTranslator { private Map<String, ModelElement> forwardReferencesPaths; /** Created objects within changes when translating change sets */ private Map<Long, ModelElement> createdObjects; - /** Created comments whose post terminal is to be set */ - private List<Comment> commentsToFix; + + /** Created users created initially and within changes */ + private Map<Long, User> userMap = new HashMap<>(); + /** Created submissions created initially and within changes */ + private Map<Long, Submission> submissionMap = new HashMap<>(); + + private SocialNetwork socialNetwork; public XmlToJastaddTranslator() { // empty for now + socialNetwork = null; + } + + public SocialNetwork getSocialNetwork() { + return socialNetwork; } public SocialNetwork translateSocialNetwork(ParsedSocialNetwork parsedSocialNetwork) throws ParseException { @@ -40,10 +50,7 @@ public class XmlToJastaddTranslator { Map<User, String> userLikes = new HashMap<>(); Map<Comment, Long> commentPosts = new HashMap<>(); - Map<Long, User> userMap = new HashMap<>(); - Map<Long, Submission> submissionMap = new HashMap<>(); - - SocialNetwork result = new SocialNetwork(); + socialNetwork = SocialNetwork.createSocialNetwork(); for (ParsedUser parsedUser : parsedSocialNetwork.users) { logger.trace("Parsing user id={}", parsedUser.id); User user = new User(); @@ -58,7 +65,7 @@ public class XmlToJastaddTranslator { if (parsedUser.likes != null) { userLikes.put(user, parsedUser.likes); } - result.addUser(user); + socialNetwork.addUser(user); // FIXME remove manual user lookup userMap.put(user.getId(), user); @@ -70,7 +77,7 @@ public class XmlToJastaddTranslator { post.setTimestamp(convertTimestamp(parsedPost.timestamp)); post.setContent(parsedPost.content); addComments(parsedPost, post, commentPosts, submissionMap); - result.addPost(post); + socialNetwork.addPost(post); // FIXME remove manual submission lookup submissionMap.put(post.getId(), post); @@ -83,7 +90,7 @@ public class XmlToJastaddTranslator { String[] submissionTokens = userAndSubmissions.getValue().split(" "); User user = userAndSubmissions.getKey(); for (String token : submissionTokens) { - user.addSubmission(submissionMap.get(Long.valueOf(token)).createSubmissionRef()); + user.addSubmission(submissionMap.get(Long.valueOf(token))); } } // resolveModelElement friends @@ -92,7 +99,7 @@ public class XmlToJastaddTranslator { String[] friendsTokens = userAndFriends.getValue().split(" "); User user = userAndFriends.getKey(); for (String token : friendsTokens) { - user.addFriend(userMap.get(Long.valueOf(token)).createUserRef()); + user.addFriend(userMap.get(Long.valueOf(token))); } } // resolveModelElement likes @@ -101,18 +108,11 @@ public class XmlToJastaddTranslator { String[] likesTokens = userAndLikes.getValue().split(" "); User user = userAndLikes.getKey(); for (String token : likesTokens) { - user.addLike(((Comment) submissionMap.get(Long.valueOf(token))).createCommentRef()); + user.addLike(((Comment) submissionMap.get(Long.valueOf(token)))); } } - // resolveModelElement commentPosts - logger.info("Resolving post relation of {} comments", commentPosts.size()); - for (Map.Entry<Comment, Long> commentAndPost : commentPosts.entrySet()) { - Comment comment = commentAndPost.getKey(); - Long postId = commentAndPost.getValue(); - comment.setPost((Post) submissionMap.get(postId)); - } logger.info("Done translating"); - return result; + return socialNetwork; } private void addComments(ParsedSubmission parsedSubmission, Submission submission, @@ -149,12 +149,15 @@ public class XmlToJastaddTranslator { List<CompositionListInsertion> compositionListInsertions = new ArrayList<>(); } - public ModelChangeSet translateModelChangeSet(ParsedModelChangeSet parsedModelChangeSet, SocialNetwork socialNetwork) throws ParseException { + public ModelChangeSet translateModelChangeSet(ParsedModelChangeSet parsedModelChangeSet) throws ParseException { + if (socialNetwork == null) { + logger.fatal("No previously parsed SocialNetwork found!"); + return null; + } + forwardReferencesElements = new HashMap<>(); forwardReferencesPaths = new HashMap<>(); createdObjects = new HashMap<>(); - commentsToFix = new ArrayList<>(); - ModelChangeSet result = new ModelChangeSet(); result.setSocialNetwork(socialNetwork); @@ -172,23 +175,9 @@ public class XmlToJastaddTranslator { logger.debug("change {} {}", i, parsedModelChange); result.addModelChange(translateModelChange(parsedModelChange, changeListToRevise, result, parsedModelChangeSet)); } - // fix comments - for (Comment comment : commentsToFix) { - Post post = findContainingPost(comment); - comment.setPost(post); - } return result; } - private Post findContainingPost(Comment comment) { - // this should actually be done with an inherited attribute, but attributes needs to be flushed for this - ASTNode parent = comment.getParent(); - while (parent != null && !(parent instanceof Post)) { - parent = parent.getParent(); - } - return (Post) parent; - } - // private ModelChange translate(ParsedModelChange parsedModelChange, // ChangeListToRevise changeListToRevise, // ModelChangeSet modelChangeSet, @@ -215,13 +204,14 @@ public class XmlToJastaddTranslator { ModelElement affectedElement = resolveModelElement(pec.affectedElement, modelChangeSet, parsedModelChangeSet); Objects.requireNonNull(affectedElement, "Affected element not null in " + parsedModelChange); ElementaryChange elementaryChange; + String feature = pec.feature.substring(pec.feature.lastIndexOf('/') + 1); if (pec instanceof ParsedAssociationCollectionInsertion) { // parse added element ModelElement addedElement = resolveModelElement(((ParsedAssociationCollectionInsertion) pec).addedElement, modelChangeSet, parsedModelChangeSet); // create association collection insertion elementaryChange = Utils.add( - new AssociationCollectionInsertion(affectedElement, pec.feature, addedElement), + new AssociationCollectionInsertion(affectedElement, feature, addedElement), changeListToRevise.associationCollectionInsertions); } else if (pec instanceof ParsedAssociationPropertyChange) { // parse new value @@ -230,12 +220,12 @@ public class XmlToJastaddTranslator { Objects.requireNonNull(newValue, "New value not null in " + parsedModelChange); // create association property change elementaryChange = Utils.add( - new AssociationPropertyChange(affectedElement, pec.feature, newValue), + new AssociationPropertyChange(affectedElement, feature, newValue), changeListToRevise.associationPropertyChangeList); } else if (pec instanceof ParsedAttributionPropertyChange) { // create attribution property change elementaryChange = Utils.add( - new AttributionPropertyChange(affectedElement, pec.feature, ((ParsedAttributionPropertyChange) pec).newValue), + new AttributionPropertyChange(affectedElement, feature, ((ParsedAttributionPropertyChange) pec).newValue), changeListToRevise.attributionPropertyChanges); } else if (pec instanceof ParsedCompositionListInsertion) { // parse added element @@ -247,13 +237,13 @@ public class XmlToJastaddTranslator { } // create composition list insertion elementaryChange = Utils.add( - new CompositionListInsertion(affectedElement, pec.feature, + new CompositionListInsertion(affectedElement, feature, ((ParsedCompositionListInsertion) pec).index, addedElement), changeListToRevise.compositionListInsertions); } else { throw new RuntimeException("Unsupported change type " + pec.getClass().getSimpleName()); } - elementaryChange.setFeature(pec.feature); + elementaryChange.setFeature(feature); elementaryChange.setAffectedElement(resolveModelElement(pec.affectedElement, modelChangeSet, parsedModelChangeSet)); return elementaryChange; } @@ -272,6 +262,7 @@ public class XmlToJastaddTranslator { return forwardReferencesElements.get(parsedModelElement); } ModelElement me; + Long id = Long.valueOf(parsedModelElement.id.substring(parsedModelElement.id.lastIndexOf('#') + 1)); SocialNetwork socialNetwork = modelChangeSet.getSocialNetwork(); if (parsedModelElement instanceof ParsedUser) { ParsedUser parsedUser = (ParsedUser) parsedModelElement; @@ -280,12 +271,12 @@ public class XmlToJastaddTranslator { String[] tokens = parsedUser.friends.split(" "); for (String token : tokens) { User friend = resolveUser(token, modelChangeSet); - user.addFriend(friend.createUserRef()); - friend.addFriend(user.createUserRef()); + user.addFriend(friend); } } // maybe set other fields? (submission is set, but refers to later introduced changes) socialNetwork.addUser(user); + userMap.put(id, user); me = user; } else if (parsedModelElement instanceof ParsedSubmission) { ParsedSubmission parsedSubmission = (ParsedSubmission) parsedModelElement; @@ -295,11 +286,9 @@ public class XmlToJastaddTranslator { socialNetwork.addPost((Post) submission); } else if (parsedModelElement instanceof ParsedComment) { Comment comment = new Comment(); - commentsToFix.add(comment); if (translateSubElements) { Post post = (Post) resolveModelElement(((ParsedComment) parsedModelElement).post, modelChangeSet, "Post", parsedModelChangeSet, false); - comment.setPost(post); post.addComment(comment); } submission = comment; @@ -309,9 +298,11 @@ public class XmlToJastaddTranslator { } submission.setTimestamp(convertTimestamp(parsedSubmission.timestamp)); submission.setContent(parsedSubmission.content); + // add map + submissionMap.put(id, submission); // resolveModelElement user User submitter = resolveUser(parsedSubmission.submitter, modelChangeSet); - submitter.addSubmission(submission.createSubmissionRef()); + submitter.addSubmission(submission); // check if there are any comments attached if (parsedSubmission.comments != null) { for (ParsedComment parsedSubComment : parsedSubmission.comments) { @@ -319,10 +310,8 @@ public class XmlToJastaddTranslator { Comment subComment = (Comment) translateModelElement(parsedSubComment, modelChangeSet, parsedModelChangeSet, translateSubElements); // if (submissionIsAPost) { // // assume subComment.post == parsedSubmission -// subComment.setPost((Post) submission); // submission.addComment(subComment); // } - commentsToFix.add(subComment); // post and submitter for subComment are handled in this method already submission.addComment(subComment); } @@ -332,7 +321,7 @@ public class XmlToJastaddTranslator { throw new RuntimeException("Unknown ModelElement " + parsedModelElement + " with id=" + parsedModelElement.id); } - me.setId(Long.valueOf(parsedModelElement.id.substring(parsedModelElement.id.lastIndexOf('#') + 1))); + me.setId(id); createdObjects.put(me.getId(), me); return me; } @@ -405,17 +394,16 @@ public class XmlToJastaddTranslator { logger.warn("Can not resolveModelElement " + path); id = 0; } - SocialNetwork socialNetwork = modelChangeSet.getSocialNetwork(); ModelElement result; switch (nonterminalName) { case "User": - result = socialNetwork.resolveUser(id); + result = userMap.get(id); break; case "Comment": - result = socialNetwork.resolveComment(id); + result = submissionMap.get(id); break; case "Post": - result = socialNetwork.resolvePost(id); + result = submissionMap.get(id); break; default: throw new RuntimeException("Can not resolveModelElement a " + nonterminalName + " with " + path); diff --git a/solve/src/main/resources/2/change1.documented.xmi b/solve/src/main/resources/2/change1.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..ec70feaf1fb44f34b669659c7f5951da11395094 --- /dev/null +++ b/solve/src/main/resources/2/change1.documented.xmi @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#725040"/> + <value featureName="comments"> + <listChanges index="1" referenceValues="725041"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#/"/> + <value featureName="posts"> + <listChanges index="889" referenceValues="255838"/> + <listChanges index="889" referenceValues="255837"/> + <listChanges index="889" referenceValues="255836"/> + <listChanges index="889" referenceValues="255835"/> + <listChanges index="889" referenceValues="255834"/> + <listChanges index="889" referenceValues="255833"/> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:Comment" id="725041" timestamp="2010-03-10T15:31:35.000+0000" content="About Joseph Haydn, Michael Haydn, himself . About Fr�d�ric Chopin, are for solo piano,."> + <submitter href="../../models/2/initial.xmi#4281"/> + <post href="../../models/2/initial.xmi#723156"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="255833" timestamp="2010-03-10T15:43:59.000+0000" content="photo255833.jpg"> + <submitter href="../../models/2/initial.xmi#1269"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="255834" timestamp="2010-03-10T15:44:00.000+0000" content="photo255834.jpg"> + <submitter href="../../models/2/initial.xmi#1269"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="255835" timestamp="2010-03-10T15:44:01.000+0000" content="photo255835.jpg"> + <submitter href="../../models/2/initial.xmi#1269"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="255836" timestamp="2010-03-10T15:44:02.000+0000" content="photo255836.jpg"> + <submitter href="../../models/2/initial.xmi#1269"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="255837" timestamp="2010-03-10T15:44:03.000+0000" content="photo255837.jpg"> + <submitter href="../../models/2/initial.xmi#1269"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="255838" timestamp="2010-03-10T15:44:04.000+0000" content="photo255838.jpg"> + <submitter href="../../models/2/initial.xmi#1269"/> + </objectsToAttach> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change10.documented.xmi b/solve/src/main/resources/2/change10.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..22b1ca78ca7193d154223146917aa5c8fdbdefc0 --- /dev/null +++ b/solve/src/main/resources/2/change10.documented.xmi @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#/"/> + <value featureName="posts"> + <listChanges index="935" referenceValues="1466725"/> + <listChanges index="935" referenceValues="1466724"/> + <listChanges index="935" referenceValues="1466723"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#1949"/> + <value featureName="submissions"> + <listChanges index="4" referenceValues="298815"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#298813"/> + <value featureName="comments"> + <listChanges index="0" referenceValues="298815"/> + </value> + </objectChanges> + <objectChanges key="298815"> + <value featureName="comments"> + <listChanges index="0" referenceValues="298817"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#723156"/> + <value featureName="comments"> + <listChanges index="5" referenceValues="725043"/> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:Post" id="1466723" timestamp="2010-03-10T19:50:35.000+0000" content="photo1466723.jpg"> + <submitter href="../../models/2/initial.xmi#3730"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="1466724" timestamp="2010-03-10T19:50:36.000+0000" content="photo1466724.jpg"> + <submitter href="../../models/2/initial.xmi#3730"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="1466725" timestamp="2010-03-10T19:50:37.000+0000" content="photo1466725.jpg"> + <submitter href="../../models/2/initial.xmi#3730"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Comment" id="298815" timestamp="2010-03-10T21:20:49.000+0000" content="About Davi. About Huss. About Kate. About Roy . About �amo. About Bett. Ab."> + <comments id="298817" timestamp="2010-03-10T21:34:48.000+0000" content="About Ludwi. About Husse. About Kate . About B.B. . About Beck,. About Bette. About Red ."> + <submitter href="../../models/2/initial.xmi#1949"/> + <post href="../../models/2/initial.xmi#298566"/> + </comments> + <post href="../../models/2/initial.xmi#298566"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Comment" id="298817" timestamp="2010-03-10T21:34:48.000+0000" content="About Ludwi. About Husse. About Kate . About B.B. . About Beck,. About Bette. About Red ."> + <submitter href="../../models/2/initial.xmi#1949"/> + <post href="../../models/2/initial.xmi#298566"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Comment" id="725043" timestamp="2010-03-10T21:41:00.000+0000" content="duh"> + <submitter href="../../models/2/initial.xmi#1103"/> + <post href="../../models/2/initial.xmi#723156"/> + </objectsToAttach> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change10.xmi b/solve/src/main/resources/2/change10.xmi new file mode 100644 index 0000000000000000000000000000000000000000..8349a54f6311bfdd69226d362bd673d14e90f0d4 --- /dev/null +++ b/solve/src/main/resources/2/change10.xmi @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<changes:ModelChangeSet xmi:version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmi="http://www.omg.org/XMI" xmlns:changes="http://nmf.codeplex.com/changes" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.1/@addedElement" affectedElement="social:User initial.xmi#3730" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="935" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="1466723" timestamp="2010-03-10T19:50:35" content="photo1466723.jpg" submitter="initial.xmi#3730" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.3/@addedElement" affectedElement="social:User initial.xmi#3730" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="936" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="1466724" timestamp="2010-03-10T19:50:36" content="photo1466724.jpg" submitter="initial.xmi#3730" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.5/@addedElement" affectedElement="social:User initial.xmi#3730" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="937" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="1466725" timestamp="2010-03-10T19:50:37" content="photo1466725.jpg" submitter="initial.xmi#3730" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment #//@changes.7/@sourceChange/@addedElement" affectedElement="social:User initial.xmi#1949" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:ChangeTransaction"> + <sourceChange xsi:type="changes:CompositionListInsertion" affectedElement="social:Comment initial.xmi#298813" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="initial.xmi#298566" id="298815" timestamp="2010-03-10T21:20:49" content="About Davi. About Huss. About Kate. About Roy . About Éamo. About Bett. Ab." submitter="initial.xmi#1949"> + <comments post="initial.xmi#298566" id="298817" timestamp="2010-03-10T21:34:48" content="About Ludwi. About Husse. About Kate . About B.B. . About Beck,. About Bette. About Red ." submitter="initial.xmi#1949" /> + </addedElement> + </sourceChange> + <nestedChanges xsi:type="changes:AssociationPropertyChange" newValue="social:Comment initial.xmi#298813" affectedElement="social:Comment #//@changes.7/@sourceChange/@addedElement" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Comment/commented" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment 298817" affectedElement="social:User initial.xmi#1949" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:ChangeTransaction"> + <sourceChange xsi:type="changes:CompositionListInsertion" affectedElement="social:Comment #//@changes.7/@sourceChange/@addedElement" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="initial.xmi#298566" id="298817" timestamp="2010-03-10T21:34:48" content="About Ludwi. About Husse. About Kate . About B.B. . About Beck,. About Bette. About Red ." submitter="initial.xmi#1949" /> + </sourceChange> + <nestedChanges xsi:type="changes:AssociationPropertyChange" newValue="social:Comment #//@changes.7/@sourceChange/@addedElement" affectedElement="social:Comment 298817" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Comment/commented" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment #//@changes.11/@addedElement" affectedElement="social:User initial.xmi#1103" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="5" affectedElement="social:Post initial.xmi#723156" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="initial.xmi#723156" id="725043" timestamp="2010-03-10T21:41:00" content="duh" submitter="initial.xmi#1103" /> + </changes> +</changes:ModelChangeSet> \ No newline at end of file diff --git a/solve/src/main/resources/2/change11.documented.xmi b/solve/src/main/resources/2/change11.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..9a6cfe972f4336d3bb9b259de7ccabb195f5a0a7 --- /dev/null +++ b/solve/src/main/resources/2/change11.documented.xmi @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#406944"/> + <value featureName="likedBy"> + <listChanges index="4"> + <referenceValues href="../../models/2/initial.xmi#555"/> + </listChanges> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#555"/> + <value featureName="likes"> + <listChanges index="1"> + <referenceValues href="../../models/2/initial.xmi#406944"/> + </listChanges> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#/"/> + <value featureName="users"> + <listChanges index="121" referenceValues="2135"/> + <listChanges index="121" referenceValues="4233"/> + </value> + <value featureName="posts"> + <listChanges index="938" referenceValues="722958"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#987"/> + <value featureName="friends"> + <listChanges index="1" referenceValues="4233"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#2886"/> + <value featureName="friends"> + <listChanges index="7"> + <referenceValues href="../../models/2/initial.xmi#4693"/> + </listChanges> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#4693"/> + <value featureName="friends"> + <listChanges index="1"> + <referenceValues href="../../models/2/initial.xmi#2886"/> + </listChanges> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#167197"/> + <value featureName="comments"> + <listChanges index="0" referenceValues="999991"/> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:User" id="4233"> + <friends href="../../models/2/initial.xmi#987"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:User" id="2135" name="David Grenville" submissions="722958"/> + <objectsToAttach xsi:type="social:Post" id="722958" timestamp="2010-03-11T01:05:01.000+0000" content="photo722958.jpg" submitter="2135"/> + <objectsToAttach xsi:type="social:Comment" id="999991" timestamp="2018-06-27T09:59:00.000+0100" content="Added for TTC Live contest"> + <submitter href="../../models/2/initial.xmi#1564"/> + <post href="../../models/2/initial.xmi#167197"/> + </objectsToAttach> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change11.xmi b/solve/src/main/resources/2/change11.xmi new file mode 100644 index 0000000000000000000000000000000000000000..69670bd1a56b734eebb50836721773fd1b4d9638 --- /dev/null +++ b/solve/src/main/resources/2/change11.xmi @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<changes:ModelChangeSet xmi:version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmi="http://www.omg.org/XMI" xmlns:changes="http://nmf.codeplex.com/changes" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <changes xsi:type="changes:ChangeTransaction"> + <sourceChange xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment initial.xmi#406944" affectedElement="social:User initial.xmi#555" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/likes" /> + <nestedChanges xsi:type="changes:AssociationCollectionInsertion" addedElement="social:User initial.xmi#555" affectedElement="social:Comment initial.xmi#406944" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Comment/likedBy" /> + </changes> + <changes xsi:type="changes:CompositionListInsertion" index="121" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/users"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:User" id="4233" friends="initial.xmi#987" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:User #//@changes.1/@addedElement" affectedElement="social:User initial.xmi#987" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/friends" /> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:User initial.xmi#4693" affectedElement="social:User initial.xmi#2886" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/friends" /> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:User initial.xmi#2886" affectedElement="social:User initial.xmi#4693" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/friends" /> + <changes xsi:type="changes:CompositionListInsertion" index="122" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/users"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:User" id="2135" name="David Grenville" submissions="#//@changes.6/@addedElement" /> + </changes> + <changes xsi:type="changes:CompositionListInsertion" index="938" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="722958" timestamp="2010-03-11T01:05:01" content="photo722958.jpg" submitter="#//@changes.5/@addedElement" /> + </changes> + <changes xsi:type="changes:CompositionListInsertion" index="0" affectedElement="social:Post initial.xmi#167197" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="initial.xmi#167197" id="999991" timestamp="2018-06-27T09:59:00" content="Added for TTC Live contest" submitter="initial.xmi#1564" /> + </changes> +</changes:ModelChangeSet> \ No newline at end of file diff --git a/solve/src/main/resources/2/change12.documented.xmi b/solve/src/main/resources/2/change12.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..7b6ed3995f4b96bfeb10a6faa2c953e6b993aad6 --- /dev/null +++ b/solve/src/main/resources/2/change12.documented.xmi @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#2135"/> + <value featureName="submissions"> + <listChanges index="1" referenceValues="722962"/> + <listChanges index="1" referenceValues="722961"/> + <listChanges index="1" referenceValues="722960"/> + <listChanges index="1" referenceValues="722959"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#/"/> + <value featureName="posts"> + <listChanges index="939" referenceValues="722967"/> + <listChanges index="939" referenceValues="722966"/> + <listChanges index="939" referenceValues="722965"/> + <listChanges index="939" referenceValues="722964"/> + <listChanges index="939" referenceValues="722963"/> + <listChanges index="939" referenceValues="722962"/> + <listChanges index="939" referenceValues="722961"/> + <listChanges index="939" referenceValues="722960"/> + <listChanges index="939" referenceValues="722959"/> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:Post" id="722959" timestamp="2010-03-11T01:05:02.000+0000" content="photo722959.jpg"/> + <objectsToAttach xsi:type="social:Post" id="722960" timestamp="2010-03-11T01:05:03.000+0000" content="photo722960.jpg"/> + <objectsToAttach xsi:type="social:Post" id="722961" timestamp="2010-03-11T01:05:04.000+0000" content="photo722961.jpg"/> + <objectsToAttach xsi:type="social:Post" id="722962" timestamp="2010-03-11T01:05:05.000+0000" content="photo722962.jpg"/> + <objectsToAttach xsi:type="social:Post" id="722963" timestamp="2010-03-11T01:05:06.000+0000" content="photo722963.jpg"> + <submitter href="../../models/2/initial.xmi#2135"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="722964" timestamp="2010-03-11T01:05:07.000+0000" content="photo722964.jpg"> + <submitter href="../../models/2/initial.xmi#2135"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="722965" timestamp="2010-03-11T01:05:08.000+0000" content="photo722965.jpg"> + <submitter href="../../models/2/initial.xmi#2135"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="722966" timestamp="2010-03-11T01:05:09.000+0000" content="photo722966.jpg"> + <submitter href="../../models/2/initial.xmi#2135"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="722967" timestamp="2010-03-11T01:05:10.000+0000" content="photo722967.jpg"> + <submitter href="../../models/2/initial.xmi#2135"/> + </objectsToAttach> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change12.xmi b/solve/src/main/resources/2/change12.xmi new file mode 100644 index 0000000000000000000000000000000000000000..9d2fe905db34b8927ed8f1d2abccf18379229200 --- /dev/null +++ b/solve/src/main/resources/2/change12.xmi @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<changes:ModelChangeSet xmi:version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmi="http://www.omg.org/XMI" xmlns:changes="http://nmf.codeplex.com/changes" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.1/@addedElement" affectedElement="social:User initial.xmi#2135" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="939" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="722959" timestamp="2010-03-11T01:05:02" content="photo722959.jpg" submitter="initial.xmi#2135" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.3/@addedElement" affectedElement="social:User initial.xmi#2135" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="940" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="722960" timestamp="2010-03-11T01:05:03" content="photo722960.jpg" submitter="initial.xmi#2135" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.5/@addedElement" affectedElement="social:User initial.xmi#2135" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="941" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="722961" timestamp="2010-03-11T01:05:04" content="photo722961.jpg" submitter="initial.xmi#2135" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.7/@addedElement" affectedElement="social:User initial.xmi#2135" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="942" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="722962" timestamp="2010-03-11T01:05:05" content="photo722962.jpg" submitter="initial.xmi#2135" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.9/@addedElement" affectedElement="social:User initial.xmi#2135" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="943" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="722963" timestamp="2010-03-11T01:05:06" content="photo722963.jpg" submitter="initial.xmi#2135" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.11/@addedElement" affectedElement="social:User initial.xmi#2135" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="944" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="722964" timestamp="2010-03-11T01:05:07" content="photo722964.jpg" submitter="initial.xmi#2135" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.13/@addedElement" affectedElement="social:User initial.xmi#2135" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="945" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="722965" timestamp="2010-03-11T01:05:08" content="photo722965.jpg" submitter="initial.xmi#2135" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.15/@addedElement" affectedElement="social:User initial.xmi#2135" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="946" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="722966" timestamp="2010-03-11T01:05:09" content="photo722966.jpg" submitter="initial.xmi#2135" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.17/@addedElement" affectedElement="social:User initial.xmi#2135" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="947" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="722967" timestamp="2010-03-11T01:05:10" content="photo722967.jpg" submitter="initial.xmi#2135" /> + </changes> +</changes:ModelChangeSet> \ No newline at end of file diff --git a/solve/src/main/resources/2/change13.documented.xmi b/solve/src/main/resources/2/change13.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..20447ae7d57a9e8e923b337eaf7de63b960449be --- /dev/null +++ b/solve/src/main/resources/2/change13.documented.xmi @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#3539"/> + <value featureName="submissions"> + <listChanges index="1" referenceValues="1272303"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#/"/> + <value featureName="posts"> + <listChanges index="948" referenceValues="1272303"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#725662"/> + <value featureName="likedBy"> + <listChanges index="9"> + <referenceValues href="../../models/2/initial.xmi#2079"/> + </listChanges> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#2079"/> + <value featureName="likes"> + <listChanges index="0"> + <referenceValues href="../../models/2/initial.xmi#725662"/> + </listChanges> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:Post" id="1272303" timestamp="2010-03-11T01:28:48.000+0000" content=""/> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change13.xmi b/solve/src/main/resources/2/change13.xmi new file mode 100644 index 0000000000000000000000000000000000000000..c1629b04d299929331cc04827788dff65ce442ac --- /dev/null +++ b/solve/src/main/resources/2/change13.xmi @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<changes:ModelChangeSet xmi:version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmi="http://www.omg.org/XMI" xmlns:changes="http://nmf.codeplex.com/changes" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.1/@addedElement" affectedElement="social:User initial.xmi#3539" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="948" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="1272303" timestamp="2010-03-11T01:28:48" content="" submitter="initial.xmi#3539" /> + </changes> + <changes xsi:type="changes:ChangeTransaction"> + <sourceChange xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment initial.xmi#725662" affectedElement="social:User initial.xmi#2079" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/likes" /> + <nestedChanges xsi:type="changes:AssociationCollectionInsertion" addedElement="social:User initial.xmi#2079" affectedElement="social:Comment initial.xmi#725662" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Comment/likedBy" /> + </changes> +</changes:ModelChangeSet> \ No newline at end of file diff --git a/solve/src/main/resources/2/change14.documented.xmi b/solve/src/main/resources/2/change14.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..691e0cec8090eb82ad107c1fd7e542f4170e8d70 --- /dev/null +++ b/solve/src/main/resources/2/change14.documented.xmi @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:change="http://www.eclipse.org/emf/2003/Change"/> diff --git a/solve/src/main/resources/2/change14.xmi b/solve/src/main/resources/2/change14.xmi new file mode 100644 index 0000000000000000000000000000000000000000..f3c739ae966d7d31df38a72bf0fcfb9dc78de7e7 --- /dev/null +++ b/solve/src/main/resources/2/change14.xmi @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<changes:ModelChangeSet xmi:version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmi="http://www.omg.org/XMI" xmlns:changes="http://nmf.codeplex.com/changes" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" /> \ No newline at end of file diff --git a/solve/src/main/resources/2/change15.documented.xmi b/solve/src/main/resources/2/change15.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..63c05e992c738027af0b94b5bb69690bdcedeb9e --- /dev/null +++ b/solve/src/main/resources/2/change15.documented.xmi @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#/"/> + <value featureName="posts"> + <listChanges index="949" referenceValues="269867"/> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:Post" id="269867" timestamp="2010-03-11T04:34:09.000+0000" content=""> + <submitter href="../../models/2/initial.xmi#407"/> + </objectsToAttach> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change15.xmi b/solve/src/main/resources/2/change15.xmi new file mode 100644 index 0000000000000000000000000000000000000000..d2a798998b8b91fd8a20b9b466fda6dd06c56ce2 --- /dev/null +++ b/solve/src/main/resources/2/change15.xmi @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<changes:ModelChangeSet xmi:version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmi="http://www.omg.org/XMI" xmlns:changes="http://nmf.codeplex.com/changes" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.1/@addedElement" affectedElement="social:User initial.xmi#407" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="949" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="269867" timestamp="2010-03-11T04:34:09" content="" submitter="initial.xmi#407" /> + </changes> +</changes:ModelChangeSet> \ No newline at end of file diff --git a/solve/src/main/resources/2/change16.documented.xmi b/solve/src/main/resources/2/change16.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..4787434399095a44e57237992457abe3e1cbe032 --- /dev/null +++ b/solve/src/main/resources/2/change16.documented.xmi @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#/"/> + <value featureName="users"> + <listChanges index="123" referenceValues="4008"/> + </value> + <value featureName="posts"> + <listChanges index="950" referenceValues="189715"/> + <listChanges index="950" referenceValues="189714"/> + <listChanges index="950" referenceValues="189713"/> + <listChanges index="950" referenceValues="189712"/> + <listChanges index="950" referenceValues="189711"/> + <listChanges index="950" referenceValues="189710"/> + <listChanges index="950" referenceValues="189709"/> + <listChanges index="950" referenceValues="189708"/> + <listChanges index="950" referenceValues="189707"/> + <listChanges index="950" referenceValues="189706"/> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:User" id="4008" name="Ammar Cardinale" submissions="189706 189707 189708 189709 189710 189711 189712 189713 189714 189715"/> + <objectsToAttach xsi:type="social:Post" id="189706" timestamp="2010-03-11T04:55:56.000+0000" content="photo189706.jpg" submitter="4008"/> + <objectsToAttach xsi:type="social:Post" id="189707" timestamp="2010-03-11T04:55:57.000+0000" content="photo189707.jpg" submitter="4008"/> + <objectsToAttach xsi:type="social:Post" id="189708" timestamp="2010-03-11T04:55:58.000+0000" content="photo189708.jpg" submitter="4008"/> + <objectsToAttach xsi:type="social:Post" id="189709" timestamp="2010-03-11T04:55:59.000+0000" content="photo189709.jpg" submitter="4008"/> + <objectsToAttach xsi:type="social:Post" id="189710" timestamp="2010-03-11T04:56:00.000+0000" content="photo189710.jpg" submitter="4008"/> + <objectsToAttach xsi:type="social:Post" id="189711" timestamp="2010-03-11T04:56:01.000+0000" content="photo189711.jpg" submitter="4008"/> + <objectsToAttach xsi:type="social:Post" id="189712" timestamp="2010-03-11T04:56:02.000+0000" content="photo189712.jpg" submitter="4008"/> + <objectsToAttach xsi:type="social:Post" id="189713" timestamp="2010-03-11T04:56:03.000+0000" content="photo189713.jpg" submitter="4008"/> + <objectsToAttach xsi:type="social:Post" id="189714" timestamp="2010-03-11T04:56:04.000+0000" content="photo189714.jpg" submitter="4008"/> + <objectsToAttach xsi:type="social:Post" id="189715" timestamp="2010-03-11T04:56:05.000+0000" content="photo189715.jpg" submitter="4008"/> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change16.xmi b/solve/src/main/resources/2/change16.xmi new file mode 100644 index 0000000000000000000000000000000000000000..73af45c7593c0d1f70632199e1f103c3b7d58c85 --- /dev/null +++ b/solve/src/main/resources/2/change16.xmi @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<changes:ModelChangeSet xmi:version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmi="http://www.omg.org/XMI" xmlns:changes="http://nmf.codeplex.com/changes" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <changes xsi:type="changes:CompositionListInsertion" index="123" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/users"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:User" id="4008" name="Ammar Cardinale" submissions="#//@changes.1/@addedElement #//@changes.2/@addedElement #//@changes.3/@addedElement #//@changes.4/@addedElement #//@changes.5/@addedElement #//@changes.6/@addedElement #//@changes.7/@addedElement #//@changes.8/@addedElement #//@changes.9/@addedElement #//@changes.10/@addedElement" /> + </changes> + <changes xsi:type="changes:CompositionListInsertion" index="950" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="189706" timestamp="2010-03-11T04:55:56" content="photo189706.jpg" submitter="#//@changes.0/@addedElement" /> + </changes> + <changes xsi:type="changes:CompositionListInsertion" index="951" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="189707" timestamp="2010-03-11T04:55:57" content="photo189707.jpg" submitter="#//@changes.0/@addedElement" /> + </changes> + <changes xsi:type="changes:CompositionListInsertion" index="952" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="189708" timestamp="2010-03-11T04:55:58" content="photo189708.jpg" submitter="#//@changes.0/@addedElement" /> + </changes> + <changes xsi:type="changes:CompositionListInsertion" index="953" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="189709" timestamp="2010-03-11T04:55:59" content="photo189709.jpg" submitter="#//@changes.0/@addedElement" /> + </changes> + <changes xsi:type="changes:CompositionListInsertion" index="954" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="189710" timestamp="2010-03-11T04:56:00" content="photo189710.jpg" submitter="#//@changes.0/@addedElement" /> + </changes> + <changes xsi:type="changes:CompositionListInsertion" index="955" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="189711" timestamp="2010-03-11T04:56:01" content="photo189711.jpg" submitter="#//@changes.0/@addedElement" /> + </changes> + <changes xsi:type="changes:CompositionListInsertion" index="956" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="189712" timestamp="2010-03-11T04:56:02" content="photo189712.jpg" submitter="#//@changes.0/@addedElement" /> + </changes> + <changes xsi:type="changes:CompositionListInsertion" index="957" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="189713" timestamp="2010-03-11T04:56:03" content="photo189713.jpg" submitter="#//@changes.0/@addedElement" /> + </changes> + <changes xsi:type="changes:CompositionListInsertion" index="958" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="189714" timestamp="2010-03-11T04:56:04" content="photo189714.jpg" submitter="#//@changes.0/@addedElement" /> + </changes> + <changes xsi:type="changes:CompositionListInsertion" index="959" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="189715" timestamp="2010-03-11T04:56:05" content="photo189715.jpg" submitter="#//@changes.0/@addedElement" /> + </changes> +</changes:ModelChangeSet> \ No newline at end of file diff --git a/solve/src/main/resources/2/change17.documented.xmi b/solve/src/main/resources/2/change17.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..54bb67261af9c09109f9c9c993504380c3f5f13a --- /dev/null +++ b/solve/src/main/resources/2/change17.documented.xmi @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#/"/> + <value featureName="posts"> + <listChanges index="960" referenceValues="630412"/> + <listChanges index="960" referenceValues="404048"/> + <listChanges index="960" referenceValues="189719"/> + <listChanges index="960" referenceValues="189718"/> + <listChanges index="960" referenceValues="189717"/> + <listChanges index="960" referenceValues="189716"/> + </value> + <value featureName="users"> + <listChanges index="124" referenceValues="1753"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#1103"/> + <value featureName="friends"> + <listChanges index="3" referenceValues="1753"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#1274"/> + <value featureName="name" dataValue="Roberto Fernandez"/> + <value featureName="submissions"> + <listChanges index="0" referenceValues="630412"/> + </value> + </objectChanges> + <objectChanges key="404048"> + <value featureName="comments"> + <listChanges index="0" referenceValues="404837"/> + </value> + </objectChanges> + <objectChanges key="630412"> + <value featureName="comments"> + <listChanges index="0" referenceValues="630814"/> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:Post" id="189716" timestamp="2010-03-11T04:56:06.000+0000" content="photo189716.jpg"> + <submitter href="../../models/2/initial.xmi#4008"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="189717" timestamp="2010-03-11T04:56:07.000+0000" content="photo189717.jpg"> + <submitter href="../../models/2/initial.xmi#4008"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="189718" timestamp="2010-03-11T04:56:08.000+0000" content="photo189718.jpg"> + <submitter href="../../models/2/initial.xmi#4008"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="189719" timestamp="2010-03-11T04:56:09.000+0000" content="photo189719.jpg"> + <submitter href="../../models/2/initial.xmi#4008"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="404048" timestamp="2010-03-11T07:52:37.000+0000" content=""> + <submitter href="../../models/2/initial.xmi#3705"/> + <comments id="404837" timestamp="2010-03-11T08:03:24.000+0000" content="About Elvis. About John . About Robin. About Ameri. About Nazi . About Morga. About." post="404048"> + <submitter href="../../models/2/initial.xmi#2886"/> + </comments> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="630412" timestamp="2010-03-11T08:03:06.000+0000" content=""> + <comments id="630814" timestamp="2010-03-11T08:13:39.000+0000" content="great" post="630412"> + <submitter href="../../models/2/initial.xmi#683"/> + </comments> + <comments id="630822" timestamp="2010-03-11T08:14:57.000+0000" content="no way!" post="630412"> + <submitter href="../../models/2/initial.xmi#683"/> + </comments> + </objectsToAttach> + <objectsToAttach xsi:type="social:User" id="1753"> + <friends href="../../models/2/initial.xmi#1103"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Comment" id="404837" timestamp="2010-03-11T08:03:24.000+0000" content="About Elvis. About John . About Robin. About Ameri. About Nazi . About Morga. About." post="404048"> + <submitter href="../../models/2/initial.xmi#2886"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Comment" id="630814" timestamp="2010-03-11T08:13:39.000+0000" content="great" post="630412"> + <submitter href="../../models/2/initial.xmi#683"/> + </objectsToAttach> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change17.xmi b/solve/src/main/resources/2/change17.xmi new file mode 100644 index 0000000000000000000000000000000000000000..738e275f1d79edbde41d843f540e1f4d67d37151 --- /dev/null +++ b/solve/src/main/resources/2/change17.xmi @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="utf-8"?> +<changes:ModelChangeSet xmi:version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmi="http://www.omg.org/XMI" xmlns:changes="http://nmf.codeplex.com/changes" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.1/@addedElement" affectedElement="social:User initial.xmi#4008" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="960" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="189716" timestamp="2010-03-11T04:56:06" content="photo189716.jpg" submitter="initial.xmi#4008" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.3/@addedElement" affectedElement="social:User initial.xmi#4008" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="961" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="189717" timestamp="2010-03-11T04:56:07" content="photo189717.jpg" submitter="initial.xmi#4008" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.5/@addedElement" affectedElement="social:User initial.xmi#4008" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="962" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="189718" timestamp="2010-03-11T04:56:08" content="photo189718.jpg" submitter="initial.xmi#4008" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.7/@addedElement" affectedElement="social:User initial.xmi#4008" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="963" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="189719" timestamp="2010-03-11T04:56:09" content="photo189719.jpg" submitter="initial.xmi#4008" /> + </changes> + <changes xsi:type="changes:CompositionListInsertion" index="124" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/users"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:User" id="1753" friends="initial.xmi#1103" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:User #//@changes.8/@addedElement" affectedElement="social:User initial.xmi#1103" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/friends" /> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.11/@addedElement" affectedElement="social:User initial.xmi#3705" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="964" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="404048" timestamp="2010-03-11T07:52:37" content="" submitter="initial.xmi#3705"> + <comments post="#//@changes.11/@addedElement" id="404837" timestamp="2010-03-11T08:03:24" content="About Elvis. About John . About Robin. About Ameri. About Nazi . About Morga. About." submitter="initial.xmi#2886" /> + </addedElement> + </changes> + <changes xsi:type="changes:AttributePropertyChange" newValue="Roberto Fernandez" affectedElement="social:User initial.xmi#1274" feature="ecore:EAttribute https://www.transformation-tool-contest.eu/2018/social_media#//User/name" /> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.14/@addedElement" affectedElement="social:User initial.xmi#1274" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="965" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="630412" timestamp="2010-03-11T08:03:06" content="" submitter="initial.xmi#1274"> + <comments post="#//@changes.14/@addedElement" id="630814" timestamp="2010-03-11T08:13:39" content="great" submitter="initial.xmi#683" /> + <comments post="#//@changes.14/@addedElement" id="630822" timestamp="2010-03-11T08:14:57" content="no way!" submitter="initial.xmi#683" /> + </addedElement> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment 404837" affectedElement="social:User initial.xmi#2886" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:ChangeTransaction"> + <sourceChange xsi:type="changes:CompositionListInsertion" affectedElement="social:Post #//@changes.11/@addedElement" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="#//@changes.11/@addedElement" id="404837" timestamp="2010-03-11T08:03:24" content="About Elvis. About John . About Robin. About Ameri. About Nazi . About Morga. About." submitter="initial.xmi#2886" /> + </sourceChange> + <nestedChanges xsi:type="changes:AssociationPropertyChange" newValue="social:Post #//@changes.11/@addedElement" affectedElement="social:Comment 404837" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Comment/commented" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment 630814" affectedElement="social:User initial.xmi#683" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:ChangeTransaction"> + <sourceChange xsi:type="changes:CompositionListInsertion" affectedElement="social:Post #//@changes.14/@addedElement" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="#//@changes.14/@addedElement" id="630814" timestamp="2010-03-11T08:13:39" content="great" submitter="initial.xmi#683" /> + </sourceChange> + <nestedChanges xsi:type="changes:AssociationPropertyChange" newValue="social:Post #//@changes.14/@addedElement" affectedElement="social:Comment 630814" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Comment/commented" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment 630822" affectedElement="social:User initial.xmi#683" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> +</changes:ModelChangeSet> \ No newline at end of file diff --git a/solve/src/main/resources/2/change18.documented.xmi b/solve/src/main/resources/2/change18.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..f0a33f5b592614e3258c401b43c1796f8e5a052c --- /dev/null +++ b/solve/src/main/resources/2/change18.documented.xmi @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#630412"/> + <value featureName="comments"> + <listChanges index="2" referenceValues="630823"/> + <listChanges index="2" referenceValues="630813"/> + <listChanges index="2" referenceValues="630820"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#2317"/> + <value featureName="friends"> + <listChanges index="3"> + <referenceValues href="../../models/2/initial.xmi#4755"/> + </listChanges> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#4755"/> + <value featureName="friends"> + <listChanges index="2"> + <referenceValues href="../../models/2/initial.xmi#2317"/> + </listChanges> + </value> + </objectChanges> + <objectChanges key="630820"> + <value featureName="comments"> + <listChanges index="0" referenceValues="630826"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#725041"/> + <value featureName="comments"> + <listChanges index="0" referenceValues="725046"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#/"/> + <value featureName="posts"> + <listChanges index="966" referenceValues="404060"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#404837"/> + <value featureName="comments"> + <listChanges index="0" referenceValues="404840"/> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:Comment" id="630820" timestamp="2010-03-11T08:16:07.000+0000" content="About Kingdom of Bohemia, until its dissolution in 1806, whereupon it became part of ."> + <submitter href="../../models/2/initial.xmi#683"/> + <comments id="630826" timestamp="2010-03-11T08:32:33.000+0000" content="About Pope Pius X, Giovanni Pacelli (2 March 1876 – 9 October 1958), reigned as Pope, ."> + <submitter href="../../models/2/initial.xmi#683"/> + <post href="../../models/2/initial.xmi#630412"/> + </comments> + <post href="../../models/2/initial.xmi#630412"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Comment" id="630813" timestamp="2010-03-11T08:57:27.000+0000" content="fine"> + <submitter href="../../models/2/initial.xmi#683"/> + <post href="../../models/2/initial.xmi#630412"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Comment" id="630823" timestamp="2010-03-11T09:05:19.000+0000" content="thanks"> + <submitter href="../../models/2/initial.xmi#683"/> + <post href="../../models/2/initial.xmi#630412"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Comment" id="630826" timestamp="2010-03-11T08:32:33.000+0000" content="About Pope Pius X, Giovanni Pacelli (2 March 1876 – 9 October 1958), reigned as Pope, ."> + <submitter href="../../models/2/initial.xmi#683"/> + <post href="../../models/2/initial.xmi#630412"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Comment" id="725046" timestamp="2010-03-11T09:27:19.000+0000" content="About Fr�d�ric Chopin, some songs to Pol. About Confederate States of America, an."> + <submitter href="../../models/2/initial.xmi#1050"/> + <post href="../../models/2/initial.xmi#723156"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="404060" timestamp="2010-03-11T09:33:35.000+0000" content=""> + <submitter href="../../models/2/initial.xmi#3705"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Comment" id="404840" timestamp="2010-03-11T09:35:41.000+0000" content="About Shak. About Glor. About Fr�d. About Robi. About Nazi. About Morg. About Gimm. ."> + <submitter href="../../models/2/initial.xmi#974"/> + <post href="../../models/2/initial.xmi#404048"/> + </objectsToAttach> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change18.xmi b/solve/src/main/resources/2/change18.xmi new file mode 100644 index 0000000000000000000000000000000000000000..ac22e76844119f00d5dc3b6a579c3d7ac7b5493f --- /dev/null +++ b/solve/src/main/resources/2/change18.xmi @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="utf-8"?> +<changes:ModelChangeSet xmi:version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmi="http://www.omg.org/XMI" xmlns:changes="http://nmf.codeplex.com/changes" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment #//@changes.1/@sourceChange/@addedElement" affectedElement="social:User initial.xmi#683" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:ChangeTransaction"> + <sourceChange xsi:type="changes:CompositionListInsertion" index="2" affectedElement="social:Post initial.xmi#630412" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="initial.xmi#630412" id="630820" timestamp="2010-03-11T08:16:07" content="About Kingdom of Bohemia, until its dissolution in 1806, whereupon it became part of ." submitter="initial.xmi#683"> + <comments post="initial.xmi#630412" id="630826" timestamp="2010-03-11T08:32:33" content="About Pope Pius X, Giovanni Pacelli (2 March 1876 – 9 October 1958), reigned as Pope, ." submitter="initial.xmi#683" /> + </addedElement> + </sourceChange> + <nestedChanges xsi:type="changes:AssociationPropertyChange" newValue="social:Post initial.xmi#630412" affectedElement="social:Comment #//@changes.1/@sourceChange/@addedElement" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Comment/commented" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:User initial.xmi#4755" affectedElement="social:User initial.xmi#2317" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/friends" /> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:User initial.xmi#2317" affectedElement="social:User initial.xmi#4755" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/friends" /> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment 630826" affectedElement="social:User initial.xmi#683" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:ChangeTransaction"> + <sourceChange xsi:type="changes:CompositionListInsertion" affectedElement="social:Comment #//@changes.1/@sourceChange/@addedElement" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="initial.xmi#630412" id="630826" timestamp="2010-03-11T08:32:33" content="About Pope Pius X, Giovanni Pacelli (2 March 1876 – 9 October 1958), reigned as Pope, ." submitter="initial.xmi#683" /> + </sourceChange> + <nestedChanges xsi:type="changes:AssociationPropertyChange" newValue="social:Comment #//@changes.1/@sourceChange/@addedElement" affectedElement="social:Comment 630826" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Comment/commented" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment #//@changes.7/@sourceChange/@addedElement" affectedElement="social:User initial.xmi#683" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:ChangeTransaction"> + <sourceChange xsi:type="changes:CompositionListInsertion" index="3" affectedElement="social:Post initial.xmi#630412" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="initial.xmi#630412" id="630813" timestamp="2010-03-11T08:57:27" content="fine" submitter="initial.xmi#683" /> + </sourceChange> + <nestedChanges xsi:type="changes:AssociationPropertyChange" newValue="social:Post initial.xmi#630412" affectedElement="social:Comment #//@changes.7/@sourceChange/@addedElement" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Comment/commented" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment #//@changes.9/@sourceChange/@addedElement" affectedElement="social:User initial.xmi#683" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:ChangeTransaction"> + <sourceChange xsi:type="changes:CompositionListInsertion" index="4" affectedElement="social:Post initial.xmi#630412" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="initial.xmi#630412" id="630823" timestamp="2010-03-11T09:05:19" content="thanks" submitter="initial.xmi#683" /> + </sourceChange> + <nestedChanges xsi:type="changes:AssociationPropertyChange" newValue="social:Post initial.xmi#630412" affectedElement="social:Comment #//@changes.9/@sourceChange/@addedElement" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Comment/commented" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment #//@changes.11/@sourceChange/@addedElement" affectedElement="social:User initial.xmi#1050" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:ChangeTransaction"> + <sourceChange xsi:type="changes:CompositionListInsertion" affectedElement="social:Comment initial.xmi#725041" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="initial.xmi#723156" id="725046" timestamp="2010-03-11T09:27:19" content="About Frédéric Chopin, some songs to Pol. About Confederate States of America, an." submitter="initial.xmi#1050" /> + </sourceChange> + <nestedChanges xsi:type="changes:AssociationPropertyChange" newValue="social:Comment initial.xmi#725041" affectedElement="social:Comment #//@changes.11/@sourceChange/@addedElement" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Comment/commented" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Post #//@changes.13/@addedElement" affectedElement="social:User initial.xmi#3705" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" index="966" affectedElement="social:SocialNetworkRoot initial.xmi#/" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//SocialNetworkRoot/posts"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Post" id="404060" timestamp="2010-03-11T09:33:35" content="" submitter="initial.xmi#3705" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment #//@changes.15/@addedElement" affectedElement="social:User initial.xmi#974" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" affectedElement="social:Comment initial.xmi#404837" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="initial.xmi#404048" id="404840" timestamp="2010-03-11T09:35:41" content="About Shak. About Glor. About Fréd. About Robi. About Nazi. About Morg. About Gimm. ." submitter="initial.xmi#974" /> + </changes> +</changes:ModelChangeSet> \ No newline at end of file diff --git a/solve/src/main/resources/2/change19.documented.xmi b/solve/src/main/resources/2/change19.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..11fbcc5606c0dc732e0ebd792d613df609aa3ce1 --- /dev/null +++ b/solve/src/main/resources/2/change19.documented.xmi @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#404060"/> + <value featureName="comments"> + <listChanges index="0" referenceValues="404950 404954"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#630820"/> + <value featureName="comments"> + <listChanges index="1" referenceValues="630825"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#269867"/> + <value featureName="comments"> + <listChanges index="0" referenceValues="270308"/> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:Comment" id="404950" timestamp="2010-03-11T09:43:14.000+0000" content="thx"> + <submitter href="../../models/2/initial.xmi#1259"/> + <post href="../../models/2/initial.xmi#404060"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Comment" id="404954" timestamp="2010-03-11T09:51:51.000+0000" content="roflol"> + <submitter href="../../models/2/initial.xmi#974"/> + <post href="../../models/2/initial.xmi#404060"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Comment" id="630825" timestamp="2010-03-11T10:33:18.000+0000" content="LOL"> + <submitter href="../../models/2/initial.xmi#683"/> + <post href="../../models/2/initial.xmi#630412"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Comment" id="270308" timestamp="2010-03-11T11:08:57.000+0000" content="maybe"> + <submitter href="../../models/2/initial.xmi#3331"/> + <post href="../../models/2/initial.xmi#269867"/> + </objectsToAttach> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change19.xmi b/solve/src/main/resources/2/change19.xmi new file mode 100644 index 0000000000000000000000000000000000000000..a396787cff7fedcb7f5d4bc39ec9cc39b03d11bb --- /dev/null +++ b/solve/src/main/resources/2/change19.xmi @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<changes:ModelChangeSet xmi:version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmi="http://www.omg.org/XMI" xmlns:changes="http://nmf.codeplex.com/changes" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment #//@changes.1/@sourceChange/@addedElement" affectedElement="social:User initial.xmi#1259" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:ChangeTransaction"> + <sourceChange xsi:type="changes:CompositionListInsertion" affectedElement="social:Post initial.xmi#404060" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="initial.xmi#404060" id="404950" timestamp="2010-03-11T09:43:14" content="thx" submitter="initial.xmi#1259" /> + </sourceChange> + <nestedChanges xsi:type="changes:AssociationPropertyChange" newValue="social:Post initial.xmi#404060" affectedElement="social:Comment #//@changes.1/@sourceChange/@addedElement" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Comment/commented" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment #//@changes.3/@sourceChange/@addedElement" affectedElement="social:User initial.xmi#974" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:ChangeTransaction"> + <sourceChange xsi:type="changes:CompositionListInsertion" index="1" affectedElement="social:Post initial.xmi#404060" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="initial.xmi#404060" id="404954" timestamp="2010-03-11T09:51:51" content="roflol" submitter="initial.xmi#974" /> + </sourceChange> + <nestedChanges xsi:type="changes:AssociationPropertyChange" newValue="social:Post initial.xmi#404060" affectedElement="social:Comment #//@changes.3/@sourceChange/@addedElement" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Comment/commented" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment #//@changes.5/@sourceChange/@addedElement" affectedElement="social:User initial.xmi#683" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:ChangeTransaction"> + <sourceChange xsi:type="changes:CompositionListInsertion" index="1" affectedElement="social:Comment initial.xmi#630820" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="initial.xmi#630412" id="630825" timestamp="2010-03-11T10:33:18" content="LOL" submitter="initial.xmi#683" /> + </sourceChange> + <nestedChanges xsi:type="changes:AssociationPropertyChange" newValue="social:Comment initial.xmi#630820" affectedElement="social:Comment #//@changes.5/@sourceChange/@addedElement" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Comment/commented" /> + </changes> + <changes xsi:type="changes:AssociationCollectionInsertion" addedElement="social:Comment #//@changes.7/@addedElement" affectedElement="social:User initial.xmi#3331" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//User/submissions" /> + <changes xsi:type="changes:CompositionListInsertion" affectedElement="social:Post initial.xmi#269867" feature="ecore:EReference https://www.transformation-tool-contest.eu/2018/social_media#//Submission/comments"> + <addedElement xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" xsi:type="social:Comment" post="initial.xmi#269867" id="270308" timestamp="2010-03-11T11:08:57" content="maybe" submitter="initial.xmi#3331" /> + </changes> +</changes:ModelChangeSet> \ No newline at end of file diff --git a/solve/src/main/resources/2/change2.documented.xmi b/solve/src/main/resources/2/change2.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..f09f400007e0a1dc05b0a02c588c1be34f353b06 --- /dev/null +++ b/solve/src/main/resources/2/change2.documented.xmi @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#/"/> + <value featureName="posts"> + <listChanges index="895" referenceValues="255846"/> + <listChanges index="895" referenceValues="255845"/> + <listChanges index="895" referenceValues="255844"/> + <listChanges index="895" referenceValues="255843"/> + <listChanges index="895" referenceValues="255842"/> + <listChanges index="895" referenceValues="255841"/> + <listChanges index="895" referenceValues="255840"/> + <listChanges index="895" referenceValues="255839"/> + </value> + <value featureName="users"> + <listChanges index="118" referenceValues="998"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#3962"/> + <value featureName="friends"> + <listChanges index="3" referenceValues="998"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#1949"/> + <value featureName="submissions"> + <listChanges index="3" referenceValues="298812"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#298566"/> + <value featureName="comments"> + <listChanges index="3" referenceValues="298812"/> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:Post" id="255839" timestamp="2010-03-10T15:44:05.000+0000" content="photo255839.jpg"> + <submitter href="../../models/2/initial.xmi#1269"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="255840" timestamp="2010-03-10T15:44:06.000+0000" content="photo255840.jpg"> + <submitter href="../../models/2/initial.xmi#1269"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="255841" timestamp="2010-03-10T15:44:07.000+0000" content="photo255841.jpg"> + <submitter href="../../models/2/initial.xmi#1269"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="255842" timestamp="2010-03-10T15:44:08.000+0000" content="photo255842.jpg"> + <submitter href="../../models/2/initial.xmi#1269"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="255843" timestamp="2010-03-10T15:44:09.000+0000" content="photo255843.jpg"> + <submitter href="../../models/2/initial.xmi#1269"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="255844" timestamp="2010-03-10T15:44:10.000+0000" content="photo255844.jpg"> + <submitter href="../../models/2/initial.xmi#1269"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="255845" timestamp="2010-03-10T15:44:11.000+0000" content="photo255845.jpg"> + <submitter href="../../models/2/initial.xmi#1269"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="255846" timestamp="2010-03-10T15:44:12.000+0000" content="photo255846.jpg"> + <submitter href="../../models/2/initial.xmi#1269"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:User" id="998"> + <friends href="../../models/2/initial.xmi#3962"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Comment" id="298812" timestamp="2010-03-10T15:58:36.000+0000" content="maybe"> + <post href="../../models/2/initial.xmi#298566"/> + </objectsToAttach> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change20.documented.xmi b/solve/src/main/resources/2/change20.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..691e0cec8090eb82ad107c1fd7e542f4170e8d70 --- /dev/null +++ b/solve/src/main/resources/2/change20.documented.xmi @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:change="http://www.eclipse.org/emf/2003/Change"/> diff --git a/solve/src/main/resources/2/change20.xmi b/solve/src/main/resources/2/change20.xmi new file mode 100644 index 0000000000000000000000000000000000000000..f3c739ae966d7d31df38a72bf0fcfb9dc78de7e7 --- /dev/null +++ b/solve/src/main/resources/2/change20.xmi @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<changes:ModelChangeSet xmi:version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmi="http://www.omg.org/XMI" xmlns:changes="http://nmf.codeplex.com/changes" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media" /> \ No newline at end of file diff --git a/solve/src/main/resources/2/change3.documented.xmi b/solve/src/main/resources/2/change3.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..691e0cec8090eb82ad107c1fd7e542f4170e8d70 --- /dev/null +++ b/solve/src/main/resources/2/change3.documented.xmi @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:change="http://www.eclipse.org/emf/2003/Change"/> diff --git a/solve/src/main/resources/2/change4.documented.xmi b/solve/src/main/resources/2/change4.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..2fdb4f747c00296aa55ee892f355830be6c2113a --- /dev/null +++ b/solve/src/main/resources/2/change4.documented.xmi @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#404236"/> + <value featureName="comments"> + <listChanges index="0" referenceValues="999992"/> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:Comment" id="999992" timestamp="2018-06-27T10:59:00.000+0100" content="Added for TTC Live contest"> + <submitter href="../../models/2/initial.xmi#1564"/> + <post href="../../models/2/initial.xmi#404236"/> + </objectsToAttach> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change5.documented.xmi b/solve/src/main/resources/2/change5.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..743344dedb2a9d1f5d45b57b5857c0cdd3425360 --- /dev/null +++ b/solve/src/main/resources/2/change5.documented.xmi @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#406915"/> + <value featureName="likedBy"> + <listChanges index="5"> + <referenceValues href="../../models/2/initial.xmi#1259"/> + </listChanges> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#1259"/> + <value featureName="likes"> + <listChanges index="2"> + <referenceValues href="../../models/2/initial.xmi#406915"/> + </listChanges> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#/"/> + <value featureName="users"> + <listChanges index="119" referenceValues="3722"/> + </value> + <value featureName="posts"> + <listChanges index="903" referenceValues="365669"/> + <listChanges index="903" referenceValues="365668"/> + <listChanges index="903" referenceValues="365667"/> + <listChanges index="903" referenceValues="365666"/> + <listChanges index="903" referenceValues="365665"/> + <listChanges index="903" referenceValues="365664"/> + <listChanges index="903" referenceValues="365663"/> + <listChanges index="903" referenceValues="365662"/> + <listChanges index="903" referenceValues="365661"/> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:User" id="3722" name="Marietta Garbi" submissions="365661 365662 365663 365664 365665 365666 365667 365668 365669"/> + <objectsToAttach xsi:type="social:Post" id="365661" timestamp="2010-03-10T16:24:11.000+0000" content="photo365661.jpg" submitter="3722"/> + <objectsToAttach xsi:type="social:Post" id="365662" timestamp="2010-03-10T16:24:12.000+0000" content="photo365662.jpg" submitter="3722"/> + <objectsToAttach xsi:type="social:Post" id="365663" timestamp="2010-03-10T16:24:13.000+0000" content="photo365663.jpg" submitter="3722"/> + <objectsToAttach xsi:type="social:Post" id="365664" timestamp="2010-03-10T16:24:14.000+0000" content="photo365664.jpg" submitter="3722"/> + <objectsToAttach xsi:type="social:Post" id="365665" timestamp="2010-03-10T16:24:15.000+0000" content="photo365665.jpg" submitter="3722"/> + <objectsToAttach xsi:type="social:Post" id="365666" timestamp="2010-03-10T16:24:16.000+0000" content="photo365666.jpg" submitter="3722"/> + <objectsToAttach xsi:type="social:Post" id="365667" timestamp="2010-03-10T16:24:17.000+0000" content="photo365667.jpg" submitter="3722"/> + <objectsToAttach xsi:type="social:Post" id="365668" timestamp="2010-03-10T16:24:18.000+0000" content="photo365668.jpg" submitter="3722"/> + <objectsToAttach xsi:type="social:Post" id="365669" timestamp="2010-03-10T16:24:19.000+0000" content="photo365669.jpg" submitter="3722"/> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change6.documented.xmi b/solve/src/main/resources/2/change6.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..022fa23362202e105d26eb1fd39eb094fc0c451d --- /dev/null +++ b/solve/src/main/resources/2/change6.documented.xmi @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#/"/> + <value featureName="posts"> + <listChanges index="912" referenceValues="189315"/> + <listChanges index="912" referenceValues="189314"/> + <listChanges index="912" referenceValues="365677"/> + <listChanges index="912" referenceValues="365676"/> + <listChanges index="912" referenceValues="365675"/> + <listChanges index="912" referenceValues="365674"/> + <listChanges index="912" referenceValues="365673"/> + <listChanges index="912" referenceValues="365672"/> + <listChanges index="912" referenceValues="365671"/> + <listChanges index="912" referenceValues="365670"/> + </value> + <value featureName="users"> + <listChanges index="120" referenceValues="3944"/> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:Post" id="365670" timestamp="2010-03-10T16:24:20.000+0000" content="photo365670.jpg"> + <submitter href="../../models/2/initial.xmi#3722"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="365671" timestamp="2010-03-10T16:24:21.000+0000" content="photo365671.jpg"> + <submitter href="../../models/2/initial.xmi#3722"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="365672" timestamp="2010-03-10T16:24:22.000+0000" content="photo365672.jpg"> + <submitter href="../../models/2/initial.xmi#3722"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="365673" timestamp="2010-03-10T16:24:23.000+0000" content="photo365673.jpg"> + <submitter href="../../models/2/initial.xmi#3722"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="365674" timestamp="2010-03-10T16:24:24.000+0000" content="photo365674.jpg"> + <submitter href="../../models/2/initial.xmi#3722"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="365675" timestamp="2010-03-10T16:24:25.000+0000" content="photo365675.jpg"> + <submitter href="../../models/2/initial.xmi#3722"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="365676" timestamp="2010-03-10T16:24:26.000+0000" content="photo365676.jpg"> + <submitter href="../../models/2/initial.xmi#3722"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="365677" timestamp="2010-03-10T16:24:27.000+0000" content="photo365677.jpg"> + <submitter href="../../models/2/initial.xmi#3722"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="189314" timestamp="2010-03-10T17:12:20.000+0000" content="photo189314.jpg" submitter="3944"/> + <objectsToAttach xsi:type="social:Post" id="189315" timestamp="2010-03-10T17:12:21.000+0000" content="photo189315.jpg" submitter="3944"/> + <objectsToAttach xsi:type="social:User" id="3944" name="Armando Antonio" submissions="189314 189315"/> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change7.documented.xmi b/solve/src/main/resources/2/change7.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..ecfb792bcaacb03a25c1dea4e7dc4662d91f1477 --- /dev/null +++ b/solve/src/main/resources/2/change7.documented.xmi @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#3944"/> + <value featureName="submissions"> + <listChanges index="2" referenceValues="189318"/> + <listChanges index="2" referenceValues="189317"/> + <listChanges index="2" referenceValues="189316"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#/"/> + <value featureName="posts"> + <listChanges index="922" referenceValues="189325"/> + <listChanges index="922" referenceValues="189324"/> + <listChanges index="922" referenceValues="189323"/> + <listChanges index="922" referenceValues="189322"/> + <listChanges index="922" referenceValues="189321"/> + <listChanges index="922" referenceValues="189320"/> + <listChanges index="922" referenceValues="189319"/> + <listChanges index="922" referenceValues="189318"/> + <listChanges index="922" referenceValues="189317"/> + <listChanges index="922" referenceValues="189316"/> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:Post" id="189316" timestamp="2010-03-10T17:12:22.000+0000" content="photo189316.jpg"/> + <objectsToAttach xsi:type="social:Post" id="189317" timestamp="2010-03-10T17:12:23.000+0000" content="photo189317.jpg"/> + <objectsToAttach xsi:type="social:Post" id="189318" timestamp="2010-03-10T17:12:24.000+0000" content="photo189318.jpg"/> + <objectsToAttach xsi:type="social:Post" id="189319" timestamp="2010-03-10T17:12:25.000+0000" content="photo189319.jpg"> + <submitter href="../../models/2/initial.xmi#3944"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="189320" timestamp="2010-03-10T17:12:26.000+0000" content="photo189320.jpg"> + <submitter href="../../models/2/initial.xmi#3944"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="189321" timestamp="2010-03-10T17:12:27.000+0000" content="photo189321.jpg"> + <submitter href="../../models/2/initial.xmi#3944"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="189322" timestamp="2010-03-10T17:12:28.000+0000" content="photo189322.jpg"> + <submitter href="../../models/2/initial.xmi#3944"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="189323" timestamp="2010-03-10T17:12:29.000+0000" content="photo189323.jpg"> + <submitter href="../../models/2/initial.xmi#3944"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="189324" timestamp="2010-03-10T17:12:30.000+0000" content="photo189324.jpg"> + <submitter href="../../models/2/initial.xmi#3944"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="189325" timestamp="2010-03-10T17:12:31.000+0000" content="photo189325.jpg"> + <submitter href="../../models/2/initial.xmi#3944"/> + </objectsToAttach> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change8.documented.xmi b/solve/src/main/resources/2/change8.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..a290c5843549a8599de8c4dbabe206e2663621f3 --- /dev/null +++ b/solve/src/main/resources/2/change8.documented.xmi @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:change="http://www.eclipse.org/emf/2003/Change" xmlns:social="https://www.transformation-tool-contest.eu/2018/social_media"> + <objectChanges> + <key href="../../models/2/initial.xmi#/"/> + <value featureName="posts"> + <listChanges index="932" referenceValues="189328"/> + <listChanges index="932" referenceValues="189327"/> + <listChanges index="932" referenceValues="189326"/> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#2886"/> + <value featureName="friends"> + <listChanges index="6"> + <referenceValues href="../../models/2/initial.xmi#3412"/> + </listChanges> + </value> + </objectChanges> + <objectChanges> + <key href="../../models/2/initial.xmi#3412"/> + <value featureName="friends"> + <listChanges index="9"> + <referenceValues href="../../models/2/initial.xmi#2886"/> + </listChanges> + </value> + </objectChanges> + <objectsToAttach xsi:type="social:Post" id="189326" timestamp="2010-03-10T17:12:32.000+0000" content="photo189326.jpg"> + <submitter href="../../models/2/initial.xmi#3944"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="189327" timestamp="2010-03-10T17:12:33.000+0000" content="photo189327.jpg"> + <submitter href="../../models/2/initial.xmi#3944"/> + </objectsToAttach> + <objectsToAttach xsi:type="social:Post" id="189328" timestamp="2010-03-10T17:12:34.000+0000" content="photo189328.jpg"> + <submitter href="../../models/2/initial.xmi#3944"/> + </objectsToAttach> +</change:ChangeDescription> diff --git a/solve/src/main/resources/2/change9.documented.xmi b/solve/src/main/resources/2/change9.documented.xmi new file mode 100644 index 0000000000000000000000000000000000000000..691e0cec8090eb82ad107c1fd7e542f4170e8d70 --- /dev/null +++ b/solve/src/main/resources/2/change9.documented.xmi @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<change:ChangeDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:change="http://www.eclipse.org/emf/2003/Change"/> diff --git a/solve/src/test/java/de/tudresden/inf/st/ttc18live/test/Query1SortingTest.java b/solve/src/test/java/de/tudresden/inf/st/ttc18live/test/Query1SortingTest.java index 6a1a9c97718553d7b6830c5334c52d6b767f2807..61f507326e6016b2d9892b572670457bd8fa7570 100644 --- a/solve/src/test/java/de/tudresden/inf/st/ttc18live/test/Query1SortingTest.java +++ b/solve/src/test/java/de/tudresden/inf/st/ttc18live/test/Query1SortingTest.java @@ -17,7 +17,7 @@ public class Query1SortingTest { private static final int SEED = 42; private SocialNetwork create(int... scores) { - SocialNetwork result = new SocialNetwork(); + SocialNetwork result = SocialNetwork.createSocialNetwork(); Random random = new Random(SEED); long timeOfToday = System.currentTimeMillis(); @@ -44,14 +44,13 @@ public class Query1SortingTest { Comment comment = new Comment(); comment.setId(++commentIdCounter); post.addComment(comment); - comment.setPost(post); if (i == indexLikedComment) { for (int j = 0; j < likesNeeded; j++) { User user = new User(); user.setId(7001L + j); result.addUser(user); - submitter.addSubmission(comment.createSubmissionRef()); - user.addLike(comment.createCommentRef()); + submitter.addSubmission(comment); + user.addLike(comment); } } } @@ -68,10 +67,10 @@ public class Query1SortingTest { StringBuilder sb = new StringBuilder("Users = "); for (User user : socialNetwork.getUserList()) { sb.append(user.getId()); - if (user.getNumLike() > 0) { + if (user.getLikes().size() > 0) { sb.append("-likes->{"); - for (CommentRef commentRef : user.getLikeList()) { - sb.append(commentRef.getComment().getId()).append(","); + for (Comment comment : user.getLikes()) { + sb.append(comment.getId()).append(","); } sb.append("}"); } @@ -100,7 +99,7 @@ public class Query1SortingTest { private void assertQuery1(SocialNetwork sut, long firstId, long secondId, long thirdId) { printNetwork(sut); - String actualAnswer = sut.query1(); + String actualAnswer = sut.query(1); String[] ids = actualAnswer.split("\\|"); System.out.println("Got '" + actualAnswer + "'"); assertEquals(3, ids.length);